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 } 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');