From 7c599ece234a452950a9f80783e8b379da455173 Mon Sep 17 00:00:00 2001 From: clau <1281581+dualcnhq@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:50:58 +0800 Subject: [PATCH 1/2] update home page tests --- tests/page-objects/home-page.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/page-objects/home-page.ts b/tests/page-objects/home-page.ts index 33d1f52d..93ea8947 100644 --- a/tests/page-objects/home-page.ts +++ b/tests/page-objects/home-page.ts @@ -39,11 +39,11 @@ export class HomePage { ), ).toBeVisible(); - const mediatypeHeroIconBar = this.page + const mediatypeHeroIconBars = this.page .locator('home-page-hero-block-icon-bar') .locator('#mediacount-icon-container > a') .all(); - expect((await mediatypeHeroIconBar).length).toBe(9); + expect((await mediatypeHeroIconBars).length).toBe(9); // New to the Archive carousel is present const homePageOnBoarding = this.page.locator('home-page-onboarding'); @@ -52,7 +52,7 @@ export class HomePage { .locator('#onboarding-carousel') .locator('#onboarding-content > a') .all(); - expect((await onboardingCarousel).length).toBe(9); + expect((await onboardingCarousel).length).toBe(8); // Top Collections section is present and populated const infiniteScroller = this.page.locator('infinite-scroller'); From e2204ee19861469c678620f26ef782da3fd32ed5 Mon Sep 17 00:00:00 2001 From: clau <1281581+dualcnhq@users.noreply.github.com> Date: Wed, 15 Jan 2025 02:48:56 +0800 Subject: [PATCH 2/2] update script and gh workflow --- .github/workflows/run-browserstack.yml | 2 +- run-tests.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-browserstack.yml b/.github/workflows/run-browserstack.yml index c576771b..15760185 100644 --- a/.github/workflows/run-browserstack.yml +++ b/.github/workflows/run-browserstack.yml @@ -29,4 +29,4 @@ jobs: access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - name: Connect to browserstack - run: npm run test:browserstack-node-sdk + run: ./run-tests.sh diff --git a/run-tests.sh b/run-tests.sh index cbcd7a13..06c072c3 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -1,4 +1,10 @@ TIMEFORMAT='It took %0R seconds.' time { - npm run test + npx browserstack-node-sdk playwright test ./tests/av + npx browserstack-node-sdk playwright test ./tests/books + npx browserstack-node-sdk playwright test ./tests/collection + npx browserstack-node-sdk playwright test ./tests/donation + npx browserstack-node-sdk playwright test ./tests/home + npx browserstack-node-sdk playwright test ./tests/login + npx browserstack-node-sdk playwright test ./tests/profile }