Skip to content

Commit d1a9250

Browse files
authored
Merge pull request #98 from reactdeveloperske/webkit-test
2 parents ceeeb1d + 7ae1bed commit d1a9250

6 files changed

Lines changed: 31 additions & 26 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ jobs:
99
timeout-minutes: 60
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v2
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
1414
with:
1515
node-version: '14.x'
1616
- name: Install dependencies
1717
run: npm ci
1818
- name: Install Playwright Browsers
1919
run: npx playwright install --with-deps
2020
- name: Run Playwright tests
21-
run: npx playwright test
22-
- uses: actions/upload-artifact@v2
21+
run: npm run test
22+
- uses: actions/upload-artifact@v3
2323
if: always()
2424
with:
2525
name: playwright-report

.github/workflows/validate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
timeout-minutes: 60
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v2
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
1414
with:
1515
node-version: '14.x'
1616
- name: Install dependencies

e2e/default.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ test.beforeEach(async ({ page }) => {
66

77
test.describe('Basic test', () => {
88
test('should show the title', async ({ page }) => {
9-
const title = page.locator('title');
10-
await expect(title).toHaveText('Reactjs Developer Community in Kenya');
9+
await expect(
10+
page.getByRole('heading', { name: 'React Developer Community Kenya' })
11+
).toBeVisible();
1112
});
1213
});

e2e/events.spec.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ test.beforeEach(async ({ page }) => {
77
test.describe('Test if see more link is clickable', () => {
88
test('should navigate to the correct URL when See More is clicked', async ({
99
page,
10+
context,
11+
browserName,
1012
}) => {
13+
test.slow(browserName === 'webkit', 'This test times out on webkit');
1114
const [newPage] = await Promise.all([
12-
page.waitForEvent('popup'),
13-
page.locator('#events >> text="See More"').click(),
15+
context.waitForEvent('page'),
16+
page.waitForLoadState(),
17+
page.getByRole('link', { name: 'See More' }).click(),
1418
]);
1519
await expect(newPage).toHaveURL(
1620
'https://kommunity.com/reactjs-developer-community-kenya-reactdevske/events'

package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"react-dom": "18.1.0"
2020
},
2121
"devDependencies": {
22-
"@playwright/test": "1.22.2",
22+
"@playwright/test": "1.27.1",
2323
"@tailwindcss/aspect-ratio": "^0.4.0",
2424
"@types/react": "18.0.21",
2525
"@typescript-eslint/eslint-plugin": "^5.38.1",

0 commit comments

Comments
 (0)