From abd0ac2fabff0427dd887ac5160f46a6e37442df Mon Sep 17 00:00:00 2001 From: Sophia Date: Wed, 10 Jul 2024 10:08:31 -0400 Subject: [PATCH] Upgrade synpress (#2176) * Upgrade synpress * Fix tests * Update to PR template --- PULL_REQUEST_TEMPLATE.md | 5 +---- centrifuge-app/package.json | 2 +- centrifuge-app/tests/e2e/specs/invest.cy.ts | 11 +++-------- yarn.lock | 10 +++++----- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 27ef5d3ef8..6fd63f7b47 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -8,16 +8,13 @@ This pull request... -Closes # +# ### Approvals - [ ] Dev -- [ ] Dev -- [ ] Designer -- [ ] Product ### Screenshots diff --git a/centrifuge-app/package.json b/centrifuge-app/package.json index 89ee8193fb..15b5718663 100644 --- a/centrifuge-app/package.json +++ b/centrifuge-app/package.json @@ -56,7 +56,7 @@ "vitest": "^1.2.1" }, "devDependencies": { - "@synthetixio/synpress": "^3.7.2-beta.9", + "@synthetixio/synpress": "^3.7.3", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", "@types/react-helmet-async": "^1.0.3", diff --git a/centrifuge-app/tests/e2e/specs/invest.cy.ts b/centrifuge-app/tests/e2e/specs/invest.cy.ts index 1eb179129e..009831d865 100644 --- a/centrifuge-app/tests/e2e/specs/invest.cy.ts +++ b/centrifuge-app/tests/e2e/specs/invest.cy.ts @@ -2,14 +2,13 @@ import pool from '../data/pool.json' describe('Invest flows', () => { before(() => { - cy.renameMetamaskAccount('Pool Admin') // rename account to Pool Admin + cy.renameMetamaskAccount('Pool Admin') cy.switchMetamaskAccount('Account 1') - cy.renameMetamaskAccount('Investor') // rename account to Investor + cy.renameMetamaskAccount('Investor') }) it('Pool Admin: Transfer DEVEL (fund investor)', () => { cy.visit('/portfolio', { failOnStatusCode: false }) cy.connectWallet({ init: true }) // init true to accept metamask connection, only required in first test case - cy.switchMetamaskAccount('Investor') // switch to investor account to grab address cy.get('a[href="/portfolio?send=DEVEL"]').click() cy.getMetamaskWalletAddress().then((address) => { cy.get('input[name="recipientAddress"]').type(address) @@ -34,19 +33,16 @@ describe('Invest flows', () => { cy.confirmTransaction() }) it('Pool Admin: Whitelist an investor wallet', () => { - cy.switchMetamaskAccount('Pool Admin') cy.visit('/pools', { failOnStatusCode: false }) cy.connectWallet() cy.contains(pool.name).click() // issuer pool link cy.contains('Investors').click() cy.switchMetamaskAccount('Investor') // switch to investor account to grab address cy.getMetamaskWalletAddress().then((address) => { - cy.switchMetamaskAccount('Pool Admin') cy.get('input[name="investorStatus"]').type(address) }) - cy.switchMetamaskAccount('Pool Admin') // switch back to pool admin account - cy.contains(pool.poolAdmin).should('not.be.true') cy.switchMetamaskAccount('Pool Admin') + cy.contains(pool.poolAdmin).should('not.be.true') cy.get(`button[aria-label='Add ${pool.tranches[0].id} to memberlist']`).click() cy.confirmTransaction() }) @@ -88,7 +84,6 @@ describe('Invest flows', () => { }) it('Investor: Redeem investment', () => { cy.visit('/pools', { failOnStatusCode: false }) - cy.switchMetamaskAccount('Investor') cy.connectWallet() cy.get(`a[aria-label="Go to ${pool.name} details"]`).click() // investor pool link cy.get(`button[aria-label="Invest in ${pool.tranches[0].id}"]`).click() diff --git a/yarn.lock b/yarn.lock index 25b498f4c3..70ebd6279b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1743,7 +1743,7 @@ __metadata: "@styled-system/css": ^5.1.5 "@styled-system/should-forward-prop": ^5.1.5 "@subwallet/wallet-connect": ^0.2.6 - "@synthetixio/synpress": ^3.7.2-beta.9 + "@synthetixio/synpress": ^3.7.3 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 "@types/react-helmet-async": ^1.0.3 @@ -8768,9 +8768,9 @@ __metadata: languageName: node linkType: hard -"@synthetixio/synpress@npm:^3.7.2-beta.9": - version: 3.7.2-beta.10 - resolution: "@synthetixio/synpress@npm:3.7.2-beta.10" +"@synthetixio/synpress@npm:^3.7.3": + version: 3.7.3 + resolution: "@synthetixio/synpress@npm:3.7.3" dependencies: "@cypress/code-coverage": ^3.11.0 "@cypress/webpack-dev-server": ^3.5.2 @@ -8806,7 +8806,7 @@ __metadata: wait-on: ^7.0.1 bin: synpress: synpress.js - checksum: 08c8d1da25b8f6322ff9c8df37aef32c5bf77fb58606418e89de77c6d5a83d5a43e273a664c6a0104789cb2a7f4730f2129e81dba31422cef22b4e654adb7491 + checksum: 1915122344c5e3d554510ddb163f9d8a10657a4de102c5380845d033a27ee59794cc845f621aebf900cbb9af967f01570d1e44caad246432f73acde4fc1e7019 languageName: node linkType: hard