From 8aab8e4b687f7a875d05358a63ae00ee6c5a93e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Dan?= Date: Fri, 5 Jan 2024 15:25:56 +0100 Subject: [PATCH 1/6] feat: add light e2e test and rename former to full --- package-lock.json | 248 +++++++++--------- package.json | 6 +- .../cypress/e2e/{ => full}/step0.cy.ts | 2 +- .../cypress/e2e/{ => full}/step1.cy.ts | 4 +- .../cypress/e2e/{ => full}/step2.cy.ts | 2 +- .../e2e/light/cross-subnet-message.cy.ts | 86 ++++++ packages/frontend/package.json | 7 +- 7 files changed, 221 insertions(+), 134 deletions(-) rename packages/frontend/cypress/e2e/{ => full}/step0.cy.ts (98%) rename packages/frontend/cypress/e2e/{ => full}/step1.cy.ts (98%) rename packages/frontend/cypress/e2e/{ => full}/step2.cy.ts (98%) create mode 100644 packages/frontend/cypress/e2e/light/cross-subnet-message.cy.ts diff --git a/package-lock.json b/package-lock.json index 69b77d7..8bbbaa9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5301,73 +5301,6 @@ "node": ">=10" } }, - "node_modules/@synthetixio/synpress": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@synthetixio/synpress/-/synpress-3.7.1.tgz", - "integrity": "sha512-fU2+niaDgDvR/7NJwTvMA5WPbAt4fu8c4EMhQH1Lgk8OKSmaovL9xXgOscd90KZyHu6FbW8DNnocJKyiZmELEA==", - "dev": true, - "dependencies": { - "@cypress/code-coverage": "^3.10.4", - "@cypress/webpack-dev-server": "^3.4.1", - "@drptbl/gremlins.js": "^2.2.1", - "@foundry-rs/easy-foundryup": "^0.1.3", - "@playwright/test": "^1.33.0", - "@testing-library/cypress": "^9.0.0", - "@testing-library/react": "^14.0.0", - "@types/testing-library__cypress": "^5.0.9", - "@viem/anvil": "^0.0.5", - "app-root-path": "^3.1.0", - "axios": "^1.4.0", - "babel-plugin-istanbul": "^6.1.1", - "babel-plugin-react-generate-property": "^1.1.2", - "babel-plugin-react-remove-properties": "^0.3.0", - "babel-plugin-transform-react-qa-classes": "^1.6.0", - "babel-plugin-transform-react-styled-components-qa": "^2.1.0", - "bytes32": "^0.0.3", - "commander": "^10.0.1", - "cypress": "^12.11.0", - "cypress-wait-until": "^1.7.2", - "debug": "^4.3.4", - "dotenv": "^16.0.3", - "dotenv-parse-variables": "^2.0.0", - "download": "^8.0.0", - "ethers": "^6.3.0", - "etherscan-api": "^10.3.0", - "find-config": "^1.0.0", - "get-port": "^6.1.2", - "node-fetch": "^2.6.1", - "underscore": "^1.13.6", - "viem": "^0.3.17", - "wait-on": "^7.0.1" - }, - "bin": { - "synpress": "synpress.js" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@synthetixio/synpress/node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@synthetixio/synpress/node_modules/get-port": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-6.1.2.tgz", - "integrity": "sha512-BrGGraKm2uPqurfGVj/z97/zv8dPleC6x9JBNRTrDNtCkkRF4rPwrQXFgL7+I+q8QSdU4ntLQX2D7KIxSy8nGw==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@testing-library/cypress": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/@testing-library/cypress/-/cypress-9.0.0.tgz", @@ -20875,7 +20808,7 @@ "web-vitals": "^3.3.1" }, "devDependencies": { - "@synthetixio/synpress": "^3.7.0", + "@synthetixio/synpress": "3.7.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "14.0.0", "@testing-library/user-event": "^14.4.3", @@ -20887,7 +20820,7 @@ "@vitest/coverage-c8": "~0.25.8", "@vitest/coverage-v8": "^0.34.6", "@vitest/ui": "^0.25.8", - "cypress": "^12.13.0", + "cypress": "12.17.1", "env-cmd": "^10.1.0", "eslint": "^8.38.0", "eslint-plugin-react-hooks": "^4.6.0", @@ -20900,6 +20833,52 @@ "vitest": "^0.33.0" } }, + "packages/frontend/node_modules/@synthetixio/synpress": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@synthetixio/synpress/-/synpress-3.7.0.tgz", + "integrity": "sha512-nuINmdDD2N9Yw4atBYuvA5FSrIqdJaFvUkb8y6YFv6DKN8rb1dTAArhHp3oknE0E0rERhQrdDPgxfdzmC1gYjg==", + "dev": true, + "dependencies": { + "@cypress/code-coverage": "^3.10.4", + "@cypress/webpack-dev-server": "^3.4.1", + "@drptbl/gremlins.js": "^2.2.1", + "@foundry-rs/easy-foundryup": "^0.1.3", + "@playwright/test": "^1.33.0", + "@testing-library/cypress": "^9.0.0", + "@testing-library/react": "^14.0.0", + "@types/testing-library__cypress": "^5.0.9", + "@viem/anvil": "^0.0.5", + "app-root-path": "^3.1.0", + "axios": "^1.4.0", + "babel-plugin-istanbul": "^6.1.1", + "babel-plugin-react-generate-property": "^1.1.2", + "babel-plugin-react-remove-properties": "^0.3.0", + "babel-plugin-transform-react-qa-classes": "^1.6.0", + "babel-plugin-transform-react-styled-components-qa": "^2.1.0", + "bytes32": "^0.0.3", + "commander": "^10.0.1", + "cypress": "^12.11.0", + "cypress-wait-until": "^1.7.2", + "debug": "^4.3.4", + "dotenv": "^16.0.3", + "dotenv-parse-variables": "^2.0.0", + "download": "^8.0.0", + "ethers": "^6.3.0", + "etherscan-api": "^10.3.0", + "find-config": "^1.0.0", + "get-port": "^6.1.2", + "node-fetch": "^2.6.1", + "underscore": "^1.13.6", + "viem": "^0.3.17", + "wait-on": "^7.0.1" + }, + "bin": { + "synpress": "synpress.js" + }, + "engines": { + "node": ">=14" + } + }, "packages/frontend/node_modules/@types/node": { "version": "18.15.13", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", @@ -20954,6 +20933,27 @@ "ieee754": "^1.2.1" } }, + "packages/frontend/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "packages/frontend/node_modules/get-port": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-6.1.2.tgz", + "integrity": "sha512-BrGGraKm2uPqurfGVj/z97/zv8dPleC6x9JBNRTrDNtCkkRF4rPwrQXFgL7+I+q8QSdU4ntLQX2D7KIxSy8nGw==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "packages/frontend/node_modules/magic-string": { "version": "0.30.1", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.1.tgz", @@ -24770,60 +24770,6 @@ "dev": true, "optional": true }, - "@synthetixio/synpress": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@synthetixio/synpress/-/synpress-3.7.1.tgz", - "integrity": "sha512-fU2+niaDgDvR/7NJwTvMA5WPbAt4fu8c4EMhQH1Lgk8OKSmaovL9xXgOscd90KZyHu6FbW8DNnocJKyiZmELEA==", - "dev": true, - "requires": { - "@cypress/code-coverage": "^3.10.4", - "@cypress/webpack-dev-server": "^3.4.1", - "@drptbl/gremlins.js": "^2.2.1", - "@foundry-rs/easy-foundryup": "^0.1.3", - "@playwright/test": "^1.33.0", - "@testing-library/cypress": "^9.0.0", - "@testing-library/react": "^14.0.0", - "@types/testing-library__cypress": "^5.0.9", - "@viem/anvil": "^0.0.5", - "app-root-path": "^3.1.0", - "axios": "^1.4.0", - "babel-plugin-istanbul": "^6.1.1", - "babel-plugin-react-generate-property": "^1.1.2", - "babel-plugin-react-remove-properties": "^0.3.0", - "babel-plugin-transform-react-qa-classes": "^1.6.0", - "babel-plugin-transform-react-styled-components-qa": "^2.1.0", - "bytes32": "^0.0.3", - "commander": "^10.0.1", - "cypress": "^12.11.0", - "cypress-wait-until": "^1.7.2", - "debug": "^4.3.4", - "dotenv": "^16.0.3", - "dotenv-parse-variables": "^2.0.0", - "download": "^8.0.0", - "ethers": "^6.3.0", - "etherscan-api": "^10.3.0", - "find-config": "^1.0.0", - "get-port": "^6.1.2", - "node-fetch": "^2.6.1", - "underscore": "^1.13.6", - "viem": "^0.3.17", - "wait-on": "^7.0.1" - }, - "dependencies": { - "commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true - }, - "get-port": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-6.1.2.tgz", - "integrity": "sha512-BrGGraKm2uPqurfGVj/z97/zv8dPleC6x9JBNRTrDNtCkkRF4rPwrQXFgL7+I+q8QSdU4ntLQX2D7KIxSy8nGw==", - "dev": true - } - } - }, "@testing-library/cypress": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/@testing-library/cypress/-/cypress-9.0.0.tgz", @@ -29882,7 +29828,7 @@ "@opentelemetry/exporter-trace-otlp-proto": "^0.45.0", "@opentelemetry/sdk-metrics": "^1.17.1", "@opentelemetry/sdk-trace-web": "^1.17.1", - "@synthetixio/synpress": "^3.7.0", + "@synthetixio/synpress": "3.7.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "14.0.0", "@testing-library/user-event": "^14.4.3", @@ -29900,7 +29846,7 @@ "axios": "^1.0.0", "buffer": "^6.0.3", "bull": "^4.10.4", - "cypress": "^12.13.0", + "cypress": "12.17.1", "env-cmd": "^10.1.0", "eslint": "^8.38.0", "eslint-plugin-react-hooks": "^4.6.0", @@ -29923,6 +29869,46 @@ "web-vitals": "^3.3.1" }, "dependencies": { + "@synthetixio/synpress": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@synthetixio/synpress/-/synpress-3.7.0.tgz", + "integrity": "sha512-nuINmdDD2N9Yw4atBYuvA5FSrIqdJaFvUkb8y6YFv6DKN8rb1dTAArhHp3oknE0E0rERhQrdDPgxfdzmC1gYjg==", + "dev": true, + "requires": { + "@cypress/code-coverage": "^3.10.4", + "@cypress/webpack-dev-server": "^3.4.1", + "@drptbl/gremlins.js": "^2.2.1", + "@foundry-rs/easy-foundryup": "^0.1.3", + "@playwright/test": "^1.33.0", + "@testing-library/cypress": "^9.0.0", + "@testing-library/react": "^14.0.0", + "@types/testing-library__cypress": "^5.0.9", + "@viem/anvil": "^0.0.5", + "app-root-path": "^3.1.0", + "axios": "^1.4.0", + "babel-plugin-istanbul": "^6.1.1", + "babel-plugin-react-generate-property": "^1.1.2", + "babel-plugin-react-remove-properties": "^0.3.0", + "babel-plugin-transform-react-qa-classes": "^1.6.0", + "babel-plugin-transform-react-styled-components-qa": "^2.1.0", + "bytes32": "^0.0.3", + "commander": "^10.0.1", + "cypress": "^12.11.0", + "cypress-wait-until": "^1.7.2", + "debug": "^4.3.4", + "dotenv": "^16.0.3", + "dotenv-parse-variables": "^2.0.0", + "download": "^8.0.0", + "ethers": "^6.3.0", + "etherscan-api": "^10.3.0", + "find-config": "^1.0.0", + "get-port": "^6.1.2", + "node-fetch": "^2.6.1", + "underscore": "^1.13.6", + "viem": "^0.3.17", + "wait-on": "^7.0.1" + } + }, "@types/node": { "version": "18.15.13", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", @@ -29957,6 +29943,18 @@ "ieee754": "^1.2.1" } }, + "commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true + }, + "get-port": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-6.1.2.tgz", + "integrity": "sha512-BrGGraKm2uPqurfGVj/z97/zv8dPleC6x9JBNRTrDNtCkkRF4rPwrQXFgL7+I+q8QSdU4ntLQX2D7KIxSy8nGw==", + "dev": true + }, "magic-string": { "version": "0.30.1", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.1.tgz", diff --git a/package.json b/package.json index e3f8129..57745f9 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,10 @@ "frontend:start": "npm run start --workspace=frontend", "frontend:test": "npm run test --workspace=frontend", "frontend:test:coverage": "npm run test:coverage --workspace=frontend", - "frontend:test:e2e": "npm run test:e2e --workspace=frontend", - "test:e2e": "start-server-and-test 'npm run backend:start' http-get://localhost:3001 'npm run frontend:test:e2e'" + "frontend:test:e2e:full": "npm run test:e2e:full --workspace=frontend", + "frontend:test:e2e:light": "npm run test:e2e:light --workspace=frontend", + "test:e2e:full": "start-server-and-test 'npm run backend:start' http-get://localhost:3001 'npm run frontend:test:e2e:full'", + "test:e2e:light": "start-server-and-test 'npm run backend:start' http-get://localhost:3001 'npm run frontend:test:e2e:light'" }, "workspaces": [ "packages/*" diff --git a/packages/frontend/cypress/e2e/step0.cy.ts b/packages/frontend/cypress/e2e/full/step0.cy.ts similarity index 98% rename from packages/frontend/cypress/e2e/step0.cy.ts rename to packages/frontend/cypress/e2e/full/step0.cy.ts index 8c74d5b..887cd26 100644 --- a/packages/frontend/cypress/e2e/step0.cy.ts +++ b/packages/frontend/cypress/e2e/full/step0.cy.ts @@ -1,4 +1,4 @@ -import { ERROR, INFO } from '../../src/constants/wordings' +import { ERROR, INFO } from '../../../src/constants/wordings' describe('Multistep form step-0 without MetaMask connect', () => { beforeEach(() => { diff --git a/packages/frontend/cypress/e2e/step1.cy.ts b/packages/frontend/cypress/e2e/full/step1.cy.ts similarity index 98% rename from packages/frontend/cypress/e2e/step1.cy.ts rename to packages/frontend/cypress/e2e/full/step1.cy.ts index 45a8784..f659b3d 100644 --- a/packages/frontend/cypress/e2e/step1.cy.ts +++ b/packages/frontend/cypress/e2e/full/step1.cy.ts @@ -2,8 +2,8 @@ import { DEFAULT_TOKEN_CAP, DEFAULT_TOKEN_DAILY_MINT_LIMIT, DEFAULT_TOKEN_SUPPLY, -} from '../../src/constants/defaults' -import { ERROR, SUCCESS } from '../../src/constants/wordings' +} from '../../../src/constants/defaults' +import { ERROR, SUCCESS } from '../../../src/constants/wordings' describe('Multistep form step-1 with Topos', () => { before(() => { diff --git a/packages/frontend/cypress/e2e/step2.cy.ts b/packages/frontend/cypress/e2e/full/step2.cy.ts similarity index 98% rename from packages/frontend/cypress/e2e/step2.cy.ts rename to packages/frontend/cypress/e2e/full/step2.cy.ts index 34dc45e..4aa03b8 100644 --- a/packages/frontend/cypress/e2e/step2.cy.ts +++ b/packages/frontend/cypress/e2e/full/step2.cy.ts @@ -1,4 +1,4 @@ -import { shortenAddress } from '../../src/utils' +import { shortenAddress } from '../../../src/utils' describe('Multistep form step-2', () => { before(() => { diff --git a/packages/frontend/cypress/e2e/light/cross-subnet-message.cy.ts b/packages/frontend/cypress/e2e/light/cross-subnet-message.cy.ts new file mode 100644 index 0000000..934a5c2 --- /dev/null +++ b/packages/frontend/cypress/e2e/light/cross-subnet-message.cy.ts @@ -0,0 +1,86 @@ +import { SUCCESS } from '../../../src/constants/wordings' + +describe('Cross-subnet Message', () => { + it('should be able to send TST from Incal to Topos', () => { + cy.visit('/') + cy.wait(500) + cy.get('#connectButton').click() + cy.acceptMetamaskAccess() + + // Register TST on Topos + cy.get('#sendingSubnet').click() + cy.get('.ant-select-item-option-content').contains('Topos').click() + cy.allowMetamaskToAddAndSwitchNetwork() + cy.get('#nextButton').click() + cy.get('#token').click() + cy.wait(500) + cy.get('#registerTokenButton').click() + cy.wait(500) + cy.get('#form_in_modal_name').type('Test') + cy.get('#form_in_modal_symbol').type('TST') + cy.wait(500) + cy.get('#registerButton').click() + cy.confirmMetamaskTransaction() + cy.get('.ant-message-notice-success') + .contains(SUCCESS.REGISTERED_TOKEN) + .should('be.visible') + + // Register TST on Incal + cy.visit('/') + cy.wait(500) + cy.get('#sendingSubnet').click() + cy.get('.ant-select-item-option-content').contains('Incal').click() + cy.allowMetamaskToAddAndSwitchNetwork() + cy.get('#nextButton').click() + cy.get('#token').click() + cy.wait(500) + cy.get('#registerTokenButton').click() + cy.wait(500) + cy.get('#form_in_modal_name').type('Test') + cy.get('#form_in_modal_symbol').type('TST') + cy.wait(500) + cy.get('#registerButton').click() + cy.confirmMetamaskTransaction() + cy.get('.ant-message-notice-success') + .contains(SUCCESS.REGISTERED_TOKEN) + .should('be.visible') + + // Send TST + cy.wait(500) + cy.get('#token').click() + cy.get('#token_list') + .parent() + .find('.ant-select-item-option-content') + .contains('TST') + .click() + cy.get('#receivingSubnet').click() + cy.wait(500) + cy.get('#receivingSubnet_list') + .parent() + .find('.ant-select-item-option-content') + .contains('Topos') + .click() + cy.get('#recipientAddress').type( + '0x4aab25b4fad0beaac466050f3a7142a502f4cf0a' + ) + cy.get('#amount').type('1') + cy.get('#nextButton').click() + + // Checks + cy.get('#executeStep0').find('.ant-spin').should('be.visible') + cy.get('#executeStep1').find('.ant-spin').should('not.exist') + cy.get('#executeStep2').find('.ant-spin').should('not.exist') + cy.confirmMetamaskPermissionToSpend('1') + cy.get('#executeStep1').find('.ant-spin').should('be.visible') + cy.get('#executeStep0').find('.ant-spin').should('not.exist') + cy.get('#executeStep2').find('.ant-spin').should('not.exist') + cy.confirmMetamaskTransaction() + cy.get('#executeStep2').find('.ant-spin').should('be.visible') + cy.get('#executeStep0').find('.ant-spin').should('not.exist') + cy.get('#executeStep1').find('.ant-spin').should('not.exist') + cy.get('.ant-result-success', { timeout: 60000 }) + .find('.ant-result-subtitle') + .should('be.visible') + .and('have.text', 'Transaction was submitted on Topos') + }) +}) diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 4dc1f42..da0c891 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -10,7 +10,8 @@ "start": "tsc && vite build --mode development --watch --sourcemap true", "test": "vitest", "test:coverage": "vitest run --coverage", - "test:e2e": "env-cmd --silent cypress run --browser chrome --headed" + "test:e2e:full": "env-cmd --silent cypress run --browser chrome --headed --spec cypress/e2e/full/*", + "test:e2e:light": "env-cmd --silent cypress run --browser chrome --headed --spec cypress/e2e/light/*" }, "dependencies": { "@ant-design/icons": "^5.0.1", @@ -45,7 +46,7 @@ "web-vitals": "^3.3.1" }, "devDependencies": { - "@synthetixio/synpress": "^3.7.0", + "@synthetixio/synpress": "3.7.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "14.0.0", "@testing-library/user-event": "^14.4.3", @@ -57,7 +58,7 @@ "@vitest/coverage-c8": "~0.25.8", "@vitest/coverage-v8": "^0.34.6", "@vitest/ui": "^0.25.8", - "cypress": "^12.13.0", + "cypress": "12.17.1", "env-cmd": "^10.1.0", "eslint": "^8.38.0", "eslint-plugin-react-hooks": "^4.6.0", From d5b48ceda8a6ba1817e68e06f6eeb31be53e4fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Dan?= Date: Fri, 5 Jan 2024 18:39:05 +0100 Subject: [PATCH 2/6] feat: trigger new typed frontend e2e tests --- .github/workflows/test.yml | 4 ++-- docker-compose.ci.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93763ab..2a0221c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -62,6 +62,6 @@ jobs: repo: e2e-tests github_token: ${{ secrets.ROBOT_PAT_TRIGGER_E2E_WORKFLOWS }} workflow_file_name: frontend:erc20-messaging.yml - ref: main + ref: seb/too-411 wait_interval: 60 - client_payload: '{ "dapp-frontend-erc20-messaging-ref": "${{ github.head_ref }}" }' + client_payload: '{ "dapp-frontend-erc20-messaging-ref": "${{ github.head_ref }}", "e2e-test-type": "light" }' diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index 75cbc2e..cec4b68 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -29,7 +29,7 @@ services: entrypoint: [] working_dir: /app command: > - bash -c 'echo -n "======> local noVNC URL: http://localhost:8080/vnc.html?autoconnect=true " && echo -n "======> remote noVNC URL: " && npm run test:e2e' + bash -c 'echo -n "======> local noVNC URL: http://localhost:8080/vnc.html?autoconnect=true " && echo -n "======> remote noVNC URL: " && npm run test:e2e:${E2E_TEST_TYPE}' depends_on: - display - video From 5196dc5f14ca8fca0dcd230e7076a71e0eada660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Dan?= Date: Fri, 5 Jan 2024 18:56:12 +0100 Subject: [PATCH 3/6] test: test full e2e tests --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a0221c..9d6411a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -64,4 +64,4 @@ jobs: workflow_file_name: frontend:erc20-messaging.yml ref: seb/too-411 wait_interval: 60 - client_payload: '{ "dapp-frontend-erc20-messaging-ref": "${{ github.head_ref }}", "e2e-test-type": "light" }' + client_payload: '{ "dapp-frontend-erc20-messaging-ref": "${{ github.head_ref }}", "e2e-test-type": "full" }' From a24ba225cc419db9a7ff5d8ed331c38110fa7a75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Dan?= Date: Mon, 8 Jan 2024 11:10:40 +0100 Subject: [PATCH 4/6] chore: re-set main as the target e2e-test branch --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9d6411a..f02904c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -62,6 +62,6 @@ jobs: repo: e2e-tests github_token: ${{ secrets.ROBOT_PAT_TRIGGER_E2E_WORKFLOWS }} workflow_file_name: frontend:erc20-messaging.yml - ref: seb/too-411 + ref: main wait_interval: 60 client_payload: '{ "dapp-frontend-erc20-messaging-ref": "${{ github.head_ref }}", "e2e-test-type": "full" }' From 8f11a3ab28f6e6195a235c704975e2f02c8bd9b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Dan?= Date: Mon, 8 Jan 2024 14:51:40 +0100 Subject: [PATCH 5/6] chore: comment the json bigint fix --- packages/frontend/src/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/frontend/src/index.tsx b/packages/frontend/src/index.tsx index 1aa2a9a..8bf1b18 100644 --- a/packages/frontend/src/index.tsx +++ b/packages/frontend/src/index.tsx @@ -7,6 +7,7 @@ import App from './App' import reportWebVitals from './reportWebVitals' import './telemetry' +// Allow for JSON.stringify for objects containing bigints Object.defineProperty(BigInt.prototype, 'toJSON', { get() { 'use strict' From 05f3938863d781d2658f3b3b7f9a8bff07e1a716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Dan?= Date: Mon, 8 Jan 2024 14:57:44 +0100 Subject: [PATCH 6/6] chore: use latest contracts version --- package-lock.json | 16 ++++++++-------- packages/frontend/package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8bbbaa9..adb2078 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5496,9 +5496,9 @@ } }, "node_modules/@topos-protocol/topos-smart-contracts": { - "version": "3.1.0-rc2", - "resolved": "https://registry.npmjs.org/@topos-protocol/topos-smart-contracts/-/topos-smart-contracts-3.1.0-rc2.tgz", - "integrity": "sha512-3839jo+jVMkwxgnlHFSduI78B5YzVDN+CCCd09lcxCrISsrRQJdmbsAlLYTWAc8TPwY/76HuKAP6KIGGw3g8bg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@topos-protocol/topos-smart-contracts/-/topos-smart-contracts-3.1.0.tgz", + "integrity": "sha512-BArgSSaRzOZ2T8qmKKu+T4TZVlAmX/iy12dP6lw7j5m9GDlejqTJZx9L24KVddnFk5IpluY+jD6QA5CuKiccUA==", "dependencies": { "@openzeppelin/contracts": "^4.8.3", "ethers": "^6.9.0", @@ -20790,7 +20790,7 @@ "@opentelemetry/exporter-trace-otlp-proto": "^0.45.0", "@opentelemetry/sdk-metrics": "^1.17.1", "@opentelemetry/sdk-trace-web": "^1.17.1", - "@topos-protocol/topos-smart-contracts": "^3.1.0-rc1", + "@topos-protocol/topos-smart-contracts": "^3.1.0", "@types/event-source-polyfill": "^1.0.1", "antd": "^5.4.0", "axios": "^1.0.0", @@ -24916,9 +24916,9 @@ "dev": true }, "@topos-protocol/topos-smart-contracts": { - "version": "3.1.0-rc2", - "resolved": "https://registry.npmjs.org/@topos-protocol/topos-smart-contracts/-/topos-smart-contracts-3.1.0-rc2.tgz", - "integrity": "sha512-3839jo+jVMkwxgnlHFSduI78B5YzVDN+CCCd09lcxCrISsrRQJdmbsAlLYTWAc8TPwY/76HuKAP6KIGGw3g8bg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@topos-protocol/topos-smart-contracts/-/topos-smart-contracts-3.1.0.tgz", + "integrity": "sha512-BArgSSaRzOZ2T8qmKKu+T4TZVlAmX/iy12dP6lw7j5m9GDlejqTJZx9L24KVddnFk5IpluY+jD6QA5CuKiccUA==", "requires": { "@openzeppelin/contracts": "^4.8.3", "ethers": "^6.9.0", @@ -29832,7 +29832,7 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "14.0.0", "@testing-library/user-event": "^14.4.3", - "@topos-protocol/topos-smart-contracts": "^3.1.0-rc1", + "@topos-protocol/topos-smart-contracts": "^3.1.0", "@types/event-source-polyfill": "^1.0.1", "@types/react": "^18.0.28", "@types/react-dom": "^18.0.11", diff --git a/packages/frontend/package.json b/packages/frontend/package.json index da0c891..81399b9 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -28,7 +28,7 @@ "@opentelemetry/exporter-trace-otlp-proto": "^0.45.0", "@opentelemetry/sdk-metrics": "^1.17.1", "@opentelemetry/sdk-trace-web": "^1.17.1", - "@topos-protocol/topos-smart-contracts": "^3.1.0-rc1", + "@topos-protocol/topos-smart-contracts": "^3.1.0", "@types/event-source-polyfill": "^1.0.1", "antd": "^5.4.0", "axios": "^1.0.0",