diff --git a/ui/cypress.config.js b/ui/cypress.config.js index 85728ff2a..ff9f3024a 100644 --- a/ui/cypress.config.js +++ b/ui/cypress.config.js @@ -2,8 +2,12 @@ const { defineConfig } = require('cypress'); module.exports = defineConfig({ e2e: { - baseUrl: 'http://localhost:8888', + baseUrl: 'http://127.0.0.1:8888', supportFile: 'cypress/support.js', screenshotsFolder: 'cypress/debug', + setupNodeEvents(on, config) { + // bind to the event we care about + require('cypress-log-to-output').install(on); + }, }, }); diff --git a/ui/cypress/support.js b/ui/cypress/support.js index 8825e2b3a..1c979e071 100644 --- a/ui/cypress/support.js +++ b/ui/cypress/support.js @@ -2,7 +2,7 @@ import '@testing-library/cypress/add-commands'; Cypress.Commands.add('login', (username = 'idtest0', password = '0000') => { - cy.visit('/datacollection'); + cy.visit('http://127.0.0.1:8888'); cy.findByRole('heading', { name: 'MXCuBE' }).should('be.visible'); cy.findByLabelText('Login ID').type(username); cy.findByLabelText('Password').type(password); diff --git a/ui/package.json b/ui/package.json index e1d83a0f5..2b4b83d1f 100644 --- a/ui/package.json +++ b/ui/package.json @@ -79,7 +79,7 @@ "@testing-library/user-event": "^13.5.0", "babel-preset-react-app": "10.0.1", "concurrently": "^7.0.0", - "cypress": "13.1.0", + "cypress": "12.17.4", "cypress-log-to-output": "1.1.2", "eslint": "8.42.0", "eslint-config-galex": "4.5.2", diff --git a/ui/pnpm-lock.yaml b/ui/pnpm-lock.yaml index a3ae23dc4..a04b354e8 100644 --- a/ui/pnpm-lock.yaml +++ b/ui/pnpm-lock.yaml @@ -168,7 +168,7 @@ devDependencies: version: 5.15.4 '@testing-library/cypress': specifier: 10.0.1 - version: 10.0.1(cypress@13.1.0) + version: 10.0.1(cypress@12.17.4) '@testing-library/jest-dom': specifier: ^5.16.2 version: 5.17.0 @@ -185,8 +185,8 @@ devDependencies: specifier: ^7.0.0 version: 7.6.0 cypress: - specifier: 13.1.0 - version: 13.1.0 + specifier: 12.17.4 + version: 12.17.4 cypress-log-to-output: specifier: 1.1.2 version: 1.1.2 @@ -2014,8 +2014,8 @@ packages: postcss-selector-parser: 6.0.13 dev: true - /@cypress/request@3.0.1: - resolution: {integrity: sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==} + /@cypress/request@2.88.12: + resolution: {integrity: sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA==} engines: {node: '>= 6'} dependencies: aws-sign2: 0.7.0 @@ -2989,7 +2989,7 @@ packages: tslib: 2.6.2 dev: false - /@testing-library/cypress@10.0.1(cypress@13.1.0): + /@testing-library/cypress@10.0.1(cypress@12.17.4): resolution: {integrity: sha512-e8uswjTZIBhaIXjzEcrQQ8nHRWHgZH7XBxKuIWxZ/T7FxfWhCR48nFhUX5nfPizjVOKSThEfOSv67jquc1ASkw==} engines: {node: '>=12', npm: '>=6'} peerDependencies: @@ -2997,7 +2997,7 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@testing-library/dom': 9.3.3 - cypress: 13.1.0 + cypress: 12.17.4 dev: true /@testing-library/dom@8.20.1: @@ -3454,7 +3454,7 @@ packages: resolution: {integrity: sha512-CHzgNU3qYBnp/O4S3yv2tXPlvMTq0YWSTVg2/JYLqWZGHwwgJGAwd00poay/11asPq8wLFwHzubyInqHIFmmiw==} requiresBuild: true dependencies: - '@types/node': 16.18.54 + '@types/node': 20.7.1 dev: true optional: true @@ -5903,13 +5903,13 @@ packages: - utf-8-validate dev: true - /cypress@13.1.0: - resolution: {integrity: sha512-LUKxCYlB973QBFls1Up4FAE9QIYobT+2I8NvvAwMfQS2YwsWbr6yx7y9hmsk97iqbHkKwZW3MRjoK1RToBFVdQ==} - engines: {node: ^16.0.0 || ^18.0.0 || >=20.0.0} + /cypress@12.17.4: + resolution: {integrity: sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ==} + engines: {node: ^14.0.0 || ^16.0.0 || >=18.0.0} hasBin: true requiresBuild: true dependencies: - '@cypress/request': 3.0.1 + '@cypress/request': 2.88.12 '@cypress/xvfb': 1.2.4(supports-color@8.1.1) '@types/node': 16.18.54 '@types/sinonjs__fake-timers': 8.1.1 @@ -6253,6 +6253,7 @@ packages: /delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} + requiresBuild: true /delegate@3.2.0: resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==} @@ -13323,6 +13324,7 @@ packages: /psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} + requiresBuild: true /pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} @@ -13362,6 +13364,7 @@ packages: /querystringify@2.2.0: resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} + requiresBuild: true /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -16198,6 +16201,7 @@ packages: /universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} + requiresBuild: true /universalify@2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} @@ -16257,6 +16261,7 @@ packages: /url-parse@1.5.10: resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + requiresBuild: true dependencies: querystringify: 2.2.0 requires-port: 1.0.0