Skip to content
Snippets Groups Projects
Commit 29644797 authored by Michail Tzanatos's avatar Michail Tzanatos
Browse files

preparing merge

parent 11fa4611
No related branches found
No related tags found
1 merge request!22Draft: Resolve "Implement user journey tests"
Pipeline #12359 passed
This commit is part of merge request !22. Comments created here will be created in the context of that merge request.
...@@ -40,6 +40,7 @@ npm-debug.log ...@@ -40,6 +40,7 @@ npm-debug.log
yarn-error.log yarn-error.log
testem.log testem.log
/typings /typings
.env
# System Files # System Files
.DS_Store .DS_Store
......
import { defineConfig } from "cypress"; import { defineConfig } from "cypress";
import * as dotenv from "dotenv";
dotenv.config();
export default defineConfig({ export default defineConfig({
...@@ -7,16 +10,19 @@ export default defineConfig({ ...@@ -7,16 +10,19 @@ export default defineConfig({
// implement node event listeners here // implement node event listeners here
require("ts-node").register({ require("ts-node").register({
project: "tsconfig.json", project: "tsconfig.json",
}); });
return config;
}, },
baseUrl: "http://localhost:4200/", //baseUrl: "http://orgosletsitmfweb:4200",
baseUrl: process.env.CYPRESS_BASE_URL,
pageLoadTimeout: 16000, pageLoadTimeout: 16000,
viewportWidth: 1500, viewportWidth: 1500,
viewportHeight: 900, viewportHeight: 900,
env: { env: {
// protectedRoutes: protectedRoutes, username: process.env.CYPRESS_username,
username: 'admin', password: process.env.CYPRESS_password
password: 'openslice'
} }
}, },
}); });
...@@ -2,7 +2,6 @@ describe('user authentication', () => { ...@@ -2,7 +2,6 @@ describe('user authentication', () => {
beforeEach(() => { beforeEach(() => {
cy.visit(window.location.origin); cy.visit(window.location.origin);
}) })
//edit profile bug //edit profile bug
it('should block unauthenticated user from entering a protected route', () => { it('should block unauthenticated user from entering a protected route', () => {
......
...@@ -9,6 +9,7 @@ describe('user journey', () => { ...@@ -9,6 +9,7 @@ describe('user journey', () => {
context('user-not-logged-in', () => { context('user-not-logged-in', () => {
it('checks services portal', () => { it('checks services portal', () => {
cy.log(Cypress.env("username"));
cy.navigateToServices(':nth-child(2) > .container > .row > :nth-child(2) > a > .btn'); cy.navigateToServices(':nth-child(2) > .container > .row > :nth-child(2) > a > .btn');
}); });
it('checks services portal via image', () => { it('checks services portal via image', () => {
...@@ -102,13 +103,7 @@ describe('user journey', () => { ...@@ -102,13 +103,7 @@ describe('user journey', () => {
cy.location("pathname").should("equal", "/ecosystem/"); cy.location("pathname").should("equal", "/ecosystem/");
}); });
}); });
//never loads, timeout
it.skip('opens terms and conditions', () => {
cy.get('[href="https://osl.etsi.org/files/SDG_OSL_Terms_and_Conditions.pdf"]').click();
cy.origin('https://osl.etsi.org/files/SDG_OSL_Terms_and_Conditions.pdf/', () => {
cy.location("pathname").should("equal", "/files/SDG_OSL_Terms_and_Conditions.pdf/")
})
})
it('checks osl etsi link', () => { it('checks osl etsi link', () => {
cy.get('[target="_blank"]').click(); cy.get('[target="_blank"]').click();
cy.location("pathname").should("equal", "/") cy.location("pathname").should("equal", "/")
......
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
This diff is collapsed.
...@@ -8,9 +8,11 @@ ...@@ -8,9 +8,11 @@
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e", "e2e": "ng e2e",
"extract-paths": "ts-node scripts/extract.paths.ts", "extract-paths": "npx tsx scripts/extract.paths.ts",
"cypress:open": "npm run extract-paths && cypress open", "cypress:open": "npm run extract-paths && cypress open",
"cypress:run": "npm run extract-paths && cypress run" "cypress:run": "npm run extract-paths && cypress run",
"cy:open": "npm run extract-paths && concurrently \"ng serve\" \"wait-on http://localhost:4200 && cypress open\"",
"cy:run": "npm run extract-paths && concurrently \"ng serve\" \"wait-on http://localhost:4200 && cypress run\""
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
...@@ -41,6 +43,7 @@ ...@@ -41,6 +43,7 @@
"angular-oauth2-oidc": "~13.0.1", "angular-oauth2-oidc": "~13.0.1",
"blockly": "git://github.com/google/blockly.git#6.20210701.0", "blockly": "git://github.com/google/blockly.git#6.20210701.0",
"bootstrap": "~4.6.0", "bootstrap": "~4.6.0",
"concurrently": "^9.1.2",
"dotenv": "^16.4.7", "dotenv": "^16.4.7",
"jsoneditor": "^9.10.0", "jsoneditor": "^9.10.0",
"jwt-decode": "~2.2.0", "jwt-decode": "~2.2.0",
...@@ -56,11 +59,12 @@ ...@@ -56,11 +59,12 @@
"@angular/cli": "~13.3.9", "@angular/cli": "~13.3.9",
"@angular/compiler-cli": "~13.3.11", "@angular/compiler-cli": "~13.3.11",
"@angular/language-service": "~13.3.11", "@angular/language-service": "~13.3.11",
"@cypress/schematic": "^2.4.0",
"@types/jasmine": "~3.3.8", "@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "~12.11.1", "@types/node": "~12.11.1",
"codelyzer": "~6.0.2", "codelyzer": "~6.0.2",
"cypress": "^14.0.1", "cypress": "^14.1.0",
"jasmine-core": "~3.5.0", "jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0", "jasmine-spec-reporter": "~5.0.0",
"karma": "~6.4.1", "karma": "~6.4.1",
...@@ -72,6 +76,8 @@ ...@@ -72,6 +76,8 @@
"protractor": "~7.0.0", "protractor": "~7.0.0",
"ts-node": "~7.0.0", "ts-node": "~7.0.0",
"tslint": "~6.1.0", "tslint": "~6.1.0",
"typescript": "~4.6.4" "tsx": "^4.19.3",
"typescript": "~4.6.4",
"wait-on": "^8.0.2"
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment