From c0e02dbae3ac0b33ca82700ed19b6712a7da0433 Mon Sep 17 00:00:00 2001 From: Michalina Date: Fri, 15 Dec 2023 10:11:22 +0100 Subject: [PATCH 1/3] Update release test list after Beta End Stage 1 We've changed some functionalities due to first stage of Beta End. Our release testlist needs to reflect the new expected behavior. --- .../workflows/test-list/release-test-list.md | 49 ++++++++++++------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test-list/release-test-list.md b/.github/workflows/test-list/release-test-list.md index 10d4fbe6..0e4aea64 100644 --- a/.github/workflows/test-list/release-test-list.md +++ b/.github/workflows/test-list/release-test-list.md @@ -13,33 +13,37 @@ environment 🚀** ## Manual tests -\*many of these tests can be combined with each other as you're testing. I suggest looking through the whole checklist first then executing tests in a way that allows you to check off multiple items at once. Some suggestions are provided. +Many of these tests can be combined with each other as you're testing. I suggest +looking through the whole checklist first then executing tests in a way that +allows you to check off multiple items at once. Some suggestions are provided. 1. Connect to wallet that previously staked - [ ] you see the Portal is Open message - - [ ] you can see the map after entering + - [ ] you can see the map after entering and the Beta has ended modal + - [ ] you see the Claim your NFT and Get Updates - [ ] you see your address connected - [ ] you see the name of your realm - - [ ] you can navigate to other realms but not stake in them - - [ ] you can stake more TAHO in that realm if you're not fully staked + - [ ] you can navigate to all realms but not stake in any of them - [ ] you can unstake 2. Connect to wallet that hasn't staked but has $TAHO - [ ] you see the Portal is Open message - - [ ] you can see the map after entering + - [ ] you can see the map after entering and the Beta has ended modal + - [ ] you see the Claim your NFT and Get Updates - [ ] you see your address connected - [ ] you don't see a realm name beside that - - [ ] you can explore realms and stake into one (if you staked above, you don't have to do it again. Just make sure to test stake and unstake at least once) + - [ ] you can navigate to all realms but not stake in any of them 3. Connect to wallet that has NO $TAHO (& no $VETAHO) - - [ ] you see the Portal is Open message and the Join Beta button - - [ ] Join Beta redirect works as expected + - [ ] you see the Portal is Open message, but no buttons to join Beta or + enter the map - [ ] you can't see the map -4. Switch connected wallet in the extension (it's easy to check these off along with the above while you're switching accounts) +4. Switch connected wallet in the extension (it's easy to check these off along + with the above while you're switching accounts) - [ ] dapp reloads and shows the portal screen - [ ] reloads with Connect Wallet button if you go to a wallet that's not @@ -48,7 +52,7 @@ environment 🚀** the address: if it's an eligible address, you see Access Granted & Enter the portal - [ ] reloads with that address connected if that's a connected website for - the address: if it's an inelligible address, you see the Portal is Open + the address: if it's an ineligible address, you see the Portal is Open message and Join Beta button 5. Helper Tool @@ -58,18 +62,18 @@ environment 🚀** - [ ] doesn't pop up automatically for staked users - [ ] does come up with the correct message when you click it (standard "hang in there, Nomad...") - - [ ] does come up properly for a user connecting for the first time and - running through onboarding + - [ ] does not show up for a user connecting for the first time -6. Population (this is easily tested with the above when you're staking/unstaking - verify the population changes and then you've combined these tests with that) +6. Population (this is easily tested with the above when you're unstaking - + verify the population changes and then you've combined these tests with that) - [ ] shows on each realm - [ ] shows on the bottom bar - - [ ] is updated appropriately if a new account stakes + - [ ] is updated appropriately if a new account stakes/unstakes -7. Challenges/ +7. Challenges - - [ ] shows on each realm as expected + - [ ] are not shown anywhere in the dapp 8. Disconnect from dapp @@ -88,8 +92,15 @@ environment 🚀** - [ ] with Taho not installed and no other - should show both options - Taho directs to the Chrome store, MM opens the connection method screen and directs to the Chrome store + 10. XP -- [ ] an account with XP to claim sees that under Claimable Rewards on the Realm modal (in pre-prod we can see this on stage-live but might be easiest to only test this when we're testing XP drops) -- [ ] account can claim XP and sees the wallet balance of VETAHO change accordingly (requires that the account earned XP and hasn't claimed it yet so this could be hard to test on each release but when we're testing XP drops, we should do this) -- [ ] leaderboard shows the top 10 earners in the realm - the connected account is shown at the top with their place on the board shown + - [ ] an account with XP to claim sees that under Claimable Rewards on the + Realm modal (in pre-prod we can see this on stage-live but might be + easiest to only test this when we're testing XP drops) + - [ ] account can claim XP and sees the wallet balance of VETAHO change + accordingly (requires that the account earned XP and hasn't claimed it + yet so this could be hard to test on each release but when we're + testing XP drops, we should do this) + - [ ] leaderboard shows the top 10 earners in the realm - the connected + account is shown at the top with their place on the board shown From 38c2cb037bb52ad46be78baf586d28b3775a2380 Mon Sep 17 00:00:00 2001 From: vvatom Date: Wed, 20 Dec 2023 18:11:18 +0100 Subject: [PATCH 2/3] Create basic playwright setup --- .gitignore | 6 +++++- e2e/connection.spec.ts | 7 +++++++ package.json | 2 ++ playwright.config.ts | 33 +++++++++++++++++++++++++++++++++ yarn.lock | 38 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 e2e/connection.spec.ts create mode 100644 playwright.config.ts diff --git a/.gitignore b/.gitignore index 13a60cd3..017bd68f 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,8 @@ yarn-error.log dist # Reflect files -.reflect \ No newline at end of file +.reflect +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ diff --git a/e2e/connection.spec.ts b/e2e/connection.spec.ts new file mode 100644 index 00000000..90b45d3a --- /dev/null +++ b/e2e/connection.spec.ts @@ -0,0 +1,7 @@ +import { test, expect } from "@playwright/test" + +test("Visit Subscape", async ({ page }) => { + await page.goto("https://app.taho.xyz/") + await expect(page).toHaveTitle("Subscape") + await page.getByText("Connect wallet").nth(1).click() +}) diff --git a/package.json b/package.json index dced6cd5..a601b909 100644 --- a/package.json +++ b/package.json @@ -63,9 +63,11 @@ "@babel/preset-react": "^7.22.5", "@babel/preset-typescript": "^7.22.5", "@babel/register": "^7.22.5", + "@playwright/test": "^1.40.0", "@thesis-co/eslint-config": "^0.5.0", "@thesis/prettier-config": "github:thesis/prettier-config", "@types/dotenv-webpack": "^7.0.4", + "@types/node": "^20.10.0", "@types/raf-schd": "^4.0.1", "@types/react": "^18.2.14", "@types/react-dom": "^18.2.6", diff --git a/playwright.config.ts b/playwright.config.ts new file mode 100644 index 00000000..7316306f --- /dev/null +++ b/playwright.config.ts @@ -0,0 +1,33 @@ +import { defineConfig, devices } from "@playwright/test" +import "dotenv-defaults/config" + +export default defineConfig({ + testDir: "./e2e", + /* Run tests in files in parallel */ + fullyParallel: true, + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + /* Retry on CI only */ + retries: process.env.CI ? 2 : 0, + /* Opt out of parallel tests on CI. */ + workers: process.env.CI ? 1 : undefined, + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: "html", + /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + use: { + /* Base URL to use in actions like `await page.goto('/')`. */ + // baseURL: 'http://127.0.0.1:3000', + + /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ + trace: "on-first-retry", + headless: false, + }, + + /* Configure projects for major browsers */ + projects: [ + { + name: "chromium", + use: { ...devices["Desktop Chrome"] }, + }, + ], +}) diff --git a/yarn.lock b/yarn.lock index 8c396032..8d02b001 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2230,6 +2230,13 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@playwright/test@^1.40.0": + version "1.40.0" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.40.0.tgz#d06c506977dd7863aa16e07f2136351ecc1be6ed" + integrity sha512-PdW+kn4eV99iP5gxWNSDQCbhMaDVej+RXL5xr6t04nbKLCBwYtA046t7ofoczHOm8u6c+45hpDKQVZqtqwkeQg== + dependencies: + playwright "1.40.0" + "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -2874,6 +2881,13 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.5.7.tgz#4b8ecac87fbefbc92f431d09c30e176fc0a7c377" integrity sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA== +"@types/node@^20.10.0": + version "20.10.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.0.tgz#16ddf9c0a72b832ec4fcce35b8249cf149214617" + integrity sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ== + dependencies: + undici-types "~5.26.4" + "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -6219,6 +6233,11 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fsevents@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + fsevents@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" @@ -8373,6 +8392,20 @@ pkg-dir@^7.0.0: dependencies: find-up "^6.3.0" +playwright-core@1.40.0: + version "1.40.0" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.40.0.tgz#82f61e5504cb3097803b6f8bbd98190dd34bdf14" + integrity sha512-fvKewVJpGeca8t0ipM56jkVSU6Eo0RmFvQ/MaCQNDYm+sdvKkMBBWTE1FdeMqIdumRaXXjZChWHvIzCGM/tA/Q== + +playwright@1.40.0: + version "1.40.0" + resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.40.0.tgz#2a1824b9fe5c4fe52ed53db9ea68003543a99df0" + integrity sha512-gyHAgQjiDf1m34Xpwzaqb76KgfzYrhK7iih+2IzcOCoZWr/8ZqmdBw+t0RU85ZmfJMgtgAiNtBQ/KS2325INXw== + dependencies: + playwright-core "1.40.0" + optionalDependencies: + fsevents "2.3.2" + pngjs@^3.3.0: version "3.4.0" resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f" @@ -9925,6 +9958,11 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + undici@^5.22.1: version "5.27.2" resolved "https://registry.yarnpkg.com/undici/-/undici-5.27.2.tgz#a270c563aea5b46cc0df2550523638c95c5d4411" From 8a4a57b7e5c911219f77b19b260997e622ebc827 Mon Sep 17 00:00:00 2001 From: Jagoda Berry Rybacka Date: Thu, 21 Dec 2023 15:18:11 +0100 Subject: [PATCH 3/3] Update XP claim date --- src/ui/DApps/IslandView.tsx | 2 +- .../Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx | 2 +- src/ui/Island/RealmPanel/RealmPanelCountdown.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/DApps/IslandView.tsx b/src/ui/DApps/IslandView.tsx index d4f4cf33..3f897010 100644 --- a/src/ui/DApps/IslandView.tsx +++ b/src/ui/DApps/IslandView.tsx @@ -42,7 +42,7 @@ export default function IslandView() { onClose={() => setBetaEndModalVisible(false)} > Thanks for participating in our Beta, we hope you had fun and see you - in Season 1. You can still claim your XP until Dec 21 2023. + in Season 1. You can still claim your XP until Jan 15 2024. )} diff --git a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx index acec696f..37261546 100644 --- a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx +++ b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx @@ -101,7 +101,7 @@ function RealmDetailsRewards({ {process.env.IS_BETA_CLOSED === "true" && (
- Claiming will be live till Dec 21 2023 + Claiming will be live till Jan 15 2024
)} diff --git a/src/ui/Island/RealmPanel/RealmPanelCountdown.tsx b/src/ui/Island/RealmPanel/RealmPanelCountdown.tsx index 8eee7cd1..8b2bc62e 100644 --- a/src/ui/Island/RealmPanel/RealmPanelCountdown.tsx +++ b/src/ui/Island/RealmPanel/RealmPanelCountdown.tsx @@ -45,7 +45,7 @@ export default function RealmPanelCountdown() {
{process.env.IS_BETA_CLOSED === "true" - ? "Beta is over, claim XP till Dec 21 2023" + ? "Beta is over, claim XP till Jan 15 2024" : timeRemaining}