Skip to content

Commit 57af410

Browse files
authored
Merge pull request #108 from DominusKelvin/add-playwright-workflow
feat(specs): add playwright workflows
2 parents cb07017 + cf7ca43 commit 57af410

9 files changed

Lines changed: 80 additions & 0 deletions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Auto-generate Playwright tests with Codegen
2+
command: "npx playwright codegen {{url}}"
3+
arguments:
4+
- name: url
5+
description: "URL of the webpage."
6+
default_value: "playwright.dev"
7+
tags:
8+
- playwright
9+
description: "Auto-generates Playwright tests with Codegen."
10+
source_url: "https://playwright.dev/docs/codegen-intro#running-codegen"
11+
author: DominusKelvin
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Run a single Playwright project
2+
command: "npx playwright test --project={{projectName}}"
3+
arguments:
4+
- name: projectName
5+
description: "The project name."
6+
tags:
7+
- playwright
8+
description: "Run Playwright tests in a project."
9+
source_url: "https://playwright.dev/docs/test-advanced#projects"
10+
author: DominusKelvin
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Run a single Playwright test file
2+
command: "npx playwright test {{pathToFile}}"
3+
arguments:
4+
- name: pathToFile
5+
description: "The path to the test file to run."
6+
tags:
7+
- playwright
8+
description: "Runs a single Playwright test file."
9+
source_url: "https://playwright.dev/docs/running-tests"
10+
author: DominusKelvin
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Run all Playwright tests
2+
command: "npx playwright test"
3+
tags:
4+
- playwright
5+
description: "Runs all Playwright tests"
6+
source_url: "https://playwright.dev/docs/intro#running-the-example-test"
7+
author: DominusKelvin
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Run Playwright test in a specific browser
2+
command: "npx playwright test --browser={{browser}}"
3+
arguments:
4+
- name: browser
5+
description: "Browser to run tests in(either chromium, firefox, webkit or all)."
6+
default_value: "all"
7+
tags:
8+
- playwright
9+
description: "Runs Playwright tests in a specific browser."
10+
source_url: "https://playwright.dev/docs/test-cli#reference"
11+
author: DominusKelvin
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Run Playwright tests in debug mode
2+
command: "npx playwright test --debug"
3+
tags:
4+
- playwright
5+
description: "Runs Playwright tests in debug mode."
6+
source_url: "https://playwright.dev/docs/debug#--debug"
7+
author: DominusKelvin
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Run Playwright test with the title
2+
command: 'npx playwright test --g "{{testTitle}}"'
3+
arguments:
4+
- name: testTitle
5+
description: "The title of the test to run."
6+
tags:
7+
- playwright
8+
description: "Runs Playwright test with the title."
9+
source_url: "https://playwright.dev/docs/test-cli#reference"
10+
author: DominusKelvin
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Run Playwright tests in headed mode
2+
command: "npx playwright test --headed"
3+
tags:
4+
- playwright
5+
description: "Runs Playwright tests in headed mode."
6+
source_url: "https://playwright.dev/docs/test-cli#reference"
7+
author: DominusKelvin

specs/playwright/show-report.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Show report on Playwright tests
2+
command: "npx playwright show-report"
3+
tags:
4+
- playwright
5+
description: "Opens a webpage showing a report on your Playwright tests."
6+
source_url: "https://playwright.dev/docs/running-tests#test-reports"
7+
author: DominusKelvin

0 commit comments

Comments
 (0)