Skip to content

Commit 93c47ff

Browse files
committed
Integrate Playwrightwith GitHub Actions
1 parent a887f15 commit 93c47ff

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

.github/workflows/playwright.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: Playwright Tests
22
on:
33
push:
44
branches: [main, master]
5-
pull_request:
6-
branches: [main, master]
5+
76
jobs:
87
test:
98
timeout-minutes: 60
@@ -18,7 +17,7 @@ jobs:
1817
- name: Install Playwright Browsers
1918
run: npx playwright install --with-deps
2019
- name: Run Playwright tests
21-
run: npx playwright test --grep PlaywrightWithAzureDevOpsPipeline
20+
run: npx playwright test --grep PlaywrightWithGitHubActions
2221
- uses: actions/upload-artifact@v4
2322
if: ${{ !cancelled() }}
2423
with:

tests/Chapter01/01_Record_Test.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { test, expect } from '@playwright/test';
33
/**
44
* Author Testers Talk
55
*/
6-
test('[3] Record a test', { tag: ['@PlaywrightWithAzureDevOpsPipeline'] }, async ({ page }) => {
6+
test('[3] Record a test', { tag: ['@PlaywrightWithAzureDevOpsPipeline','@PlaywrightWithGitHubActions'] }, async ({ page }) => {
77

88
await test.step('Navigating to URL', async () => {
99
await page.goto('https://github.com/');
@@ -29,7 +29,7 @@ test('[3] Record a test', { tag: ['@PlaywrightWithAzureDevOpsPipeline'] }, async
2929
/**
3030
* Author Testers Talk
3131
*/
32-
test('[8] Test 2 will fail', { tag: ['@PlaywrightWithAzureDevOpsPipeline'] }, async ({ page }) => {
32+
test('[8] Test 2 will fail', { tag: ['@PlaywrightWithAzureDevOpsPipeline','@PlaywrightWithGitHubActions'] }, async ({ page }) => {
3333
await page.goto('https://www.youtube.com/@testerstalk');
3434
expect(true).toBe(false);
3535
});

tests/Chapter06/08_DELETE_API_Request.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test.use({
1515
/**
1616
* Author Testers Talk
1717
*/
18-
test('[10,11] Create DELETE API Request using playwright & typescript', { tag: ['@PlaywrightWithJenkins', '@PlaywrightWithAzureDevOpsPipeline'] }, async ({ request }) => {
18+
test('[10,11] Create DELETE API Request using playwright & typescript', { tag: ['@PlaywrightWithJenkins', '@PlaywrightWithAzureDevOpsPipeline','@PlaywrightWithGitHubActions'] }, async ({ request }) => {
1919

2020
const firstName = faker.person.firstName();
2121
const lastName = faker.person.lastName();

0 commit comments

Comments
 (0)