Loading .gitignore +1 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading cypress.config.ts +11 −5 Original line number Original line Diff line number Diff line import { defineConfig } from "cypress"; import { defineConfig } from "cypress"; import * as dotenv from "dotenv"; dotenv.config(); export default defineConfig({ export default defineConfig({ Loading @@ -8,15 +11,18 @@ export default defineConfig({ 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' } } }, }, }); }); cypress/e2e/auth.cy.ts +0 −1 Original line number Original line Diff line number Diff line Loading @@ -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', () => { Loading cypress/e2e/user-journeys.cy.ts +2 −7 Original line number Original line Diff line number Diff line Loading @@ -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', () => { Loading Loading @@ -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", "/") Loading cypress/fixtures/example.jsondeleted 100644 → 0 +0 −5 Original line number Original line Diff line number Diff line { "name": "Using fixtures to represent data", "email": "hello@cypress.io", "body": "Fixtures are a great way to mock data for responses to routes" } Loading
.gitignore +1 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading
cypress.config.ts +11 −5 Original line number Original line Diff line number Diff line import { defineConfig } from "cypress"; import { defineConfig } from "cypress"; import * as dotenv from "dotenv"; dotenv.config(); export default defineConfig({ export default defineConfig({ Loading @@ -8,15 +11,18 @@ export default defineConfig({ 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' } } }, }, }); });
cypress/e2e/auth.cy.ts +0 −1 Original line number Original line Diff line number Diff line Loading @@ -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', () => { Loading
cypress/e2e/user-journeys.cy.ts +2 −7 Original line number Original line Diff line number Diff line Loading @@ -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', () => { Loading Loading @@ -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", "/") Loading
cypress/fixtures/example.jsondeleted 100644 → 0 +0 −5 Original line number Original line Diff line number Diff line { "name": "Using fixtures to represent data", "email": "hello@cypress.io", "body": "Fixtures are a great way to mock data for responses to routes" }