From 0420886e3e87015e96652d8b1db00e88f9ccc591 Mon Sep 17 00:00:00 2001 From: Elvijs Dzirkals <77115130+elvijsTDL@users.noreply.github.com> Date: Tue, 12 Sep 2023 09:54:18 +0200 Subject: [PATCH] Bump up code coverage (#671) * WIP coverage tests * Finish up code coverage 88% * Change vijays address * Upgrade cypress * Downgrade back to Cypress 12 --- package.json | 1 + .../AddressSearchDialog.tsx | 4 +- .../FlowUpdatedActivityRow.tsx | 1 + src/features/common/CopyBtn.tsx | 1 + src/features/minigame/MinigameContainer.tsx | 1 + src/features/onboarding/OnboardingCards.tsx | 7 + src/features/theme/ThemeChanger.tsx | 2 +- src/features/tokenPrice/FiatAmount.tsx | 4 +- src/features/wallet/AccountModal.tsx | 2 + src/features/wallet/ConnectWallet.tsx | 2 +- .../fixtures/activityHistoryEvents.json | 270 +++++++++++++++++- tests/cypress/fixtures/addressBookImport.csv | 2 +- tests/cypress/fixtures/commonData.json | 4 +- .../fixtures/ensAndLensAvatarUrls.json | 4 + .../cypress/integration/ActivityPage.feature | 69 +++-- tests/cypress/integration/AddressBook.feature | 39 ++- tests/cypress/integration/BridgePage.feature | 17 +- tests/cypress/integration/Common.feature | 100 +++++++ .../cypress/integration/DashboardPage.feature | 9 + tests/cypress/integration/ExportPage.feature | 20 +- .../integration/IndividualTokenPage.feature | 6 + tests/cypress/integration/SendPage.feature | 2 +- tests/cypress/integration/VestingPage.feature | 4 + .../cypress/pageObjects/pages/ActivityPage.ts | 76 +++-- .../pageObjects/pages/AddressBookPage.ts | 21 +- tests/cypress/pageObjects/pages/BridgePage.ts | 17 +- tests/cypress/pageObjects/pages/Common.ts | 206 +++++++++++-- .../pageObjects/pages/DashboardPage.ts | 2 +- tests/cypress/pageObjects/pages/SendPage.ts | 7 + tests/cypress/support/e2e.js | 1 + .../step_definitions/ActivityPageSteps.ts | 16 +- .../step_definitions/AddressBookSteps.ts | 24 ++ .../step_definitions/BridgePageSteps.ts | 7 +- .../support/step_definitions/CommonSteps.ts | 100 ++++++- tests/package.json | 12 +- tests/tsconfig.json | 2 +- tests/yarn.lock | 73 +++-- 37 files changed, 999 insertions(+), 136 deletions(-) create mode 100644 tests/cypress/fixtures/ensAndLensAvatarUrls.json diff --git a/package.json b/package.json index 98f74ca8..26cae264 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "start": "npx serve@latest out", "lint": "next lint", "coverage:build": "rm -rf tests/coverage tests/.nyc_output && INSTRUMENT_CODE=1 yarn build && yarn start", + "coverage:dev": "rm -rf tests/coverage tests/.nyc_output && INSTRUMENT_CODE=1 yarn dev", "coverage:test": "cd tests && yarn cypress run --env network=polygon-mumbai,dev=false,coverage=true", "post-update": "echo \"codesandbox preview only, need an update\" && yarn upgrade --latest", "generate": "npm-run-all -s generate:*", diff --git a/src/components/AddressSearchDialog/AddressSearchDialog.tsx b/src/components/AddressSearchDialog/AddressSearchDialog.tsx index d733a4ec..6d09716f 100644 --- a/src/components/AddressSearchDialog/AddressSearchDialog.tsx +++ b/src/components/AddressSearchDialog/AddressSearchDialog.tsx @@ -337,7 +337,7 @@ export const AddressSearchDialogContent: FC = ({ )} {ensQuery.isError && ( - + )} {!ensQuery.isLoading && @@ -371,7 +371,7 @@ export const AddressSearchDialogContent: FC = ({ )} {lensQuery.isError && ( - + )} {!lensQuery.isLoading && diff --git a/src/features/activityHistory/FlowUpdatedActivityRow.tsx b/src/features/activityHistory/FlowUpdatedActivityRow.tsx index a690794b..34bd5ea7 100644 --- a/src/features/activityHistory/FlowUpdatedActivityRow.tsx +++ b/src/features/activityHistory/FlowUpdatedActivityRow.tsx @@ -211,6 +211,7 @@ const FlowUpdatedActivityRow: FC = ({ secondary={ = ({ label, copyText, ButtonProps = {} }) => { return ( diff --git a/src/features/wallet/ConnectWallet.tsx b/src/features/wallet/ConnectWallet.tsx index 1e3d7230..31c4dc79 100644 --- a/src/features/wallet/ConnectWallet.tsx +++ b/src/features/wallet/ConnectWallet.tsx @@ -37,7 +37,7 @@ const AccountInfo: FC = ({ onClick, stopImpersonation, }) => ( - + diff --git a/tests/cypress/fixtures/activityHistoryEvents.json b/tests/cypress/fixtures/activityHistoryEvents.json index 01f37076..101bbc33 100644 --- a/tests/cypress/fixtures/activityHistoryEvents.json +++ b/tests/cypress/fixtures/activityHistoryEvents.json @@ -1,5 +1,5 @@ { - "Subscription Approved": [ + "Subscription Approved/Publisher": [ { "id": "IndexSubscribed-0x5101deaeb337fbb4419abfa12acbb3232469636bf6892f59632e59f81f5e57ba-96", "blockNumber": "8098797", @@ -19,6 +19,26 @@ "logIndex": "96" } ], + "Subscription Approved/Subscriber": [ + { + "id": "IndexSubscribed-0x5101deaeb337fbb4419abfa12acbb3232469636bf6892f59632e59f81f5e57ba-96", + "blockNumber": "8098797", + "transactionHash": "testTransactionHash", + "timestamp": "1670515272", + "userData": "0x", + "token": "0xA794221D92d77490Ff319e95dA1461bdF2bd3953", + "subscriber": "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9", + "publisher": "0x8ac9C6D444D12d20BC96786243Abaae8960D27e2", + "indexId": "0", + "index": { + "id": "0x9be85a79d847dfa90584f3fd40cc1f6d4026e2b9-0x8ae68021f6170e5a766be613cea0d75236ecca9a-0" + }, + "__typename": "IndexSubscribedEvent", + "gasPrice": "8438902216", + "order": "80987970096", + "logIndex": "96" + } + ], "Index Created": [ { "id": "IndexCreated-0x9d898d753a28da8c8b63853f0f3eed456a0f3a8a3cee362a81777787675d6969-113", @@ -38,7 +58,7 @@ "logIndex": "113" } ], - "Subscription Rejected": [ + "Subscription Rejected/Publisher": [ { "id": "IndexUnsubscribed-0xdf815667ba29210b8f0a680e40c78af6dd06c40a76630877e1ecbe5731af9cd3-26", "blockNumber": "8133289", @@ -58,6 +78,26 @@ "logIndex": "26" } ], + "Subscription Rejected/Subscriber": [ + { + "id": "IndexUnsubscribed-0xdf815667ba29210b8f0a680e40c78af6dd06c40a76630877e1ecbe5731af9cd3-26", + "blockNumber": "8133289", + "transactionHash": "testTransactionHash", + "timestamp": "1671018636", + "userData": "0x", + "token": "0xA794221D92d77490Ff319e95dA1461bdF2bd3953", + "subscriber": "0x9be85a79d847dfa90584f3fd40cc1f6d4026e2b9", + "publisher": "0x8ac9C6D444D12d20BC96786243Abaae8960D27e2", + "indexId": "0", + "index": { + "id": "0x9be85a79d847dfa90584f3fd40cc1f6d4026e2b9-0xf2d68898557ccb2cf4c10c3ef2b034b2a69dad00-0" + }, + "__typename": "IndexUnsubscribedEvent", + "gasPrice": "1500847527", + "order": "81332890026", + "logIndex": "26" + } + ], "Wrap": [ { "id": "TokenUpgraded-0x49cd0509f4a0e405caa0a49f9e7ead2292dc18497381bfa5fb2a0b2e90d7af5d-5", @@ -257,7 +297,7 @@ "logIndex": "363" } ], - "Subscription Updated": [ + "Subscription Updated/Publisher": [ { "id": "IndexUnitsUpdated-0xefb78083cc2c9a713839603714f84c5287cbef4ddd1ddcce80317d6038ba8494-55", "blockNumber": "8098739", @@ -279,7 +319,29 @@ "logIndex": "55" } ], - "Liquidated": [ + "Subscription Updated/Subscriber": [ + { + "id": "IndexUnitsUpdated-0xefb78083cc2c9a713839603714f84c5287cbef4ddd1ddcce80317d6038ba8494-55", + "blockNumber": "8098739", + "transactionHash": "testTransactionHash", + "timestamp": "1670514432", + "userData": "0x", + "units": "100", + "token": "0xA794221D92d77490Ff319e95dA1461bdF2bd3953", + "subscriber": "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9", + "publisher": "0x8ac9C6D444D12d20BC96786243Abaae8960D27e2", + "oldUnits": "0", + "indexId": "0", + "index": { + "id": "0x9be85a79d847dfa90584f3fd40cc1f6d4026e2b9-0x8ae68021f6170e5a766be613cea0d75236ecca9a-0" + }, + "__typename": "IndexUnitsUpdatedEvent", + "gasPrice": "8627788913", + "order": "80987390055", + "logIndex": "55" + } + ], + "Liquidated/v2": [ { "id": "FlowUpdated-0x33724545fdbcd6d39148d9092dfd5d85d8955e7dd1cc7f9602d5f76b619135a6-51", "blockNumber": "8777047", @@ -341,7 +403,140 @@ "logIndex": "46" } ], - "Unwrap": [ + "Liquidated/v1": [ + { + "id": "FlowUpdated-0x0003c560dc4a52f026ddb47ec36e859580fdcf4e55b2f6820efa66e1e3b621f7-361", + "blockNumber": "21549169", + "transactionHash": "testTransactionHash", + "timestamp": "1637314878", + "userData": "0x", + "type": 2, + "token": "0x3ad736904e9e65189c3000c7dd2c8ac8bb7cd4e3", + "sender": "0x8ac9C6D444D12d20BC96786243Abaae8960D27e2", + "receiver": "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9", + "flowRate": "0", + "flowOperator": "0x0000000000000000000000000000000000000000", + "deposit": "0", + "stream": { + "id": "0xa8d0de0f67f6250802a0157e1cf6d62d49cdc6e9-0x8dbd0f8b4aa5330c08c26f14371fc0f04bef6036-0x3ad736904e9e65189c3000c7dd2c8ac8bb7cd4e3-0.0" + }, + "__typename": "FlowUpdatedEvent", + "gasPrice": "30000000000", + "order": "215491690361", + "logIndex": "361" + }, + { + "id": "AgreementLiquidatedBy-0x0003c560dc4a52f026ddb47ec36e859580fdcf4e55b2f6820efa66e1e3b621f7-357", + "blockNumber": "21549169", + "transactionHash": "testTransactionHash", + "timestamp": "1637314878", + "token": "0x3ad736904e9e65189c3000c7dd2c8ac8bb7cd4e3", + "rewardAmount": "5553240741145190", + "penaltyAccount": "0xa8d0de0f67f6250802a0157e1cf6d62d49cdc6e9", + "liquidatorAccount": "0x5de6cf966752356f1593a3f529233e7be832f849", + "bondAccount": "0x1eb3faa360bf1f093f5a18d21f21f13d769d044a", + "bailoutAmount": "0", + "agreementId": "0x037ee9d6b4dfcc538e1d23ea9bffe71d6ac746f40a1d35fd079b394fad08934d", + "agreementClass": "0x6eee6060f715257b970700bc2656de21dedf074c", + "__typename": "AgreementLiquidatedByEvent", + "gasPrice": "30000000000", + "order": "215491690357", + "logIndex": "357" + } + ], + "Liquidated/sender": [ + { + "id": "FlowUpdated-0x0003c560dc4a52f026ddb47ec36e859580fdcf4e55b2f6820efa66e1e3b621f7-361", + "blockNumber": "21549169", + "transactionHash": "testTransactionHash", + "timestamp": "1637314878", + "userData": "0x", + "type": 2, + "token": "0x3ad736904e9e65189c3000c7dd2c8ac8bb7cd4e3", + "sender": "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9", + "receiver": "0x8ac9C6D444D12d20BC96786243Abaae8960D27e2", + "flowRate": "0", + "flowOperator": "0x0000000000000000000000000000000000000000", + "deposit": "0", + "stream": { + "id": "0xa8d0de0f67f6250802a0157e1cf6d62d49cdc6e9-0x8dbd0f8b4aa5330c08c26f14371fc0f04bef6036-0x3ad736904e9e65189c3000c7dd2c8ac8bb7cd4e3-0.0" + }, + "__typename": "FlowUpdatedEvent", + "gasPrice": "30000000000", + "order": "215491690361", + "logIndex": "361" + }, + { + "id": "AgreementLiquidatedBy-0x0003c560dc4a52f026ddb47ec36e859580fdcf4e55b2f6820efa66e1e3b621f7-357", + "blockNumber": "21549169", + "transactionHash": "testTransactionHash", + "timestamp": "1637314878", + "token": "0x3ad736904e9e65189c3000c7dd2c8ac8bb7cd4e3", + "rewardAmount": "5553240741145190", + "penaltyAccount": "0xa8d0de0f67f6250802a0157e1cf6d62d49cdc6e9", + "liquidatorAccount": "0x5de6cf966752356f1593a3f529233e7be832f849", + "bondAccount": "0x1eb3faa360bf1f093f5a18d21f21f13d769d044a", + "bailoutAmount": "0", + "agreementId": "0x037ee9d6b4dfcc538e1d23ea9bffe71d6ac746f40a1d35fd079b394fad08934d", + "agreementClass": "0x6eee6060f715257b970700bc2656de21dedf074c", + "__typename": "AgreementLiquidatedByEvent", + "gasPrice": "30000000000", + "order": "215491690357", + "logIndex": "357" + } + ], + "Unwrap/native": [ + { + "id": "TokenDowngraded-0xfe7a84aee1c2efc1484436c2a612e2eb049985b5466babe0f485eeeda867218c-604", + "blockNumber": "46930242", + "transactionHash": "testTransactionHash", + "timestamp": "1693386495", + "token": "0x3ad736904e9e65189c3000c7dd2c8ac8bb7cd4e3", + "amount": "1000000000000000000", + "account": { + "id": "0xf9ce34dfcd3cc92804772f3022af27bcd5e43ff2" + }, + "__typename": "TokenDowngradedEvent", + "gasPrice": "120709447970", + "order": "469302420604", + "logIndex": "604" + }, + { + "id": "Transfer-0xfe7a84aee1c2efc1484436c2a612e2eb049985b5466babe0f485eeeda867218c-602", + "blockNumber": "46930242", + "transactionHash": "testTransactionHash", + "timestamp": "1693386495", + "value": "1000000000000000000", + "token": "0x3ad736904e9e65189c3000c7dd2c8ac8bb7cd4e3", + "to": { + "id": "0x0000000000000000000000000000000000000000" + }, + "from": { + "id": "0xf9ce34dfcd3cc92804772f3022af27bcd5e43ff2" + }, + "__typename": "TransferEvent", + "gasPrice": "120709447970", + "order": "469302420602", + "logIndex": "602" + }, + { + "id": "Burned-0xfe7a84aee1c2efc1484436c2a612e2eb049985b5466babe0f485eeeda867218c-601", + "blockNumber": "46930242", + "transactionHash": "testTransactionHash", + "timestamp": "1693386495", + "operatorData": "0x", + "token": "0x3ad736904e9e65189c3000c7dd2c8ac8bb7cd4e3", + "operator": "0x3ad736904e9e65189c3000c7dd2c8ac8bb7cd4e3", + "from": "0xf9ce34dfcd3cc92804772f3022af27bcd5e43ff2", + "data": "0x", + "amount": "1000000000000000000", + "__typename": "BurnedEvent", + "gasPrice": "120709447970", + "order": "469302420601", + "logIndex": "601" + } + ], + "Unwrap/wrapper": [ { "id": "TokenDowngraded-0x7c4716de779f84e958bbd5b03da605f1ccd8f4d04373366cae5a570956706c7b-93", "blockNumber": "8771692", @@ -392,7 +587,7 @@ "logIndex": "90" } ], - "Send Distribution": [ + "Send Distribution/Publisher": [ { "id": "IndexUpdated-0xa95d00a4b433773f9ddc0e8af4abd1ff00f48876ebdcea5c67faa983d7047367-113", "blockNumber": "26566211", @@ -415,7 +610,30 @@ "logIndex": "113" } ], - "Distribution Claimed": [ + "Send Distribution/Subscriber": [ + { + "id": "IndexUpdated-0xa95d00a4b433773f9ddc0e8af4abd1ff00f48876ebdcea5c67faa983d7047367-113", + "blockNumber": "26566211", + "transactionHash": "testTransactionHash", + "timestamp": "1648704634", + "userData": "0x", + "totalUnitsPending": "420", + "totalUnitsApproved": "69", + "token": "0xA794221D92d77490Ff319e95dA1461bdF2bd3953", + "publisher": "0x8ac9C6D444D12d20BC96786243Abaae8960D27e2", + "oldIndexValue": "0", + "newIndexValue": "1000000000000000000", + "indexId": "1", + "index": { + "id": "0xef2c9e8777648d7dea03b319c64ea53f38ec1398-0x4086ebf75233e8492f1bcda41c7f2a8288c2fb92-1" + }, + "__typename": "IndexUpdatedEvent", + "gasPrice": "60129790195", + "order": "265662110113", + "logIndex": "113" + } + ], + "Distribution Claimed/Publisher": [ { "id": "SubscriptionDistributionClaimed-0x9d1a998dd4a7b2273953da98c3c8e23d361fc6d30429416b6ced6c6b9c4e7d3b-63", "blockNumber": "7420517", @@ -452,5 +670,43 @@ "order": "74205170062", "logIndex": "62" } + ], + "Distribution Claimed/Subscriber": [ + { + "id": "SubscriptionDistributionClaimed-0x9d1a998dd4a7b2273953da98c3c8e23d361fc6d30429416b6ced6c6b9c4e7d3b-63", + "blockNumber": "7420517", + "transactionHash": "testTransactionHash", + "timestamp": "1660730724", + "token": "0xA794221D92d77490Ff319e95dA1461bdF2bd3953", + "subscription": { + "id": "0x6375ce0e3947ab31e2f19c3aa94ca6c23c2422a7-0xe38ffdd2b0b8bb7e93d409f4a282714b18b77980-0x8ae68021f6170e5a766be613cea0d75236ecca9a-69" + }, + "subscriber": "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9", + "publisher": "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9", + "indexId": "69", + "amount": "1000000000000000000", + "__typename": "SubscriptionDistributionClaimedEvent", + "gasPrice": "1500000007", + "order": "74205170063", + "logIndex": "63" + }, + { + "id": "IndexDistributionClaimed-0x9d1a998dd4a7b2273953da98c3c8e23d361fc6d30429416b6ced6c6b9c4e7d3b-62", + "blockNumber": "7420517", + "transactionHash": "testTransactionHash", + "timestamp": "1660730724", + "token": "0xA794221D92d77490Ff319e95dA1461bdF2bd3953", + "subscriber": "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9", + "publisher": "0x8ac9C6D444D12d20BC96786243Abaae8960D27e2", + "indexId": "69", + "index": { + "id": "0xe38ffdd2b0b8bb7e93d409f4a282714b18b77980-0x8ae68021f6170e5a766be613cea0d75236ecca9a-69" + }, + "amount": "1000000000000000000", + "__typename": "IndexDistributionClaimedEvent", + "gasPrice": "1500000007", + "order": "74205170062", + "logIndex": "62" + } ] } diff --git a/tests/cypress/fixtures/addressBookImport.csv b/tests/cypress/fixtures/addressBookImport.csv index e10c5776..fc8bc177 100644 --- a/tests/cypress/fixtures/addressBookImport.csv +++ b/tests/cypress/fixtures/addressBookImport.csv @@ -6,7 +6,7 @@ ADDRESS,NAME,CHAINID 0x9B6157d44134b21D934468B8bf709294cB298aa7,bob, 0x66693Ff26e2036FDf3a5EA6B7FDf853Ca1Adaf4B,alice, 0x8ac9C6D444D12d20BC96786243Abaae8960D27e2,Static Balance Account, -0x7BDa037dFdf9CD9Ad261D27f489924aebbcE71Ac,ENS Test, +0x1dDc50A8b8ef07c654B4ace65070B0E7acfF622B,ENS Test, 0x70fd86d7196813505ca9f9a77ef53Ab06A5ca603,Celo,42220 0x3277Ea3910A354621f144022647082E1E06fDe8a,Goerli,5 0x9Fa707BCCA8B7163da2A30143b70A9b8BE0d0788,Optimism,10 diff --git a/tests/cypress/fixtures/commonData.json b/tests/cypress/fixtures/commonData.json index 8b666add..bc983b1a 100644 --- a/tests/cypress/fixtures/commonData.json +++ b/tests/cypress/fixtures/commonData.json @@ -4,11 +4,11 @@ "accountWithLotsOfData": "0xF9Ce34dFCD3cc92804772F3022AF27bCd5E43Ff2", "goerliDistributionsAccount": "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40", "ENSName": "vijay.eth", - "ENSAddress": "0x7BDa037dFdf9CD9Ad261D27f489924aebbcE71Ac", + "ENSAddress": "0x1dDc50A8b8ef07c654B4ace65070B0E7acfF622B", "alice": "0x66693Ff26e2036FDf3a5EA6B7FDf853Ca1Adaf4B", "bob": "0x9B6157d44134b21D934468B8bf709294cB298aa7", "dan": "0x1F26b0b62F4Eeee9C5E30893401dCe10B03D49A4", "john": "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9", - "vijay.eth": "0x7bda037dfdf9cd9ad261d27f489924aebbce71ac", + "vijay.eth": "0x1dDc50A8b8ef07c654B4ace65070B0E7acfF622B", "elvijs.lens": "0xf9ce34dfcd3cc92804772f3022af27bcd5e43ff2" } diff --git a/tests/cypress/fixtures/ensAndLensAvatarUrls.json b/tests/cypress/fixtures/ensAndLensAvatarUrls.json new file mode 100644 index 00000000..eba7ab34 --- /dev/null +++ b/tests/cypress/fixtures/ensAndLensAvatarUrls.json @@ -0,0 +1,4 @@ +{ + "vijay.eth": "https://ik.imagekit.io/lens/media-snapshot/bae7214d9fb219a33ca6c8c6b831e8594333b5eabb796bcd4115310bb7b49a58.png", + "elvijs.lens": "https://ik.imagekit.io/lens/media-snapshot/e931e302b0667cb1bf0a16d292114ebb3d220cc0bf862af0ad7a78960d2ab1c7.png" +} \ No newline at end of file diff --git a/tests/cypress/integration/ActivityPage.feature b/tests/cypress/integration/ActivityPage.feature index eec30361..ee5ac3ef 100644 --- a/tests/cypress/integration/ActivityPage.feature +++ b/tests/cypress/integration/ActivityPage.feature @@ -6,11 +6,17 @@ Feature: Activity History Page tests Given "Activity History Page" is open using view mode to look at "staticBalanceAccount" Then Mocked activity history entries are visible in this order | Distribution Claimed | + | Distribution Claimed | + | Send Distribution | | Send Distribution | | Unwrap | + | Unwrap | + | Liquidated | + | Liquidated | | Send Transfer | | Liquidated | | Subscription Updated | + | Subscription Updated | | Stream Cancelled | | Stream Updated | | Receive Stream | @@ -19,29 +25,32 @@ Feature: Activity History Page tests | Send Transfer | | Wrap | | Subscription Rejected | + | Subscription Rejected | | Index Created | | Subscription Approved | + | Subscription Approved | Scenario: No activity history message shown Given "Activity history page" is open without connecting a wallet Then No activity history message is shown - @skip Scenario: Enabling and disabling filters Given "Activity History Page" is open using view mode to look at "staticBalanceAccount" - And User changes the activity history filter to 10 months before + And User changes the activity history filter to 25 months before And User closes the dropdown And User opens activity filter - And User clicks on the "Wrap" toggle in the activity filter + And User clicks on the "Wrap / Unwrap" toggle in the activity filter And User closes the dropdown + And No loading skeletons are visible in the page Then No "Wrap" activities are shown in the activity history And User opens activity filter - And User clicks on the "Wrap" toggle in the activity filter + And User clicks on the "Wrap / Unwrap" toggle in the activity filter + And No loading skeletons are visible in the page Then Activity history entries with "Wrap" are visible Scenario: Filtering entries by address Given "Activity History Page" is open using view mode to look at "staticBalanceAccount" - And User changes the activity history filter to 25 months before + And User changes the activity history filter to 24 months before And User closes the dropdown And User searches for "0xF9Ce34dFCD3cc92804772F3022AF27bCd5E43Ff2" as a receiver And User waits for the activity history to load @@ -58,6 +67,16 @@ Feature: Activity History Page tests And User clicks on the "arbitrum-one" toggle Then Activity rows for "arbitrum-one" are visible + Scenario: Copying address from the activity history + Given Activity history request is mocked to "Receive Stream" on "polygon" + + Given "Activity History Page" is open using view mode to look at "staticBalanceAccount" + Then Mocked "Receive Stream" entry on "polygon" is shown in the activity history + And User hover on the first address element in the activity history table + Then The copy tooltip shows "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9" + And User clicks on the shown tooltip + Then The copy tooltip shows "Copied to clipboard!" + @mocked Scenario Outline: shown in the activity history page Given Activity history request is mocked to "" on "polygon" @@ -66,19 +85,27 @@ Feature: Activity History Page tests Then Mocked "" entry on "polygon" is shown in the activity history Examples: - | activity | - | Liquidated | - | Receive Stream | - | Stream Cancelled | - | Send Stream | - | Wrap | - | Unwrap | - | Receive Transfer | - | Send Transfer | - | Stream Updated | - | Subscription Approved | - | Subscription Updated | - | Subscription Rejected | - | Index Created | - | Send Distribution | - | Distribution Claimed | + | activity | + | Liquidated/v1 | + | Liquidated/v2 | + | Liquidated/sender | + | Receive Stream | + | Stream Cancelled | + | Send Stream | + | Wrap | + | Unwrap/wrapper | + | Unwrap/native | + | Receive Transfer | + | Send Transfer | + | Stream Updated | + | Subscription Approved/Publisher | + | Subscription Approved/Subscriber | + | Subscription Updated/Publisher | + | Subscription Updated/Subscriber | + | Subscription Rejected/Publisher | + | Subscription Rejected/Subscriber | + | Index Created | + | Send Distribution/Subscriber | + | Send Distribution/Publisher | + | Distribution Claimed/Publisher | + | Distribution Claimed/Subscriber | diff --git a/tests/cypress/integration/AddressBook.feature b/tests/cypress/integration/AddressBook.feature index 67194a63..fa62dec0 100644 --- a/tests/cypress/integration/AddressBook.feature +++ b/tests/cypress/integration/AddressBook.feature @@ -21,7 +21,7 @@ Feature: Address Book test cases Given "Address book Page" is open without connecting a wallet And User adds "vijay.eth" as "-" on "-" to their address book Then The last address book entry name is "vijay.eth" - And The last saved address is "0x7BDa037dFdf9CD9Ad261D27f489924aebbcE71Ac" + And The last saved address is "0x1dDc50A8b8ef07c654B4ace65070B0E7acfF622B" And ENS name "vijay.eth" is shown by the last saved address book entry Scenario: Adding a new contract address to the address book @@ -29,6 +29,17 @@ Feature: Address Book test cases And User adds "0xF9240F930d847F70ad900aBEE8949F25649Bf24a" as "Testing" on "-" to their address book Then A contract address "0xF9240F930d847F70ad900aBEE8949F25649Bf24a" on "goerli" is saved as "Testing" + Scenario: Copying an address from the address book + Given Address book test data is set up + And "Address book Page" is open without connecting a wallet + And User hovers on the first address in the address book + Then The copy tooltip in address book page shows "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" + And User stops hovering on the first address in the address book + And User hovers on the first address copy button in the address book + Then The copy tooltip in address book page shows "Copy to clipboard" + And User clicks on the first copy button + Then The copy tooltip in address book page shows "Copied!" + Scenario: Importing address book csv Given "Address book Page" is open without connecting a wallet And User imports their address book @@ -132,19 +143,19 @@ Feature: Address Book test cases Then The activity rows address shows up as "john" Examples: - | activity | - | Distribution Claimed | - | Send Transfer | - | Liquidated | - | Subscription Updated | - | Stream Cancelled | - | Stream Updated | - | Receive Stream | - | Receive Transfer | - | Send Stream | - | Send Transfer | - | Subscription Rejected | - | Subscription Approved | + | activity | + | Distribution Claimed/Subscriber | + | Send Transfer | + | Liquidated/v2 | + | Subscription Updated/Subscriber | + | Stream Cancelled | + | Stream Updated | + | Receive Stream | + | Receive Transfer | + | Send Stream | + | Send Transfer | + | Subscription Rejected/Subscriber | + | Subscription Approved/Subscriber | Scenario: Address book name filter Given Address book test data is set up diff --git a/tests/cypress/integration/BridgePage.feature b/tests/cypress/integration/BridgePage.feature index b0108be6..41b1e16f 100644 --- a/tests/cypress/integration/BridgePage.feature +++ b/tests/cypress/integration/BridgePage.feature @@ -1,6 +1,6 @@ -@skip Feature: Bridge page test cases (Li-Fi widget) + @skip Scenario: Routes and connect wallet button showing up for a user without a connected wallet Given "Dashboard page" is open without connecting a wallet And User clicks on the "bridge" navigation button @@ -11,6 +11,7 @@ Feature: Bridge page test cases (Li-Fi widget) And Token swapping route for is correctly shown And Connect wallet button is visible + @skip Scenario: Routes and swap button showing up for a user with a connected wallet but with no balance for it Given Transactional account bob is connected to the dashboard on goerli And User clicks on the "bridge" navigation button @@ -21,6 +22,7 @@ Feature: Bridge page test cases (Li-Fi widget) And Review swap button is disabled And Not enough gas funds error is shown + @skip Scenario: Routes and connect wallet button showing up for a user in view mode Given "Dashboard Page" is open without connecting a wallet And User uses view mode to look at "ongoingStreamAccount" @@ -32,6 +34,7 @@ Feature: Bridge page test cases (Li-Fi widget) And Token swapping route for is correctly shown And Connect wallet button is visible + @skip Scenario: Li-Fi widget history page (No activity) Given Transactional account bob is connected to the dashboard on goerli And User clicks on the "bridge" navigation button @@ -57,6 +60,7 @@ Feature: Bridge page test cases (Li-Fi widget) Given "Bridge page" is open without connecting a wallet And LiFi bridge inputs are visible + @skip Scenario: Lifi bridge settings page ( very vague ) Given "Bridge page" is open without connecting a wallet And User opens the lifi widget settings @@ -64,9 +68,14 @@ Feature: Bridge page test cases (Li-Fi widget) And User clicks on the back button Then LiFi bridge inputs are visible - Scenario: Only Superfluid supported networks are shown in the Bridge page - Given Transactional account bob is connected to the dashboard on ethereum - And User clicks on the "bridge" navigation button + Scenario: Only Superfluid supported networks are shown in the Bridge page and super tokens are featured + Given "Bridge page" is open with "bob" connected on "ethereum" And User opens the token selection in the bridge page Then Only Superfluid supported networks are shown as available options And Ethereum mainnet is shown in the network list + + Scenario: Only Superfluid supported networks are shown in the Bridge page and super tokens are featured + Given "Bridge page" is open with "john" connected on "ethereum" + And User opens the token selection in the bridge page + And User selects "Polygon" as the network for the first token bridging + Then Featured super tokens on "polygon" are visible \ No newline at end of file diff --git a/tests/cypress/integration/Common.feature b/tests/cypress/integration/Common.feature index 54c0cf67..7d58a465 100644 --- a/tests/cypress/integration/Common.feature +++ b/tests/cypress/integration/Common.feature @@ -168,3 +168,103 @@ Feature: Common element test cases Then No "new" notifications message is shown And User switches to the "archive" notification tab And Archived "Old notification" notification is shown + + Scenario: Using view mode from the Connect or Impersonate screen + Given "Vesting page" is open without connecting a wallet + And User uses view mode to look at "john" + Then View mode chip shows "0x9Be8...E2B9" + + Scenario: Close view mode from the Connect or Impersonate screen + Given "Vesting page" is open without connecting a wallet + And User clicks on the view mode button + And User closes the dialog + Then View mode dialog does not exist + + Scenario: Using view mode from the account modal + Given "Address book page" is open with "alice" connected on "polygon" + And User opens the connected account modal + And User uses view mode to look at "john" + Then View mode chip shows "0x9Be8...E2B9" + + Scenario: Close view mode from the account modal + Given "Address book page" is open with "alice" connected on "polygon" + And User opens the connected account modal + And User clicks on the view mode button + And User closes the dialog + Then View mode dialog does not exist + + Scenario: Closing the account modal + Given "Address book page" is open with "alice" connected on "polygon" + And User opens the connected account modal + And User closes the dialog + Then Connected account dialog does not exist + + Scenario: Disconnecting the users wallet from the account modal + Given "Dashboard page" is open with "alice" connected on "polygon" + And User disconnects their wallet from the dashboard + Then Connected account dialog does not exist + Then Dashboard page is open when wallet of the user is not connected + + Scenario: Copying wallet address from the account modal + Given "Address book page" is open with "alice" connected on "polygon" + And User opens the connected account modal + And User clicks on the copy address button in the account modal + Then The address is copied and the buttons text in the address modal changes to "Copied!" with a checkmark icon + + Scenario: Searching for an lens address + Given "Vesting page" is open without connecting a wallet + And User clicks on the view mode button + And User types "elvijs.lens" into the address input + Then A lens entry for "elvijs.lens" is visible + And The avatar image for "elvijs.lens" is shown loaded + And User chooses the first lens entry from the list + Then View mode chip shows "elvijs.lens" + + Scenario: Searching for an ens address and validating the image + Given "Vesting page" is open without connecting a wallet + And User clicks on the view mode button + And User types "vijay.eth" into the address input + And "vijay.eth" ENS entry in the address search results is shown + And The avatar image for "vijay.eth" is shown loaded + And User selects the first ENS recipient result + Then View mode chip shows "vijay.eth" + + Scenario: Turning dark mode on + Given "Vesting page" is open without connecting a wallet + And User clicks on the dark mode button + Then The dashboard theme is set to dark mode + And User clicks on the light mode button + Then The dashboard theme is set to light mode + + Scenario: Lens Api error when fetching a receiver + Given "Vesting page" is open without connecting a wallet + + Given Lens and ENS api requests are blocked + And User clicks on the view mode button + And User types "elvijs.lens" into the address input + Then An error is shown in the "Lens" receiver list + + Scenario: ENS Api error when fetching a receiver + Given "Vesting page" is open without connecting a wallet + + Given Lens and ENS api requests are blocked + And User clicks on the view mode button + And User types "vijay.eth" into the address input + Then An error is shown in the "ENS" receiver list + + Scenario: Hovering on onboarding cards and connect wallet modal showing up if user is not connected + Given "Dashboard page" is open without connecting a wallet + And User hovers on the modify streams onboarding card + And User clicks on the modify streams onboarding card + Then Wallet connection modal is shown + + #Not the greatest solution as minigame could not load and it would miss it, but I can't really validate the game itself with Cypress + Scenario: Opening the mini-game without a wallet connected + Given "Minigame page" is open without connecting a wallet + Then The minigame container iframe is visible without a wallet connected + Then In-game cosmetics warning is shown + + Scenario: Opening the mini-game with a wallet connected + Given "Minigame page" is open with "john" connected on "polygon" + Then The minigame container iframe is visible with a wallet connected + Then In-game cosmetics warning does not exist diff --git a/tests/cypress/integration/DashboardPage.feature b/tests/cypress/integration/DashboardPage.feature index e09350a4..04dece0f 100644 --- a/tests/cypress/integration/DashboardPage.feature +++ b/tests/cypress/integration/DashboardPage.feature @@ -73,3 +73,12 @@ Feature: Dashboard Page test cases Scenario: Testnet faucet message not shown for users with tokens Given "Dashboard Page" is open with "john" connected on "polygon-mumbai" Then Dashboard page faucet message does not exist + + Scenario: Cancelling a stream from the streams table + Given HDWallet transactions are rejected + + Given "Dashboard Page" is open with "john" connected on "goerli" + And User clicks on "goerli" "fDAIx" row + And Cancel and Edit buttons are visible + And User clicks on the first visible cancel button + Then Transaction rejected error is shown diff --git a/tests/cypress/integration/ExportPage.feature b/tests/cypress/integration/ExportPage.feature index 78890f7c..2062522d 100644 --- a/tests/cypress/integration/ExportPage.feature +++ b/tests/cypress/integration/ExportPage.feature @@ -1,9 +1,7 @@ Feature: Export Stream Data page test cases - Background: - Given "Accounting Export page" is open without connecting a wallet - Scenario: Selecting and removing an address from the list + Given "Accounting Export page" is open without connecting a wallet And User searches for "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" as the accountable account And User selects "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" from the search section And Selected sections shows "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" @@ -19,6 +17,7 @@ Feature: Export Stream Data page test cases And And address search box shows that "0" address is selected Scenario Outline: Changing price granularity and accounting periods + Given "Accounting Export page" is open without connecting a wallet And User selects "0xF9Ce34dFCD3cc92804772F3022AF27bCd5E43Ff2" for the accounting export And User changes the price granularity to "" And User changes the accounting period to "" @@ -32,6 +31,7 @@ Feature: Export Stream Data page test cases | Yearly | Scenario: Selecting multiple addresses and exporting the data + Given "Accounting Export page" is open without connecting a wallet And User searches for "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" as the accountable account And User selects "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" from the search section And User searches for "0xF9Ce34dFCD3cc92804772F3022AF27bCd5E43Ff2" as an extra accountable account @@ -42,6 +42,7 @@ Feature: Export Stream Data page test cases Then Exported data for "multiple accounts" is fetched and shown correctly Scenario: Selecting a counterparty and exporting the data + Given "Accounting Export page" is open without connecting a wallet And User searches for "0xF9Ce34dFCD3cc92804772F3022AF27bCd5E43Ff2" as the accountable account And User selects "0xF9Ce34dFCD3cc92804772F3022AF27bCd5E43Ff2" from the search section And User clicks the OK button @@ -53,6 +54,7 @@ Feature: Export Stream Data page test cases Then Exported data for "counterparty" is fetched and shown correctly Scenario: Date range of the reports + Given "Accounting Export page" is open without connecting a wallet And User searches for "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" as the accountable account And User selects "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" from the search section And User clicks the OK button @@ -61,6 +63,7 @@ Feature: Export Stream Data page test cases Then Exported data for "custom dates" is fetched and shown correctly Scenario: Export preview - enabling and disabling columns + Given "Accounting Export page" is open without connecting a wallet And User searches for "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" as the accountable account And User selects "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" from the search section And User clicks the OK button @@ -73,6 +76,7 @@ Feature: Export Stream Data page test cases Then No data is shown in the export preview Scenario: Export preview - Sorting by ascending/descending + Given "Accounting Export page" is open without connecting a wallet And User searches for "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" as the accountable account And User selects "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" from the search section And User clicks the OK button @@ -83,6 +87,7 @@ Feature: Export Stream Data page test cases Then The "amount" column is sorted in "descending" order Scenario: Export preview - Custom filters + Given "Accounting Export page" is open without connecting a wallet And User searches for "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" as the accountable account And User selects "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" from the search section And User clicks the OK button @@ -91,6 +96,7 @@ Feature: Export Stream Data page test cases Then The export preview table only shows "tokenSymbol" rows with "DAIx" Scenario: Exporting and validating CSV + Given "Accounting Export page" is open without connecting a wallet And User searches for "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" as the accountable account And User selects "0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40" from the search section And User clicks the OK button @@ -99,3 +105,11 @@ Feature: Export Stream Data page test cases And User clicks on the export preview button And User exports the CSV Then CSV contains the correct data + + Scenario: Users address auto-filled if wallet is connected + Given "Dashboard Page" is open with "john" connected on "goerli" + And User opens the navigation more menu + And User clicks on the "export" button in the more menu + And User waits for 30 seconds + #John address + And "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9" is selected for the export diff --git a/tests/cypress/integration/IndividualTokenPage.feature b/tests/cypress/integration/IndividualTokenPage.feature index 6a50d841..224c2958 100644 --- a/tests/cypress/integration/IndividualTokenPage.feature +++ b/tests/cypress/integration/IndividualTokenPage.feature @@ -70,3 +70,9 @@ Feature: Token page test cases And User opens "goerli" "fDAIx" individual token page And User opens the transfers tab Then No data row is shown + + #Works locally, leads to dashboard page on netlify builds + @skip + Scenario: Invalid token page leading to a 404 page + Given "404 Token Page" is open without connecting a wallet + Then 404 page is shown diff --git a/tests/cypress/integration/SendPage.feature b/tests/cypress/integration/SendPage.feature index 4987d46f..65239511 100644 --- a/tests/cypress/integration/SendPage.feature +++ b/tests/cypress/integration/SendPage.feature @@ -18,7 +18,7 @@ Feature: Send Page test cases Then And user selects the first recent receiver Then The receiver address is shown as the chosen receiver in the send stream page And User searches for "vijay.eth" as a receiver - Then "0x7BDa037dFdf9CD9Ad261D27f489924aebbcE71Ac" is visible in the ENS recipient results + Then "0x1dDc50A8b8ef07c654B4ace65070B0E7acfF622B" is visible in the ENS recipient results And User selects the first ENS recipient result Then Chosen wallet address shows up as vijay.eth And User clears the receiver field with the close button diff --git a/tests/cypress/integration/VestingPage.feature b/tests/cypress/integration/VestingPage.feature index b2321578..089b4acb 100644 --- a/tests/cypress/integration/VestingPage.feature +++ b/tests/cypress/integration/VestingPage.feature @@ -419,3 +419,7 @@ Feature: Vesting page test cases And Stop viewing button is visible in the "fTUSDx" permission row And User clicks on the stop viewing as an address button Then Vesting page while a wallet is not connected screen is shown + + Scenario: Invalid vesting page leading to a 404 page + Given "404 Vesting Page" is open without connecting a wallet + Then 404 page is shown diff --git a/tests/cypress/pageObjects/pages/ActivityPage.ts b/tests/cypress/pageObjects/pages/ActivityPage.ts index 4100cbd6..79f580e3 100644 --- a/tests/cypress/pageObjects/pages/ActivityPage.ts +++ b/tests/cypress/pageObjects/pages/ActivityPage.ts @@ -6,7 +6,7 @@ import { } from "../../superData/networks"; import { Common } from "./Common"; import { format } from "date-fns"; -import { DataTable } from "@badeball/cypress-cucumber-preprocessor"; +import { DataTable, Then } from "@badeball/cypress-cucumber-preprocessor"; import superfluidMetadata from "@superfluid-finance/metadata"; import { ethers } from "ethers"; @@ -14,6 +14,7 @@ const ACTIVITY_TYPE = "[data-cy=activity]"; const ACTIVITY_NAME = `${ACTIVITY_TYPE} h6`; const ACTIVITY_TIME = `${ACTIVITY_TYPE} span`; const ACTIVITY_AMOUNT = "[data-cy=amount]"; +const FIAT_AMOUNTS = "[data-cy=fiat-amount]"; const AMOUNT_TO_FROM = "[data-cy=amountToFrom]"; const ALL_ROWS = "[data-cy*=-row]"; const DATE_PICKER_BUTTON = "[data-cy=date-picker-button]"; @@ -39,6 +40,8 @@ const RECEIVE_ICON = "[data-testid=ArrowBackRoundedIcon]"; const SEND_ICON = "[data-testid=ArrowForwardRoundedIcon]"; const WRAP_UNWRAP_ICON = "[data-testid=SwapVertIcon]"; const LIQUIDATED_ICON = "[data-testid=PriorityHighIcon]"; +const ADDRESS_COMPONENTS = "[data-cy=address-to-copy]"; +const COPY_TOOLTIPS = ".MuiTypography-tooltip"; const NOW_TIMESTAMP = Date.now(); type ActivityData = { @@ -50,6 +53,18 @@ type ActivityData = { }; export class ActivityPage extends BasePage { + static hoverOnFirstAddress() { + this.trigger(ADDRESS_COMPONENTS, "mouseover"); + } + + static clickOnCopyTooltip() { + //https://github.com/cypress-io/cypress/issues/18198 + cy.get(COPY_TOOLTIPS).realClick(); + } + + static validateCopyTooltipText(text: string) { + this.hasText(COPY_TOOLTIPS, text); + } static saveActivityHistoryData() { let activityHistoryData: any = { account: {} }; Common.closeDropdown(); @@ -180,18 +195,18 @@ export class ActivityPage extends BasePage { this.click(ACTIVITY_FILTER); } - static clickFilterToogle(toggle: string) { - this.click(`[data-cy="${toggle}-toggle"]`); + static clickFilterCheckbox(toggle: string) { + this.click(`[data-cy="${toggle}-row"]`); } static validateNoActivityByTypeShown(type: string) { - cy.get(ACTIVITY_TYPE).each((el) => { - cy.wrap(el).find("span").first().should("not.have.text", type); + cy.get(ACTIVITY_NAME).each((el) => { + cy.wrap(el).should("not.have.text", type); }); } static validateActivityVisibleByType(type: string) { - cy.get(`${ACTIVITY_TYPE} span`).contains(type).should("be.visible"); + cy.get(`${ACTIVITY_NAME}`).contains(type).should("be.visible"); } static validateActivityVisibleByAddress(address: string) { @@ -199,9 +214,10 @@ export class ActivityPage extends BasePage { ? BasePage.shortenHex(address) : address; cy.get(AMOUNT_TO_FROM).each((el) => { - cy.wrap(el).should("have.text", `From${assertableString}`); + cy.log(el.text()); + let regex = new RegExp(`(From|To)${assertableString}`); + cy.wrap(el.text()).should("match", regex); }); - this.hasLength(AMOUNT_TO_FROM, 2); } static waitForSkeletonsToDisappear() { @@ -254,7 +270,7 @@ export class ActivityPage extends BasePage { } static validateMockedActivityHistoryEntry(activity: string, network: string) { - this.hasText(ACTIVITY_NAME, activity, -1); + this.hasText(ACTIVITY_NAME, activity.split("/")[0], -1, { timeout: 30000 }); this.isVisible(`[data-cy=${networksBySlug.get(network).id}-icon]`); this.isVisible(TX_HASH_LINKS); this.hasAttributeWithValue( @@ -263,20 +279,27 @@ export class ActivityPage extends BasePage { networksBySlug.get(network).getLinkForTransaction("testTransactionHash") ); this.containsText(ACTIVITY_TIME, format(NOW_TIMESTAMP * 1000, "HH:mm")); - switch (activity) { + switch (activity.split("/")[0]) { case "Liquidated": this.isVisible(LIQUIDATED_ICON); - this.hasText(ACTIVITY_NAME, "Send Transfer", 0); - this.hasText(ACTIVITY_AMOUNT, "1 TDLx", 0); - this.hasText( - AMOUNT_TO_FROM, - `To${this.shortenHex("0x2597c6abba5724fb99f343abddd4569ee4223179")}`, - 0 - ); + if (activity.split("/")[1] === "v2") { + this.hasText(ACTIVITY_NAME, "Send Transfer", 0); + this.hasText(ACTIVITY_AMOUNT, "1 TDLx", 0); + this.hasText( + AMOUNT_TO_FROM, + `To${this.shortenHex( + "0x2597c6abba5724fb99f343abddd4569ee4223179" + )}`, + 0 + ); + } + let toFrom = activity.split("/")[1] === "sender" ? "From" : "To"; this.hasText(ACTIVITY_AMOUNT, "-", -1); this.hasText( AMOUNT_TO_FROM, - `To${this.shortenHex("0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9")}`, + `${toFrom}${this.shortenHex( + "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9" + )}`, -1 ); break; @@ -294,9 +317,14 @@ export class ActivityPage extends BasePage { ); break; case "Unwrap": + let tokenUsed = activity.split("/")[1] === "wrapper" ? "TDL" : "MATIC"; this.isVisible(WRAP_UNWRAP_ICON); - this.hasText(ACTIVITY_AMOUNT, "-1 TDLx"); - this.hasText(AMOUNT_TO_FROM, "+1 TDL"); + this.containsText(ACTIVITY_AMOUNT, `-1 ${tokenUsed}x`); + this.containsText(AMOUNT_TO_FROM, `+1 ${tokenUsed}`); + if (tokenUsed === "MATIC") { + this.isVisible(FIAT_AMOUNTS); + this.hasLength(FIAT_AMOUNTS, 2); + } break; case "Receive Transfer": this.hasText(ACTIVITY_AMOUNT, "1 TDLx"); @@ -334,7 +362,7 @@ export class ActivityPage extends BasePage { this.hasText(ACTIVITY_AMOUNT, " TDLx"); this.hasText( AMOUNT_TO_FROM, - `Publisher${this.shortenHex( + `${activity.split("/")[1]}${this.shortenHex( "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9" )}` ); @@ -344,7 +372,7 @@ export class ActivityPage extends BasePage { this.hasText(ACTIVITY_AMOUNT, "+100 units"); this.hasText( AMOUNT_TO_FROM, - `Publisher${this.shortenHex( + `${activity.split("/")[1]}${this.shortenHex( "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9" )}` ); @@ -354,7 +382,7 @@ export class ActivityPage extends BasePage { this.hasText(ACTIVITY_AMOUNT, "TDLx"); this.hasText( AMOUNT_TO_FROM, - `Publisher${this.shortenHex( + `${activity.split("/")[1]}${this.shortenHex( "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9" )}` ); @@ -382,7 +410,7 @@ export class ActivityPage extends BasePage { this.hasText(ACTIVITY_AMOUNT, "+1 TDLx"); this.hasText( AMOUNT_TO_FROM, - `Publisher${this.shortenHex( + `${activity.split("/")[1]}${this.shortenHex( "0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9" )}` ); diff --git a/tests/cypress/pageObjects/pages/AddressBookPage.ts b/tests/cypress/pageObjects/pages/AddressBookPage.ts index ee7a0a68..e4f911ba 100644 --- a/tests/cypress/pageObjects/pages/AddressBookPage.ts +++ b/tests/cypress/pageObjects/pages/AddressBookPage.ts @@ -41,8 +41,25 @@ const ADDRESS_FILTER_BUTTON = "[data-cy=address-filter]"; const ADDRESS_FILTER_NAMES = "[data-cy=address]"; const ADDRESS_FILTER_CLEAR_ALL = "[data-cy=clear-all-chip]"; const ADDRESS_FILTER_NAME_CHIPS = "[data-cy=address-chip]"; +const COPY_BUTTONS = "[data-testid=ContentCopyRoundedIcon]"; +const COPY_TOOLTIPS = "[role=tooltip] .MuiTooltip-tooltip"; export class AddressBookPage extends BasePage { + static clickFirstCopyButton() { + cy.get(COPY_BUTTONS).first().scrollIntoView().click(); + } + static stopHoveringOnFirstAddress() { + this.trigger(ACTUAL_ADDRESSES, "mouseout", 0); + } + static validateTooltipText(text: string) { + this.hasText(COPY_TOOLTIPS, text); + } + static hoverOnFirstAddress() { + this.trigger(ACTUAL_ADDRESSES, "mouseover", 0); + } + static hoverOnFirstAddressCopyButton() { + this.trigger(COPY_BUTTONS, "mouseover", 0); + } static searchForAddressBookReceiverAndSelectIt(name: string) { SendPage.searchForReceiver(name); this.clickFirstVisible(ADDRESS_BOOK_ENTRIES); @@ -165,9 +182,9 @@ export class AddressBookPage extends BasePage { static setupAddressBook() { cy.log("Setting up address book"); let addressBookEntries = JSON.stringify({ - ids: '["0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40","0xF9Ce34dFCD3cc92804772F3022AF27bCd5E43Ff2","0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9","0x1F26b0b62F4Eeee9C5E30893401dCe10B03D49A4","0x9B6157d44134b21D934468B8bf709294cB298aa7","0x66693Ff26e2036FDf3a5EA6B7FDf853Ca1Adaf4B","0x8ac9C6D444D12d20BC96786243Abaae8960D27e2","0x7BDa037dFdf9CD9Ad261D27f489924aebbcE71Ac","0x70fd86d7196813505ca9f9a77ef53Ab06A5ca603","0x3277Ea3910A354621f144022647082E1E06fDe8a","0x9Fa707BCCA8B7163da2A30143b70A9b8BE0d0788","0x0BBE3e9f2FB2813E1418ddAf647d64A70de697d0","0xe7ec208720dbf905b43c312Aa8dD2E0f3C865501","0x36136B6b657D02812E4E8B88d23B552320F84698","0x195Dba965938ED77F8F4D25eEd0eC8a08407dA05","0x982046AeF10d24b938d85BDBBe262B811b0403b7","0x340aeC5e697Ed31D70382D8dF141aAefA6b15E49"]', + ids: '["0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40","0xF9Ce34dFCD3cc92804772F3022AF27bCd5E43Ff2","0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9","0x1F26b0b62F4Eeee9C5E30893401dCe10B03D49A4","0x9B6157d44134b21D934468B8bf709294cB298aa7","0x66693Ff26e2036FDf3a5EA6B7FDf853Ca1Adaf4B","0x8ac9C6D444D12d20BC96786243Abaae8960D27e2","0x1dDc50A8b8ef07c654B4ace65070B0E7acfF622B","0x70fd86d7196813505ca9f9a77ef53Ab06A5ca603","0x3277Ea3910A354621f144022647082E1E06fDe8a","0x9Fa707BCCA8B7163da2A30143b70A9b8BE0d0788","0x0BBE3e9f2FB2813E1418ddAf647d64A70de697d0","0xe7ec208720dbf905b43c312Aa8dD2E0f3C865501","0x36136B6b657D02812E4E8B88d23B552320F84698","0x195Dba965938ED77F8F4D25eEd0eC8a08407dA05","0x982046AeF10d24b938d85BDBBe262B811b0403b7","0x340aeC5e697Ed31D70382D8dF141aAefA6b15E49"]', entities: - '{"0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40":{"name":"","address":"0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40","associatedNetworks":[1,100,137],"isContract":false},"0xF9Ce34dFCD3cc92804772F3022AF27bCd5E43Ff2":{"name":"Multiple networks test","address":"0xF9Ce34dFCD3cc92804772F3022AF27bCd5E43Ff2","associatedNetworks":[1,100,137,10,42161,43114,56,42220],"isContract":false},"0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9":{"name":"john","address":"0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9","associatedNetworks":[],"isContract":false},"0x1F26b0b62F4Eeee9C5E30893401dCe10B03D49A4":{"name":"dan","address":"0x1F26b0b62F4Eeee9C5E30893401dCe10B03D49A4","associatedNetworks":[],"isContract":false},"0x9B6157d44134b21D934468B8bf709294cB298aa7":{"name":"bob","address":"0x9B6157d44134b21D934468B8bf709294cB298aa7","associatedNetworks":[],"isContract":false},"0x66693Ff26e2036FDf3a5EA6B7FDf853Ca1Adaf4B":{"name":"alice","address":"0x66693Ff26e2036FDf3a5EA6B7FDf853Ca1Adaf4B","associatedNetworks":[],"isContract":false},"0x8ac9C6D444D12d20BC96786243Abaae8960D27e2":{"name":"Static Balance Account","address":"0x8ac9C6D444D12d20BC96786243Abaae8960D27e2","associatedNetworks":[],"isContract":false},"0x7BDa037dFdf9CD9Ad261D27f489924aebbcE71Ac":{"name":"ENS Test","address":"0x7BDa037dFdf9CD9Ad261D27f489924aebbcE71Ac","associatedNetworks":[],"isContract":false},"0x70fd86d7196813505ca9f9a77ef53Ab06A5ca603":{"name":"Celo","address":"0x70fd86d7196813505ca9f9a77ef53Ab06A5ca603","associatedNetworks":[42220],"isContract":true},"0x3277Ea3910A354621f144022647082E1E06fDe8a":{"name":"Goerli","address":"0x3277Ea3910A354621f144022647082E1E06fDe8a","associatedNetworks":[5],"isContract":true},"0x9Fa707BCCA8B7163da2A30143b70A9b8BE0d0788":{"name":"Optimism","address":"0x9Fa707BCCA8B7163da2A30143b70A9b8BE0d0788","associatedNetworks":[10],"isContract":true},"0x0BBE3e9f2FB2813E1418ddAf647d64A70de697d0":{"name":"Avalanche","address":"0x0BBE3e9f2FB2813E1418ddAf647d64A70de697d0","associatedNetworks":[43114],"isContract":true},"0xe7ec208720dbf905b43c312Aa8dD2E0f3C865501":{"name":"Arbitrum One","address":"0xe7ec208720dbf905b43c312Aa8dD2E0f3C865501","associatedNetworks":[42161],"isContract":true},"0x36136B6b657D02812E4E8B88d23B552320F84698":{"name":"BSC","address":"0x36136B6b657D02812E4E8B88d23B552320F84698","associatedNetworks":[56],"isContract":true},"0x195Dba965938ED77F8F4D25eEd0eC8a08407dA05":{"name":"Polygon","address":"0x195Dba965938ED77F8F4D25eEd0eC8a08407dA05","associatedNetworks":[137],"isContract":true},"0x982046AeF10d24b938d85BDBBe262B811b0403b7":{"name":"Ethereum","address":"0x982046AeF10d24b938d85BDBBe262B811b0403b7","associatedNetworks":[1],"isContract":true},"0x340aeC5e697Ed31D70382D8dF141aAefA6b15E49":{"name":"Gnosis","address":"0x340aeC5e697Ed31D70382D8dF141aAefA6b15E49","associatedNetworks":[100],"isContract":true}}', + '{"0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40":{"name":"","address":"0x618ada3f9f7BC1B2f2765Ba1728BEc5057B3DE40","associatedNetworks":[1,100,137],"isContract":false},"0xF9Ce34dFCD3cc92804772F3022AF27bCd5E43Ff2":{"name":"Multiple networks test","address":"0xF9Ce34dFCD3cc92804772F3022AF27bCd5E43Ff2","associatedNetworks":[1,100,137,10,42161,43114,56,42220],"isContract":false},"0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9":{"name":"john","address":"0x9Be85A79D847dFa90584F3FD40cC1f6D4026E2B9","associatedNetworks":[],"isContract":false},"0x1F26b0b62F4Eeee9C5E30893401dCe10B03D49A4":{"name":"dan","address":"0x1F26b0b62F4Eeee9C5E30893401dCe10B03D49A4","associatedNetworks":[],"isContract":false},"0x9B6157d44134b21D934468B8bf709294cB298aa7":{"name":"bob","address":"0x9B6157d44134b21D934468B8bf709294cB298aa7","associatedNetworks":[],"isContract":false},"0x66693Ff26e2036FDf3a5EA6B7FDf853Ca1Adaf4B":{"name":"alice","address":"0x66693Ff26e2036FDf3a5EA6B7FDf853Ca1Adaf4B","associatedNetworks":[],"isContract":false},"0x8ac9C6D444D12d20BC96786243Abaae8960D27e2":{"name":"Static Balance Account","address":"0x8ac9C6D444D12d20BC96786243Abaae8960D27e2","associatedNetworks":[],"isContract":false},"0x1dDc50A8b8ef07c654B4ace65070B0E7acfF622B":{"name":"ENS Test","address":"0x1dDc50A8b8ef07c654B4ace65070B0E7acfF622B","associatedNetworks":[],"isContract":false},"0x70fd86d7196813505ca9f9a77ef53Ab06A5ca603":{"name":"Celo","address":"0x70fd86d7196813505ca9f9a77ef53Ab06A5ca603","associatedNetworks":[42220],"isContract":true},"0x3277Ea3910A354621f144022647082E1E06fDe8a":{"name":"Goerli","address":"0x3277Ea3910A354621f144022647082E1E06fDe8a","associatedNetworks":[5],"isContract":true},"0x9Fa707BCCA8B7163da2A30143b70A9b8BE0d0788":{"name":"Optimism","address":"0x9Fa707BCCA8B7163da2A30143b70A9b8BE0d0788","associatedNetworks":[10],"isContract":true},"0x0BBE3e9f2FB2813E1418ddAf647d64A70de697d0":{"name":"Avalanche","address":"0x0BBE3e9f2FB2813E1418ddAf647d64A70de697d0","associatedNetworks":[43114],"isContract":true},"0xe7ec208720dbf905b43c312Aa8dD2E0f3C865501":{"name":"Arbitrum One","address":"0xe7ec208720dbf905b43c312Aa8dD2E0f3C865501","associatedNetworks":[42161],"isContract":true},"0x36136B6b657D02812E4E8B88d23B552320F84698":{"name":"BSC","address":"0x36136B6b657D02812E4E8B88d23B552320F84698","associatedNetworks":[56],"isContract":true},"0x195Dba965938ED77F8F4D25eEd0eC8a08407dA05":{"name":"Polygon","address":"0x195Dba965938ED77F8F4D25eEd0eC8a08407dA05","associatedNetworks":[137],"isContract":true},"0x982046AeF10d24b938d85BDBBe262B811b0403b7":{"name":"Ethereum","address":"0x982046AeF10d24b938d85BDBBe262B811b0403b7","associatedNetworks":[1],"isContract":true},"0x340aeC5e697Ed31D70382D8dF141aAefA6b15E49":{"name":"Gnosis","address":"0x340aeC5e697Ed31D70382D8dF141aAefA6b15E49","associatedNetworks":[100],"isContract":true}}', _persist: '{"version":1,"rehydrated":true}', }); window.localStorage.setItem("persist:addressBook", addressBookEntries); diff --git a/tests/cypress/pageObjects/pages/BridgePage.ts b/tests/cypress/pageObjects/pages/BridgePage.ts index 549b755d..1e6ab978 100644 --- a/tests/cypress/pageObjects/pages/BridgePage.ts +++ b/tests/cypress/pageObjects/pages/BridgePage.ts @@ -14,6 +14,15 @@ const SETTINGS_BUTTON = "[data-testid=SettingsOutlinedIcon]"; const NETWORK_BUTTONS = "[aria-label] > .MuiAvatar-root > .MuiAvatar-img"; export class BridgePage extends BasePage { + static validateFeaturedTokensAreShownOn(network: string) { + cy.fixture("rejectedCaseTokens").then(availableTokens => { + //The tokens user has in their wallet are shown at the top sorted by the balance , checking just 2 because 3rd is slightly overlayed + cy.get(TOKEN_LIST_NAMES).contains(availableTokens[network].TokenOne).should("be.visible") + cy.get(TOKEN_LIST_NAMES).contains(availableTokens[network].TokenTwo).should("be.visible") + cy.get(TOKEN_LIST_NAMES).contains(`${availableTokens[network].TokenOne}x`).should("be.visible") + cy.get(TOKEN_LIST_NAMES).contains(`${availableTokens[network].TokenTwo}x`).should("be.visible") + }) + } static chooseTokenToSwapFromTo( token: string, toFrom: string, @@ -22,7 +31,7 @@ export class BridgePage extends BasePage { cy.wrap(token).as(`${toFrom}Token`); cy.wrap(network).as(`${toFrom}Network`); cy.contains(toFrom).click(); - this.click(`${LIFI_WIDGET_CONTAINER} [aria-label=${network}]`); + this.selectBridgeNetwork(network) this.doesNotExist(LOADING_SKELETONS); cy.get(TOKEN_LIST_NAMES) .its("length") @@ -37,6 +46,10 @@ export class BridgePage extends BasePage { }); } + static selectBridgeNetwork(network:string) { + this.click(`${LIFI_WIDGET_CONTAINER} [aria-label=${network}]`); + } + static inputSwapAmount(amount: string) { this.type(FROM_AMOUNT, amount); cy.wrap(amount).as("swapAmount"); @@ -175,6 +188,8 @@ export class BridgePage extends BasePage { "Avalanche", "Arbitrum", "Optimism", + "Celo", + "BASE", ]; cy.get(NETWORK_BUTTONS) .parent() diff --git a/tests/cypress/pageObjects/pages/Common.ts b/tests/cypress/pageObjects/pages/Common.ts index da07205e..2437d038 100644 --- a/tests/cypress/pageObjects/pages/Common.ts +++ b/tests/cypress/pageObjects/pages/Common.ts @@ -44,7 +44,6 @@ const RESTORE_BUTTONS = "[data-testid=ReplayIcon]"; const SENDER_RECEIVER_ADDRESSES = "[data-cy=sender-receiver-address]"; const STREAM_FLOW_RATES = "[data-cy=flow-rate]"; const START_END_DATES = "[data-cy=start-end-date]"; -const DISCONNECT_BUTTON = "[data-testid=rk-disconnect-button]"; const RAINBOWKIT_CLOSE_BUTTON = "[aria-label=Close]"; const TX_ERROR = "[data-cy=tx-error]"; const CLOSE_BUTTON = "[data-testid=CloseRoundedIcon]"; @@ -82,7 +81,30 @@ const TOAST_TITLE = "[data-cy=toast-notification-title]"; const TOAST_CLOSE_BUTTON = "button[aria-label=close]"; const NOTIF_WRAP_TOKEN_BUTTON = "[data-cy=wrap-tokens-button]"; const LOADING_SKELETONS = ".MuiSkeleton-root"; - +const ADDRESS_SEARCH_DIALOG = "[data-cy=receiver-dialog]"; +const CONNECTED_WALLET_BUTTON = "[data-cy=connected-wallet-button]"; +const CONNECTED_WALLET_DIALOG = "[data-cy=account-modal]"; +const DISCONNECT_BUTTON = "[data-cy=disconnect-button]"; +const ADDRESS_MODAL_COPY_BUTTON = "[data-cy=address-modal-copy-button]"; +const COPY_ICON = "[data-testid=ContentCopyRoundedIcon]"; +const CHECKMARK_ICON = "[data-testid=CheckOutlinedIcon]"; +const LENS_ENTRIES = "[data-cy=lens-entry]"; +const LENS_NAMES = `${LENS_ENTRIES} h6`; +const LENS_ENTRY_ADDRESSES = `${LENS_ENTRIES} p`; +const ADDRESS_SEARCH_AVATAR_IMAGES = + "[role=dialog] [class*=MuiListItemAvatar] img"; +const DARK_MODE_BUTTON = "[data-cy=dark-mode-button]"; +const LIGHT_MODE_BUTTON = "[data-cy=light-mode-button]"; +const DARK_MODE_ICON = "[data-testid=DarkModeOutlinedIcon]"; +const LIGHT_MODE_ICON = "[data-testid=LightModeOutlinedIcon]"; +const GET_SUPER_TOKENS_ONBOARDING_CARD = "[data-cy=get-tokens-onboarding-card]"; +const SEND_STREAM_ONBOARDING_CARD = "[data-cy=send-stream-onboarding-card]"; +const MODIFY_OR_CANCEL_STREAM_ONBOARDING_CARD = + "[data-cy=modify-or-cancel-streams-onboarding-card]"; +const TRY_SUPERFLUID_ONBOARDING_CARD = + "[data-cy=try-out-superfluid-onboarding-card]"; +const MINIGAME_WARNING = "[data-cy=superfluid-runner-game-alert-text]"; +const MINIGAME_COMPONENT = "[data-cy=minigame-component]"; const NEW_NOTIF_DATE = new Date(Date.now()); const NEW_NOTIF_STRING_DATE = BasePage.getNotificationDateString(NEW_NOTIF_DATE); @@ -90,6 +112,127 @@ const OLD_NOTIF_DATE = new Date(1000 * BasePage.getDayTimestamp(-30)); const OLD_DATE_STRING = BasePage.getNotificationDateString(OLD_NOTIF_DATE); export class Common extends BasePage { + static validateMiniGameContainerWithoutWalletConnected() { + //Locally it just loads to an 403 :/ + this.hasAttributeWithValue( + MINIGAME_COMPONENT, + "src", + "https://astrobunny.superfluid.finance/?level=1" + ); + } + static validateMiniGameCosmeticsWarningIsVisible() { + this.isVisible(MINIGAME_WARNING); + this.hasText( + MINIGAME_WARNING, + "To access and unlock in-game cosmetics, please connect your wallet before beginning the game." + ); + } + static validateMiniGameCosmeticsWarningDoesNotExist() { + this.doesNotExist(MINIGAME_WARNING); + } + static validateMiniGameContainerWithWalletConnected() { + //Locally it just loads to an 403 :/ + cy.fixture("commonData").then((addresses) => { + this.hasAttributeWithValue( + MINIGAME_COMPONENT, + "src", + `https://astrobunny.superfluid.finance/?level=1&address=${addresses["john"]}` + ); + }); + } + static clickMoreMenuButton(button: string) { + this.click(`[data-cy=more-${button}-btn]`); + } + static hoverOnModifyStreamsOnboardingCard() { + this.isVisible(MODIFY_OR_CANCEL_STREAM_ONBOARDING_CARD); + cy.get(MODIFY_OR_CANCEL_STREAM_ONBOARDING_CARD) + .parent() + .trigger("mouseover"); + cy.get(MODIFY_OR_CANCEL_STREAM_ONBOARDING_CARD) + .parent() + .trigger("mouseout"); + } + static clickModifyStreamsOnboardingCard() { + this.click(MODIFY_OR_CANCEL_STREAM_ONBOARDING_CARD); + } + static validateWalletConnectionModalIsShown() { + this.isVisible(WAGMI_CONNECT_WALLET_TITLE); + } + static blockLensAndENSApiRequests() { + cy.intercept("POST", "https://rpc-endpoints.superfluid.dev/eth-mainnet", { + forceNetworkError: true, + }); + cy.intercept("POST", "https://api.lens.dev/", { forceNetworkError: true }); + } + + static validateErrorShownInRecepientList(lensOrEns: string) { + this.isVisible(`[data-cy=${lensOrEns.toLowerCase()}-error]`); + } + + static clickDarkModeButton() { + this.click(DARK_MODE_BUTTON); + } + static validateDashboardIsInDarkMode() { + this.hasAttributeWithValue("html", "data-theme", "dark"); + this.hasCSS("html", "color-scheme", "dark"); + this.isVisible(LIGHT_MODE_BUTTON); + this.isVisible(LIGHT_MODE_ICON); + + this.doesNotExist(DARK_MODE_BUTTON); + this.doesNotExist(DARK_MODE_ICON); + } + static clickLightModeButton() { + this.click(LIGHT_MODE_BUTTON); + } + static validateDashboardIsInLightMode() { + this.hasAttributeWithValue("html", "data-theme", "light"); + this.hasCSS("html", "color-scheme", "light"); + this.isVisible(DARK_MODE_BUTTON); + this.isVisible(DARK_MODE_ICON); + + this.doesNotExist(LIGHT_MODE_ICON); + this.doesNotExist(LIGHT_MODE_BUTTON); + } + + static validateLensEntryIsVisible(account: string) { + cy.get(LENS_NAMES).contains(account).should("be.visible"); + } + static validateLensImageIsLoaded(account: string) { + cy.fixture("ensAndLensAvatarUrls").then((urls) => { + this.hasAttributeWithValue( + ADDRESS_SEARCH_AVATAR_IMAGES, + "src", + urls[account] + ).should("be.visible"); + }); + } + static clickOnFirstLensEntry() { + this.click(LENS_ENTRIES, 0); + } + static clickOnAddressModalCopyButton() { + this.isVisible(COPY_ICON); + this.hasText(ADDRESS_MODAL_COPY_BUTTON, "Copy Address").click(); + } + static validateCopiedAddressInAddressModal() { + this.isVisible(CHECKMARK_ICON); + this.hasText(ADDRESS_MODAL_COPY_BUTTON, "Copied!"); + this.isVisible(COPY_ICON); + this.hasText(ADDRESS_MODAL_COPY_BUTTON, "Copy Address"); + } + static clickDisconnectButton() { + this.click(DISCONNECT_BUTTON); + } + static validateNoConnectedAccountDialogExists() { + this.doesNotExist(CONNECTED_WALLET_DIALOG); + } + static clickOnConnectedWalletModal() { + this.click(CONNECTED_WALLET_BUTTON); + } + + static validateNoViewModeDialogExists() { + this.doesNotExist(ADDRESS_DIALOG_INPUT); + this.doesNotExist(ADDRESS_SEARCH_DIALOG); + } static waitForSpookySkeletonsToDisapear() { this.doesNotExist(LOADING_SKELETONS, undefined, { timeout: 60000 }); } @@ -111,7 +254,8 @@ export class Common extends BasePage { if (account && network) { this.openDashboardWithConnectedTxAccount(page, account, network); } else { - cy.visit(page); + //Just to test 404 pages + cy.visit(page, { failOnStatusCode: false }); } } @@ -141,32 +285,36 @@ export class Common extends BasePage { let networkRpc = networksBySlug.get(selectedNetwork)?.superfluidRpcUrl; cy.visit(page, { onBeforeLoad: (win: any) => { - const hdwallet = new HDWalletProvider({ - privateKeys: [usedAccountPrivateKey], - url: networkRpc, - chainId: chainId, - pollingInterval: 1000, - }); - if (Cypress.env("rejected")) { - // Make HDWallet automatically reject transaction. - // Inspired by: https://github.com/MetaMask/web3-provider-engine/blob/e835b80bf09e76d92b785d797f89baa43ae3fd60/subproviders/hooked-wallet.js#L326 - for (const provider of hdwallet.engine["_providers"]) { - if (provider.checkApproval) { - provider.checkApproval = function (type, didApprove, cb) { - cb(new Error(`User denied ${type} signature.`)); - }; + try { + const hdwallet = new HDWalletProvider({ + privateKeys: [usedAccountPrivateKey], + url: networkRpc, + chainId: chainId, + pollingInterval: 1000, + }); + if (Cypress.env("rejected")) { + // Make HDWallet automatically reject transaction. + // Inspired by: https://github.com/MetaMask/web3-provider-engine/blob/e835b80bf09e76d92b785d797f89baa43ae3fd60/subproviders/hooked-wallet.js#L326 + for (const provider of hdwallet.engine["_providers"]) { + if (provider.checkApproval) { + provider.checkApproval = function (type, didApprove, cb) { + cb(new Error(`User denied ${type} signature.`)); + }; + } } } - } - const mockProvider = new ethers.providers.Web3Provider(hdwallet); - const mockSigner = mockProvider.getSigner(); + const mockProvider = new ethers.providers.Web3Provider(hdwallet); + const mockSigner = mockProvider.getSigner(); - win.mockBridge = new ProviderAdapter(hdwallet); + win.mockBridge = new ProviderAdapter(hdwallet); - // @ts-ignore - win.mockSigner = mockSigner; - win.mockWallet = hdwallet; + // @ts-ignore + win.mockSigner = mockSigner; + win.mockWallet = hdwallet; + } catch (e) { + console.log("Error during wallet provider setup: ", e); + } }, }); if (Cypress.env("dev")) { @@ -224,8 +372,11 @@ export class Common extends BasePage { static viewAccount(account: string) { cy.fixture("commonData").then((commonData) => { + let addressToLookFor = commonData[account] + ? commonData[account] + : account; this.click(VIEW_MODE_INPUT); - this.type(ADDRESS_DIALOG_INPUT, commonData[account]); + this.type(ADDRESS_DIALOG_INPUT, addressToLookFor); }); } @@ -1045,8 +1196,11 @@ export class Common extends BasePage { streamData["staticBalanceAccount"]["polygon"][0].v1Link, "close-ended stream details page": streamData["accountWithLotsOfData"]["polygon"][0].v2Link, - "vesting details page": `/vesting/goerli/${vestingData.goerli.fUSDCx.schedule.id}`, + "vesting details page": `/vesting/goerli/${vestingData.goerli.fTUSDx.schedule.id}`, "vesting stream details page": `/stream/polygon/${vestingData.polygon.USDCx.vestingStream.id}`, + "404 token page": "/token/polygon/Testing420HaveANiceDay", + "404 vesting page": "/vesting/polygon/Testing", + "minigame page": "/superfluid-runner", }; if (pagesAliases[name] === undefined) { throw new Error(`Hmm, you haven't set up the link for : ${name}`); diff --git a/tests/cypress/pageObjects/pages/DashboardPage.ts b/tests/cypress/pageObjects/pages/DashboardPage.ts index 89d32c38..a0b3aa92 100644 --- a/tests/cypress/pageObjects/pages/DashboardPage.ts +++ b/tests/cypress/pageObjects/pages/DashboardPage.ts @@ -14,7 +14,7 @@ const NETWORK_SELECTION_TOGGLE_APPENDIX = "-toggle]"; const NO_BALANCE_WRAP_BUTTON = "[data-cy=no-balance-wrap-button]"; const NO_BALANCE_MESSAGE = "[data-cy=no-balance-message]"; const LOADING_SKELETONS = "[data-cy=loading-skeletons]"; -const NET_FLOW_VALUES = "[data-cy=net-flow-value] [data-cy=token-amount]"; +const NET_FLOW_VALUES = "[data-cy=net-flow-value]"; const NO_NET_FLOW_VALUE = "[data-cy=net-flow-value]"; const NET_FLOW_FIAT = "[data-cy=net-flow-value] [data-cy=token-amount]"; const INFLOW_VALUES = "[data-cy=inflow]"; diff --git a/tests/cypress/pageObjects/pages/SendPage.ts b/tests/cypress/pageObjects/pages/SendPage.ts index a07a2dc8..3b28d2bd 100644 --- a/tests/cypress/pageObjects/pages/SendPage.ts +++ b/tests/cypress/pageObjects/pages/SendPage.ts @@ -177,6 +177,13 @@ export class SendPage extends BasePage { }); } + static validateEnsEntry(ensName:string) { + this.hasText(ENS_ENTRY_NAMES, ensName) + cy.fixture("commonData").then(data => { + this.hasText(ENS_ENTRY_ADDRESS, data[ensName]); + }) + } + static selectFirstENSResult() { this.clickFirstVisible(ENS_ENTRIES); } diff --git a/tests/cypress/support/e2e.js b/tests/cypress/support/e2e.js index ba7c6dc6..a89c0f51 100644 --- a/tests/cypress/support/e2e.js +++ b/tests/cypress/support/e2e.js @@ -16,6 +16,7 @@ // Import commands.js using ES2015 syntax: import "./commands"; import "@cypress/code-coverage/support"; +import "cypress-real-events"; Cypress.on("uncaught:exception", (err, runnable) => { if ( diff --git a/tests/cypress/support/step_definitions/ActivityPageSteps.ts b/tests/cypress/support/step_definitions/ActivityPageSteps.ts index b56bfd77..e9fb45ae 100644 --- a/tests/cypress/support/step_definitions/ActivityPageSteps.ts +++ b/tests/cypress/support/step_definitions/ActivityPageSteps.ts @@ -29,7 +29,7 @@ Given(/^User opens activity filter$/, () => { Given( /^User clicks on the "([^"]*)" toggle in the activity filter$/, (toggle: string) => { - ActivityPage.clickFilterToogle(toggle); + ActivityPage.clickFilterCheckbox(toggle); } ); Then( @@ -84,3 +84,17 @@ Then( ActivityPage.validateAddressBookNameInActivityRow(name); } ); + +Given( + /^User hover on the first address element in the activity history table$/, + () => { + ActivityPage.hoverOnFirstAddress(); + } +); + +Given(/^User clicks on the shown tooltip$/, () => { + ActivityPage.clickOnCopyTooltip(); +}); +Then(/^The copy tooltip shows "([^"]*)"$/, function (text: string) { + ActivityPage.validateCopyTooltipText(text); +}); diff --git a/tests/cypress/support/step_definitions/AddressBookSteps.ts b/tests/cypress/support/step_definitions/AddressBookSteps.ts index b7a26fb2..050eb06a 100644 --- a/tests/cypress/support/step_definitions/AddressBookSteps.ts +++ b/tests/cypress/support/step_definitions/AddressBookSteps.ts @@ -74,6 +74,30 @@ Then( Given(/^Address book test data is set up$/, function () { AddressBookPage.setupAddressBook(); }); +Given(/^User hovers on the first address in the address book$/, function () { + AddressBookPage.hoverOnFirstAddress(); +}); +Given( + /^User hovers on the first address copy button in the address book$/, + function () { + AddressBookPage.hoverOnFirstAddressCopyButton(); + } +); +Given( + /^User stops hovering on the first address in the address book$/, + function () { + AddressBookPage.stopHoveringOnFirstAddress(); + } +); +Then(/^User clicks on the first copy button$/, function () { + AddressBookPage.clickFirstCopyButton(); +}); +Then( + /^The copy tooltip in address book page shows "([^"]*)"$/, + function (text: string) { + AddressBookPage.validateTooltipText(text); + } +); Given( /^User searches for "([^"]*)" as a receiver and selects it$/, function (name: string) { diff --git a/tests/cypress/support/step_definitions/BridgePageSteps.ts b/tests/cypress/support/step_definitions/BridgePageSteps.ts index 579e915c..3ab4af9a 100644 --- a/tests/cypress/support/step_definitions/BridgePageSteps.ts +++ b/tests/cypress/support/step_definitions/BridgePageSteps.ts @@ -15,7 +15,12 @@ Given(/^Connect wallet button is visible$/, () => { Given(/^User inputs "([^"]*)" into the swap amount$/, (amount: string) => { BridgePage.inputSwapAmount(amount); }); - +Given(/^User selects "([^"]*)" as the network for the first token bridging$/, (network: string) => { + BridgePage.selectBridgeNetwork(network); +}); +Given(/^Featured super tokens on "([^"]*)" are visible$/, (network: string) => { + BridgePage.validateFeaturedTokensAreShownOn(network); +}); Given(/^Token swapping route for is correctly shown$/, () => { BridgePage.validateSwapRoute(); }); diff --git a/tests/cypress/support/step_definitions/CommonSteps.ts b/tests/cypress/support/step_definitions/CommonSteps.ts index e9877c08..80ce9349 100644 --- a/tests/cypress/support/step_definitions/CommonSteps.ts +++ b/tests/cypress/support/step_definitions/CommonSteps.ts @@ -78,6 +78,48 @@ Given(/^User uses view mode to look at "([^"]*)"$/, (account: string) => { Common.viewAccount(account); }); +Given(/^User clicks on the dark mode button$/, () => { + Common.clickDarkModeButton(); +}); + +Given(/^The dashboard theme is set to dark mode$/, () => { + Common.validateDashboardIsInDarkMode(); +}); + +Given(/^User clicks on the light mode button$/, () => { + Common.clickLightModeButton(); +}); + +Given(/^The dashboard theme is set to light mode$/, () => { + Common.validateDashboardIsInLightMode(); +}); + +Given(/^A lens entry for "([^"]*)" is visible$/, (account: string) => { + Common.validateLensEntryIsVisible(account); +}); +Given(/^The avatar image for "([^"]*)" is shown loaded$/, (account: string) => { + Common.validateLensImageIsLoaded(account); +}); +Given(/^User chooses the first lens entry from the list$/, () => { + Common.clickOnFirstLensEntry(); +}); + +Given(/^User opens the connected account modal$/, () => { + Common.clickOnConnectedWalletModal(); +}); +Given(/^User clicks on the copy address button in the account modal$/, () => { + Common.clickOnAddressModalCopyButton(); +}); +Given( + /^The address is copied and the buttons text in the address modal changes to "Copied!" with a checkmark icon$/, + () => { + Common.validateCopiedAddressInAddressModal(); + } +); +Given(/^User clicks on the disconnect button$/, () => { + Common.clickDisconnectButton(); +}); + Then(/^The stop viewing as an address button is visible$/, () => { WrapPage.isStopViewingButtonVisible(); }); @@ -97,10 +139,47 @@ Given(/^User closes the dropdown$/, () => { Then(/^User clicks on the view mode button$/, () => { Common.clickOnViewModeButton(); }); - +Then(/^Lens and ENS api requests are blocked$/, () => { + Common.blockLensAndENSApiRequests(); +}); +Then( + /^An error is shown in the "([^"]*)" receiver list$/, + (lensOrEns: string) => { + Common.validateErrorShownInRecepientList(lensOrEns); + } +); Then(/^User types "([^"]*)" into the address input$/, (input: string) => { Common.typeIntoAddressInput(input); }); +Then(/^User hovers on the modify streams onboarding card$/, () => { + Common.hoverOnModifyStreamsOnboardingCard(); +}); +Then(/^User clicks on the modify streams onboarding card$/, () => { + Common.clickModifyStreamsOnboardingCard(); +}); +Then( + /^The minigame container iframe is visible without a wallet connected$/, + () => { + Common.validateMiniGameContainerWithoutWalletConnected(); + } +); +Then(/^In-game cosmetics warning is shown$/, () => { + Common.validateMiniGameCosmeticsWarningIsVisible(); +}); + +Then(/^In-game cosmetics warning does not exist$/, () => { + Common.validateMiniGameCosmeticsWarningDoesNotExist(); +}); +Then( + /^The minigame container iframe is visible with a wallet connected$/, + () => { + Common.validateMiniGameContainerWithWalletConnected(); + } +); + +Then(/^Wallet connection modal is shown$/, () => { + Common.validateWalletConnectionModalIsShown(); +}); Then( /^"([^"]*)" address book entry for "([^"]*)" is visible in the search results$/, @@ -115,6 +194,18 @@ Then(/^User chooses the first address book result$/, () => { Then(/^View mode chip shows "([^"]*)"$/, (message: string) => { Common.validateViewModeChipMessage(message); }); +Then(/^View mode dialog does not exist$/, () => { + Common.validateNoViewModeDialogExists(); +}); +Then( + /^"([^"]*)" ENS entry in the address search results is shown$/, + (ensName: string) => { + SendPage.validateEnsEntry(ensName); + } +); +Then(/^Connected account dialog does not exist$/, () => { + Common.validateNoConnectedAccountDialogExists(); +}); Then(/^404 page is shown$/, () => { Common.errorPageIsVisible(); }); @@ -167,6 +258,13 @@ Then(/^User opens the navigation more menu$/, function () { Then(/^User opens the access code menu$/, function () { Common.openAccessCodeMenu(); }); +Then( + /^User clicks on the "([^"]*)" button in the more menu$/, + function (button: string) { + Common.clickMoreMenuButton(button); + } +); + Then(/^User types "([^"]*)" in the access code menu$/, function (code: string) { Common.inputAccessCode(code); }); diff --git a/tests/package.json b/tests/package.json index bd4af22b..8dcb2600 100644 --- a/tests/package.json +++ b/tests/package.json @@ -14,12 +14,12 @@ "@superfluid-finance/sdk-core": "0.6.8", "@truffle/encoder": "^1.0.23", "@truffle/hdwallet-provider": "^2.1.13", - "wagmi": "1.3.9", "babel-loader": "^9.1.3", "crypto-browserify": "^3.12.0", - "cypress": "12.17.2", + "cypress": "12.17.4", "cypress-cloud": "^1.9.2", "cypress-iframe": "^1.0.1", + "cypress-real-events": "^1.10.1", "date-fns": "^2.30.0", "ethereumjs-wallet": "^1.0.2", "ethers": "^5.7.2", @@ -28,6 +28,7 @@ "lodash": "^4.17.21", "minimist": "^1.2.8", "mochawesome": "7.1.3", + "nyc": "^15.1.0", "os-browserify": "^0.3.0", "path-browserify": "^1.0.1", "prettier": "^2.8.7", @@ -35,9 +36,16 @@ "stream-browserify": "^3.0.0", "ts-loader": "^9.4.4", "typescript": "^5.1.6", + "wagmi": "1.3.9", "web3-provider-engine": "^16.0.5", "webpack": "^5.88.2" }, + "nyc": { + "extension": [ + ".ts", + ".tsx" + ] + }, "cypress-cucumber-preprocessor": { "nonGlobalStepDefinitions": false, "omitFiltered": true, diff --git a/tests/tsconfig.json b/tests/tsconfig.json index e4d70a45..d9467587 100644 --- a/tests/tsconfig.json +++ b/tests/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "target": "es5", "lib": ["esnext", "dom"], - "types": ["cypress", "node"], + "types": ["cypress", "node", "cypress-real-events"], "esModuleInterop": true, "skipLibCheck": true }, diff --git a/tests/yarn.lock b/tests/yarn.lock index 6dd91f09..88e734c1 100644 --- a/tests/yarn.lock +++ b/tests/yarn.lock @@ -1328,10 +1328,10 @@ lazy-ass "1.6.0" ramda "0.26.1" -"@cypress/request@^2.88.11": - version "2.88.11" - resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.11.tgz#5a4c7399bc2d7e7ed56e92ce5acb620c8b187047" - integrity sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w== +"@cypress/request@2.88.12": + version "2.88.12" + resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.12.tgz#ba4911431738494a85e93fb04498cb38bc55d590" + integrity sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -1348,7 +1348,7 @@ performance-now "^2.1.0" qs "~6.10.3" safe-buffer "^5.1.2" - tough-cookie "~2.5.0" + tough-cookie "^4.1.3" tunnel-agent "^0.6.0" uuid "^8.3.2" @@ -2820,10 +2820,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== -"@types/node@^14.14.31": - version "14.18.36" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.36.tgz#c414052cb9d43fab67d679d5f3c641be911f5835" - integrity sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ== +"@types/node@^16.18.39": + version "16.18.48" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.48.tgz#3bc872236cdb31cb51024d8875d655e25db489a4" + integrity sha512-mlaecDKQ7rIZrYD7iiKNdzFb6e/qD5I9U1rAhq+Fd+DWvYVs+G2kv74UFHmSOlg5+i/vF3XxuR522V4u8BqO+Q== "@types/pbkdf2@^3.0.0": version "3.1.0" @@ -5100,14 +5100,19 @@ cypress-iframe@^1.0.1: resolved "https://registry.yarnpkg.com/cypress-iframe/-/cypress-iframe-1.0.1.tgz#2a286cfd47a240aa9af0ad9f339f4c6f942089f8" integrity sha512-Ne+xkZmWMhfq3x6wbfzK/SzsVTCrJru3R3cLXsoSAZyfUtJDamXyaIieHXeea3pQDXF4wE2w4iUuvCYHhoD31g== -cypress@12.17.2: - version "12.17.2" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.17.2.tgz#040ac55de1e811f6e037d231a2869d5ab8c29c85" - integrity sha512-hxWAaWbqQBzzMuadSGSuQg5PDvIGOovm6xm0hIfpCVcORsCAj/gF2p0EvfnJ4f+jK2PCiDgP6D2eeE9/FK4Mjg== +cypress-real-events@^1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/cypress-real-events/-/cypress-real-events-1.10.1.tgz#289f2cb4a1d452e54a19e1ecd02931016b41b8ff" + integrity sha512-l4WvEymhup8EAheXVPqEi5gofBTCvhyYL/i3fOcJtL32prfpZ6jhnnXSLJsxOAl/RlmygIEP1ZeRpqrrDPgGIA== + +cypress@12.17.4: + version "12.17.4" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.17.4.tgz#b4dadf41673058493fa0d2362faa3da1f6ae2e6c" + integrity sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ== dependencies: - "@cypress/request" "^2.88.11" + "@cypress/request" "2.88.12" "@cypress/xvfb" "^1.2.4" - "@types/node" "^14.14.31" + "@types/node" "^16.18.39" "@types/sinonjs__fake-timers" "8.1.1" "@types/sizzle" "^2.3.2" arch "^2.2.0" @@ -5140,6 +5145,7 @@ cypress@12.17.2: minimist "^1.2.8" ospath "^1.2.2" pretty-bytes "^5.6.0" + process "^0.11.10" proxy-from-env "1.0.0" request-progress "^3.0.0" semver "^7.5.3" @@ -8773,7 +8779,7 @@ number-to-bn@1.7.0: bn.js "4.11.6" strip-hex-prefix "1.0.0" -nyc@15.1.0: +nyc@15.1.0, nyc@^15.1.0: version "15.1.0" resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.1.0.tgz#1335dae12ddc87b6e249d5a1994ca4bdaea75f02" integrity sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A== @@ -9423,7 +9429,7 @@ prr@~1.0.1: resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== -psl@^1.1.28: +psl@^1.1.28, psl@^1.1.33: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== @@ -9548,6 +9554,11 @@ querystring@0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -9821,6 +9832,11 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + resolve-alpn@^1.0.0, resolve-alpn@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" @@ -10886,6 +10902,16 @@ toposort@^2.0.2: resolved "https://registry.yarnpkg.com/toposort/-/toposort-2.0.2.tgz#ae21768175d1559d48bef35420b2f4962f09c330" integrity sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg== +tough-cookie@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" + integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -11091,6 +11117,11 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" @@ -11147,6 +11178,14 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" +url-parse@^1.5.3: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + url-set-query@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339"