Loading cypress.config.ts +0 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,6 @@ export default defineConfig({ }); return config; }, //baseUrl: "http://orgosletsitmfweb:4200", baseUrl: process.env.CYPRESS_BASE_URL, pageLoadTimeout: 16000, viewportWidth: 1500, Loading cypress/e2e/user-journeys-logged-in.cy.ts +0 −1 Original line number Diff line number Diff line describe('logged user journeys', () => { beforeEach(() => { //cy.visit("http://localhost:4200/"); cy.visit(window.location.origin); }); Loading cypress/e2e/user-journeys.cy.ts +47 −24 Original line number Diff line number Diff line Loading @@ -7,52 +7,71 @@ describe('user journey', () => { cy.visit(window.location.origin); }) context.only('user-not-logged-in', () => { it('checks services portal', () => { cy.navigateToServices(':nth-child(2) > .container > .row > :nth-child(2) > a > .btn'); context('user-not-logged-in', () => { it('checks metrics portal', () => { cy.navigateToMetrics('[data-cy="metricsPortal"]'); }); it('checks services portal via image', () => { cy.navigateToServices(':nth-child(2) > .container > .row > .text-left'); it('checks services portal', () => { cy.navigateToServices('[data-cy="servicesPortal"]'); }); it('checks services portal via anchor', () => { it('checks services portal via nav-bar anchor', () => { cy.navigateToServices(':nth-child(1) > .nav-link'); }); it('checks services through metrics portal', () => { cy.navigateToMetrics('[data-cy="metricsPortal"]'); cy.navigateToServices('[data-cy="servicesPortal"]'); }); it('checks resources portal', () => { //cy.get(':nth-child(2) > .nav-link').click(); cy.navigateToResources(':nth-child(3) > .container > .row > .order-md-1 > a > .btn'); cy.navigateToResources('[data-cy="resourcesPortal"]'); }); it('checks resources portal via image', () => { cy.navigateToResources(':nth-child(3) > .container > .row > .order-md-2 > a > .img-fluid'); }) it('checks resources portal via anchor', () => { it('checks resources portal via nav-bar anchor', () => { cy.navigateToResources(':nth-child(2) > .nav-link'); }); it('checks resources through metrics portal', () => { cy.navigateToMetrics('[data-cy="metricsPortal"]'); cy.navigateToResources('[data-cy="resourcesPortal"]'); }); it('checks testing portal', () => { cy.navigateToTesting(':nth-child(5) > .container > .row > .order-md-1 > a > .btn'); cy.navigateToTesting('[data-cy="testingPortal"]'); }); it('checks testing via image', () => { cy.navigateToTesting(':nth-child(5) > .container > .row > .order-md-2 > a > .img-fluid'); }) it('checks testing portal via anchor', () => { it('checks testing portal via nav-bar anchor', () => { cy.navigateToTesting(':nth-child(4) > .nav-link') }); it('checks products portal', () => { cy.navigateToProducts(':nth-child(6) > .container > .row > :nth-child(2) > a > .btn'); cy.navigateToProducts('[data-cy="productsPortal"]'); }); it('checks products portal via image', () => { cy.navigateToProducts(':nth-child(6) > .container > .row > .text-left > a > .img-fluid'); }) it('checks products portal via anchor', () => { it('checks products portal via nav-bar anchor', () => { cy.navigateToProducts(':nth-child(5) > .nav-link'); }) }); }); context('<who we are> links', () => { beforeEach(() => { cy.get('[id="contact"]').scrollIntoView().should('be.visible'); }) }); it('checks OpenSlice version', () => { cy.get('[data-cy="osl"]').click(); cy.origin("https://labs.etsi.org/", () => { cy.location("pathname").should("contain", "releases"); }); }); it('checks OpenSlice wiki via portal card', () => { cy.get('[data-cy="wiki"]').click(); cy.origin("https://osl.etsi.org/", () => { cy.location("pathname").should("equal", "/documentation/latest/"); }); }); it('checks OpenSlice by ETSI Portal Link', () => { cy.get(':nth-child(1) > .osl-anchor').click(); cy.location("pathname").should("equal", "/"); Loading @@ -65,6 +84,7 @@ describe('user journey', () => { }); }); it('checks ETSI SDG for OpenSlice link', () => { cy.get(':nth-child(3) > .osl-anchor').click(); cy.origin('https://osl.etsi.org/', () => { Loading @@ -72,12 +92,14 @@ describe('user journey', () => { }); }); it('checks linkedin link', () => { cy.get(':nth-child(1) > a > .button-outline').click(); cy.origin('https://www.linkedin.com/company/openslice', ()=> { cy.location("pathname").should("equal", "/company/openslice"); }); }); it('checks slack link', () => { cy.get(':nth-child(2) > a > .button-outline').click(); cy.origin('https://openslice.slack.com/', () => { Loading @@ -85,7 +107,7 @@ describe('user journey', () => { }); }); //twitter test cannot pass, depends on user login it('checks twitter link', () => { cy.get(':nth-child(3) > a > .button-outline').click(); cy.origin('https://x.com/OpensliceOSS', () => { Loading @@ -94,6 +116,7 @@ describe('user journey', () => { }) }); }); it('checks ecosystem link', () => { cy.get('.col-md-10 > :nth-child(1) > a').click(); cy.origin('https://osl.etsi.org/ecosystem/', () => { Loading cypress/support/commands.ts +15 −6 Original line number Diff line number Diff line declare namespace Cypress { interface Chainable { navigateToMetrics(selector): Chainable<any>; navigateToServices(selector): Chainable<any>; navigateToResources(selector): Chainable<any>; navigateToTesting(selector): Chainable<any>; Loading @@ -10,6 +11,13 @@ declare namespace Cypress { checkProtectedRoutes(): Chainable<any>; } } Cypress.Commands.add("navigateToMetrics", (selector) => { cy.get(selector).click(); cy.location("pathname").should("equal", "/metrics"); }) Cypress.Commands.add("navigateToServices", (selector) => { cy.get(selector).click(); cy.location("pathname").should("equal", "/services"); Loading @@ -17,10 +25,6 @@ Cypress.Commands.add("navigateToServices", (selector) => { cy.get(":nth-child(2) > .nav-item > .nav-link").should("exist"); //service marketplace button should exist and should redirect to /services_marketplace cy.get(".mr-auto > .nav-item > .nav-link").click(); cy.get(".jumbotron > h5.ng-tns-c147-1").should( "contain", "Browse available services and sign in to order" ); cy.get(".catalog-tree-header").should("exist"); //sign in button should exist cy.get(":nth-child(2) > .nav-item > .nav-link").click(); Loading @@ -29,28 +33,29 @@ Cypress.Commands.add("navigateToServices", (selector) => { cy.location("pathname").should("equal", Cypress.env("authRealm")); }); }); Cypress.Commands.add("navigateToResources", (selector) => { cy.get(selector).click(); cy.location("pathname").should("equal", "/resources"); //sign in button should exist cy.get(".btn").should("exist").click(); //cy.get('nav-link').should('exist').click(); //sign in button should redirect to auth form cy.origin(Cypress.env("authURL"), () => { cy.location("pathname").should("equal", Cypress.env("authRealm")); }); }); Cypress.Commands.add("navigateToTesting", (selector) => { cy.get(selector).click(); cy.location("pathname").should("equal", "/testing"); //sign in button should exist cy.get(".btn").should("exist").click(); //cy.get('nav-link').should('exist').click(); //sign in button should redirect to auth form cy.origin(Cypress.env("authURL"), () => { cy.location("pathname").should("equal", Cypress.env("authRealm")); }); }); Cypress.Commands.add("navigateToProducts", (selector) => { cy.get(selector).click(); cy.location("pathname").should("equal", "/products"); Loading @@ -67,6 +72,7 @@ Cypress.Commands.add("navigateToProducts", (selector) => { cy.location("pathname").should("equal", Cypress.env("authRealm")); }); }); Cypress.Commands.add("authUser", () => { cy.get(".btn").should("contain", "Sign In").click(); cy.origin(Cypress.env("authURL"), () => { Loading @@ -77,12 +83,14 @@ Cypress.Commands.add("authUser", () => { }); cy.location("pathname").should("equal", "/redirect"); }); Cypress.Commands.add("loginPath", (selector, path) => { cy.get(selector).click(); cy.intercept(path); cy.location("pathname").should("equal", path); cy.authUser(); }); Cypress.Commands.add( "manageEntities", (selector, button, scndIndx, numOfItems) => { Loading @@ -102,6 +110,7 @@ Cypress.Commands.add( } } ); Cypress.Commands.add("checkProtectedRoutes", () => { for (let route of Cypress.env("protectedRoutes")) { cy.intercept(route); Loading package-lock.json +260 −5 Original line number Diff line number Diff line Loading @@ -36,8 +36,9 @@ "blockly": "git://github.com/google/blockly.git#6.20210701.0", "bootstrap": "~4.6.0", "chartjs-plugin-datalabels": "~2.2.0", "cypress": "^14.5.4", "dotenv": "^17.2.2", "concurrently": "~9.2.1", "cypress": "~14.5.4", "dotenv": "~17.2.2", "jsoneditor": "~9.10.0", "jwt-decode": "~2.2.0", "marked": "^15.0.8", Loading @@ -49,6 +50,7 @@ "ngx-toastr": "~15.2.2", "rxjs": "~7.4.0", "tslib": "~2.0.0", "wait-on": "^8.0.4", "zone.js": "~0.11.8" }, "devDependencies": { Loading Loading @@ -3343,6 +3345,21 @@ "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", "dev": true }, "node_modules/@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", "license": "BSD-3-Clause" }, "node_modules/@hapi/topo": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", "license": "BSD-3-Clause", "dependencies": { "@hapi/hoek": "^9.0.0" } }, "node_modules/@iplab/ngx-file-upload": { "version": "14.0.2", "resolved": "https://registry.npmjs.org/@iplab/ngx-file-upload/-/ngx-file-upload-14.0.2.tgz", Loading Loading @@ -3666,6 +3683,27 @@ "yarn": ">= 1.13.0" } }, "node_modules/@sideway/address": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", "license": "BSD-3-Clause", "dependencies": { "@hapi/hoek": "^9.0.0" } }, "node_modules/@sideway/formula": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", "license": "BSD-3-Clause" }, "node_modules/@sideway/pinpoint": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", "license": "BSD-3-Clause" }, "node_modules/@socket.io/component-emitter": { "version": "3.1.0", "dev": true, Loading Loading @@ -4578,6 +4616,39 @@ "version": "1.11.0", "license": "MIT" }, "node_modules/axios": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, "node_modules/axios/node_modules/form-data": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { "node": ">= 6" } }, "node_modules/axios/node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "license": "MIT" }, "node_modules/axobject-query": { "version": "2.0.2", "dev": true, Loading Loading @@ -5589,6 +5660,130 @@ "dev": true, "license": "MIT" }, "node_modules/concurrently": { "version": "9.2.1", "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.1.tgz", "integrity": "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==", "license": "MIT", "dependencies": { "chalk": "4.1.2", "rxjs": "7.8.2", "shell-quote": "1.8.3", "supports-color": "8.1.1", "tree-kill": "1.2.2", "yargs": "17.7.2" }, "bin": { "conc": "dist/bin/concurrently.js", "concurrently": "dist/bin/concurrently.js" }, "engines": { "node": ">=18" }, "funding": { "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" } }, "node_modules/concurrently/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/concurrently/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/concurrently/node_modules/chalk/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/concurrently/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, "engines": { "node": ">=7.0.0" } }, "node_modules/concurrently/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, "node_modules/concurrently/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/concurrently/node_modules/rxjs": { "version": "7.8.2", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/concurrently/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/concurrently/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, "node_modules/config-chain": { "version": "1.1.13", "dev": true, Loading Loading @@ -8047,7 +8242,6 @@ "version": "1.15.9", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "dev": true, "funding": [ { "type": "individual", Loading Loading @@ -9656,6 +9850,19 @@ "node": ">= 0.6.0" } }, "node_modules/joi": { "version": "17.13.3", "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.3.tgz", "integrity": "sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==", "license": "BSD-3-Clause", "dependencies": { "@hapi/hoek": "^9.3.0", "@hapi/topo": "^5.1.0", "@sideway/address": "^4.1.5", "@sideway/formula": "^3.0.1", "@sideway/pinpoint": "^2.0.0" } }, "node_modules/jquery": { "version": "3.6.1", "license": "MIT", Loading Loading @@ -14483,6 +14690,18 @@ "node": ">=8" } }, "node_modules/shell-quote": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==", "license": "MIT", "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/side-channel": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", Loading Loading @@ -15753,6 +15972,40 @@ "xml-name-validator": "^3.0.0" } }, "node_modules/wait-on": { "version": "8.0.4", "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-8.0.4.tgz", "integrity": "sha512-8f9LugAGo4PSc0aLbpKVCVtzayd36sSCp4WLpVngkYq6PK87H79zt77/tlCU6eKCLqR46iFvcl0PU5f+DmtkwA==", "license": "MIT", "dependencies": { "axios": "^1.11.0", "joi": "^17.13.3", "lodash": "^4.17.21", "minimist": "^1.2.8", "rxjs": "^7.8.2" }, "bin": { "wait-on": "bin/wait-on" }, "engines": { "node": ">=12.0.0" } }, "node_modules/wait-on/node_modules/rxjs": { "version": "7.8.2", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/wait-on/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, "node_modules/watchpack": { "version": "2.4.0", "dev": true, Loading Loading @@ -16405,7 +16658,9 @@ } }, "node_modules/yargs": { "version": "17.6.0", "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "license": "MIT", "dependencies": { "cliui": "^8.0.1", Loading @@ -16414,7 +16669,7 @@ "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.0.0" "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12" Loading
cypress.config.ts +0 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,6 @@ export default defineConfig({ }); return config; }, //baseUrl: "http://orgosletsitmfweb:4200", baseUrl: process.env.CYPRESS_BASE_URL, pageLoadTimeout: 16000, viewportWidth: 1500, Loading
cypress/e2e/user-journeys-logged-in.cy.ts +0 −1 Original line number Diff line number Diff line describe('logged user journeys', () => { beforeEach(() => { //cy.visit("http://localhost:4200/"); cy.visit(window.location.origin); }); Loading
cypress/e2e/user-journeys.cy.ts +47 −24 Original line number Diff line number Diff line Loading @@ -7,52 +7,71 @@ describe('user journey', () => { cy.visit(window.location.origin); }) context.only('user-not-logged-in', () => { it('checks services portal', () => { cy.navigateToServices(':nth-child(2) > .container > .row > :nth-child(2) > a > .btn'); context('user-not-logged-in', () => { it('checks metrics portal', () => { cy.navigateToMetrics('[data-cy="metricsPortal"]'); }); it('checks services portal via image', () => { cy.navigateToServices(':nth-child(2) > .container > .row > .text-left'); it('checks services portal', () => { cy.navigateToServices('[data-cy="servicesPortal"]'); }); it('checks services portal via anchor', () => { it('checks services portal via nav-bar anchor', () => { cy.navigateToServices(':nth-child(1) > .nav-link'); }); it('checks services through metrics portal', () => { cy.navigateToMetrics('[data-cy="metricsPortal"]'); cy.navigateToServices('[data-cy="servicesPortal"]'); }); it('checks resources portal', () => { //cy.get(':nth-child(2) > .nav-link').click(); cy.navigateToResources(':nth-child(3) > .container > .row > .order-md-1 > a > .btn'); cy.navigateToResources('[data-cy="resourcesPortal"]'); }); it('checks resources portal via image', () => { cy.navigateToResources(':nth-child(3) > .container > .row > .order-md-2 > a > .img-fluid'); }) it('checks resources portal via anchor', () => { it('checks resources portal via nav-bar anchor', () => { cy.navigateToResources(':nth-child(2) > .nav-link'); }); it('checks resources through metrics portal', () => { cy.navigateToMetrics('[data-cy="metricsPortal"]'); cy.navigateToResources('[data-cy="resourcesPortal"]'); }); it('checks testing portal', () => { cy.navigateToTesting(':nth-child(5) > .container > .row > .order-md-1 > a > .btn'); cy.navigateToTesting('[data-cy="testingPortal"]'); }); it('checks testing via image', () => { cy.navigateToTesting(':nth-child(5) > .container > .row > .order-md-2 > a > .img-fluid'); }) it('checks testing portal via anchor', () => { it('checks testing portal via nav-bar anchor', () => { cy.navigateToTesting(':nth-child(4) > .nav-link') }); it('checks products portal', () => { cy.navigateToProducts(':nth-child(6) > .container > .row > :nth-child(2) > a > .btn'); cy.navigateToProducts('[data-cy="productsPortal"]'); }); it('checks products portal via image', () => { cy.navigateToProducts(':nth-child(6) > .container > .row > .text-left > a > .img-fluid'); }) it('checks products portal via anchor', () => { it('checks products portal via nav-bar anchor', () => { cy.navigateToProducts(':nth-child(5) > .nav-link'); }) }); }); context('<who we are> links', () => { beforeEach(() => { cy.get('[id="contact"]').scrollIntoView().should('be.visible'); }) }); it('checks OpenSlice version', () => { cy.get('[data-cy="osl"]').click(); cy.origin("https://labs.etsi.org/", () => { cy.location("pathname").should("contain", "releases"); }); }); it('checks OpenSlice wiki via portal card', () => { cy.get('[data-cy="wiki"]').click(); cy.origin("https://osl.etsi.org/", () => { cy.location("pathname").should("equal", "/documentation/latest/"); }); }); it('checks OpenSlice by ETSI Portal Link', () => { cy.get(':nth-child(1) > .osl-anchor').click(); cy.location("pathname").should("equal", "/"); Loading @@ -65,6 +84,7 @@ describe('user journey', () => { }); }); it('checks ETSI SDG for OpenSlice link', () => { cy.get(':nth-child(3) > .osl-anchor').click(); cy.origin('https://osl.etsi.org/', () => { Loading @@ -72,12 +92,14 @@ describe('user journey', () => { }); }); it('checks linkedin link', () => { cy.get(':nth-child(1) > a > .button-outline').click(); cy.origin('https://www.linkedin.com/company/openslice', ()=> { cy.location("pathname").should("equal", "/company/openslice"); }); }); it('checks slack link', () => { cy.get(':nth-child(2) > a > .button-outline').click(); cy.origin('https://openslice.slack.com/', () => { Loading @@ -85,7 +107,7 @@ describe('user journey', () => { }); }); //twitter test cannot pass, depends on user login it('checks twitter link', () => { cy.get(':nth-child(3) > a > .button-outline').click(); cy.origin('https://x.com/OpensliceOSS', () => { Loading @@ -94,6 +116,7 @@ describe('user journey', () => { }) }); }); it('checks ecosystem link', () => { cy.get('.col-md-10 > :nth-child(1) > a').click(); cy.origin('https://osl.etsi.org/ecosystem/', () => { Loading
cypress/support/commands.ts +15 −6 Original line number Diff line number Diff line declare namespace Cypress { interface Chainable { navigateToMetrics(selector): Chainable<any>; navigateToServices(selector): Chainable<any>; navigateToResources(selector): Chainable<any>; navigateToTesting(selector): Chainable<any>; Loading @@ -10,6 +11,13 @@ declare namespace Cypress { checkProtectedRoutes(): Chainable<any>; } } Cypress.Commands.add("navigateToMetrics", (selector) => { cy.get(selector).click(); cy.location("pathname").should("equal", "/metrics"); }) Cypress.Commands.add("navigateToServices", (selector) => { cy.get(selector).click(); cy.location("pathname").should("equal", "/services"); Loading @@ -17,10 +25,6 @@ Cypress.Commands.add("navigateToServices", (selector) => { cy.get(":nth-child(2) > .nav-item > .nav-link").should("exist"); //service marketplace button should exist and should redirect to /services_marketplace cy.get(".mr-auto > .nav-item > .nav-link").click(); cy.get(".jumbotron > h5.ng-tns-c147-1").should( "contain", "Browse available services and sign in to order" ); cy.get(".catalog-tree-header").should("exist"); //sign in button should exist cy.get(":nth-child(2) > .nav-item > .nav-link").click(); Loading @@ -29,28 +33,29 @@ Cypress.Commands.add("navigateToServices", (selector) => { cy.location("pathname").should("equal", Cypress.env("authRealm")); }); }); Cypress.Commands.add("navigateToResources", (selector) => { cy.get(selector).click(); cy.location("pathname").should("equal", "/resources"); //sign in button should exist cy.get(".btn").should("exist").click(); //cy.get('nav-link').should('exist').click(); //sign in button should redirect to auth form cy.origin(Cypress.env("authURL"), () => { cy.location("pathname").should("equal", Cypress.env("authRealm")); }); }); Cypress.Commands.add("navigateToTesting", (selector) => { cy.get(selector).click(); cy.location("pathname").should("equal", "/testing"); //sign in button should exist cy.get(".btn").should("exist").click(); //cy.get('nav-link').should('exist').click(); //sign in button should redirect to auth form cy.origin(Cypress.env("authURL"), () => { cy.location("pathname").should("equal", Cypress.env("authRealm")); }); }); Cypress.Commands.add("navigateToProducts", (selector) => { cy.get(selector).click(); cy.location("pathname").should("equal", "/products"); Loading @@ -67,6 +72,7 @@ Cypress.Commands.add("navigateToProducts", (selector) => { cy.location("pathname").should("equal", Cypress.env("authRealm")); }); }); Cypress.Commands.add("authUser", () => { cy.get(".btn").should("contain", "Sign In").click(); cy.origin(Cypress.env("authURL"), () => { Loading @@ -77,12 +83,14 @@ Cypress.Commands.add("authUser", () => { }); cy.location("pathname").should("equal", "/redirect"); }); Cypress.Commands.add("loginPath", (selector, path) => { cy.get(selector).click(); cy.intercept(path); cy.location("pathname").should("equal", path); cy.authUser(); }); Cypress.Commands.add( "manageEntities", (selector, button, scndIndx, numOfItems) => { Loading @@ -102,6 +110,7 @@ Cypress.Commands.add( } } ); Cypress.Commands.add("checkProtectedRoutes", () => { for (let route of Cypress.env("protectedRoutes")) { cy.intercept(route); Loading
package-lock.json +260 −5 Original line number Diff line number Diff line Loading @@ -36,8 +36,9 @@ "blockly": "git://github.com/google/blockly.git#6.20210701.0", "bootstrap": "~4.6.0", "chartjs-plugin-datalabels": "~2.2.0", "cypress": "^14.5.4", "dotenv": "^17.2.2", "concurrently": "~9.2.1", "cypress": "~14.5.4", "dotenv": "~17.2.2", "jsoneditor": "~9.10.0", "jwt-decode": "~2.2.0", "marked": "^15.0.8", Loading @@ -49,6 +50,7 @@ "ngx-toastr": "~15.2.2", "rxjs": "~7.4.0", "tslib": "~2.0.0", "wait-on": "^8.0.4", "zone.js": "~0.11.8" }, "devDependencies": { Loading Loading @@ -3343,6 +3345,21 @@ "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", "dev": true }, "node_modules/@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", "license": "BSD-3-Clause" }, "node_modules/@hapi/topo": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", "license": "BSD-3-Clause", "dependencies": { "@hapi/hoek": "^9.0.0" } }, "node_modules/@iplab/ngx-file-upload": { "version": "14.0.2", "resolved": "https://registry.npmjs.org/@iplab/ngx-file-upload/-/ngx-file-upload-14.0.2.tgz", Loading Loading @@ -3666,6 +3683,27 @@ "yarn": ">= 1.13.0" } }, "node_modules/@sideway/address": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", "license": "BSD-3-Clause", "dependencies": { "@hapi/hoek": "^9.0.0" } }, "node_modules/@sideway/formula": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", "license": "BSD-3-Clause" }, "node_modules/@sideway/pinpoint": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", "license": "BSD-3-Clause" }, "node_modules/@socket.io/component-emitter": { "version": "3.1.0", "dev": true, Loading Loading @@ -4578,6 +4616,39 @@ "version": "1.11.0", "license": "MIT" }, "node_modules/axios": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, "node_modules/axios/node_modules/form-data": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { "node": ">= 6" } }, "node_modules/axios/node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "license": "MIT" }, "node_modules/axobject-query": { "version": "2.0.2", "dev": true, Loading Loading @@ -5589,6 +5660,130 @@ "dev": true, "license": "MIT" }, "node_modules/concurrently": { "version": "9.2.1", "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.1.tgz", "integrity": "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==", "license": "MIT", "dependencies": { "chalk": "4.1.2", "rxjs": "7.8.2", "shell-quote": "1.8.3", "supports-color": "8.1.1", "tree-kill": "1.2.2", "yargs": "17.7.2" }, "bin": { "conc": "dist/bin/concurrently.js", "concurrently": "dist/bin/concurrently.js" }, "engines": { "node": ">=18" }, "funding": { "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" } }, "node_modules/concurrently/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/concurrently/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/concurrently/node_modules/chalk/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/concurrently/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, "engines": { "node": ">=7.0.0" } }, "node_modules/concurrently/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, "node_modules/concurrently/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/concurrently/node_modules/rxjs": { "version": "7.8.2", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/concurrently/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/concurrently/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, "node_modules/config-chain": { "version": "1.1.13", "dev": true, Loading Loading @@ -8047,7 +8242,6 @@ "version": "1.15.9", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "dev": true, "funding": [ { "type": "individual", Loading Loading @@ -9656,6 +9850,19 @@ "node": ">= 0.6.0" } }, "node_modules/joi": { "version": "17.13.3", "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.3.tgz", "integrity": "sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==", "license": "BSD-3-Clause", "dependencies": { "@hapi/hoek": "^9.3.0", "@hapi/topo": "^5.1.0", "@sideway/address": "^4.1.5", "@sideway/formula": "^3.0.1", "@sideway/pinpoint": "^2.0.0" } }, "node_modules/jquery": { "version": "3.6.1", "license": "MIT", Loading Loading @@ -14483,6 +14690,18 @@ "node": ">=8" } }, "node_modules/shell-quote": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==", "license": "MIT", "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/side-channel": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", Loading Loading @@ -15753,6 +15972,40 @@ "xml-name-validator": "^3.0.0" } }, "node_modules/wait-on": { "version": "8.0.4", "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-8.0.4.tgz", "integrity": "sha512-8f9LugAGo4PSc0aLbpKVCVtzayd36sSCp4WLpVngkYq6PK87H79zt77/tlCU6eKCLqR46iFvcl0PU5f+DmtkwA==", "license": "MIT", "dependencies": { "axios": "^1.11.0", "joi": "^17.13.3", "lodash": "^4.17.21", "minimist": "^1.2.8", "rxjs": "^7.8.2" }, "bin": { "wait-on": "bin/wait-on" }, "engines": { "node": ">=12.0.0" } }, "node_modules/wait-on/node_modules/rxjs": { "version": "7.8.2", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/wait-on/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, "node_modules/watchpack": { "version": "2.4.0", "dev": true, Loading Loading @@ -16405,7 +16658,9 @@ } }, "node_modules/yargs": { "version": "17.6.0", "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "license": "MIT", "dependencies": { "cliui": "^8.0.1", Loading @@ -16414,7 +16669,7 @@ "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.0.0" "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12"