-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add e2e infra with playwright and a sample test (#235)
* test: add e2e infra with playwright and a sample test * test: add github action for e2e test * test: add config for framework spin-up
- Loading branch information
Showing
5 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "Tests: E2E" | ||
on: [pull_request] | ||
jobs: | ||
tests_e2e: | ||
name: Run end-to-end tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: install dependencies | ||
run: npm ci | ||
- name: install playwright browsers | ||
run: npx playwright install --with-deps | ||
- name: npm run test:e2e | ||
run: npm run test:e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { test, expect } from '@playwright/test' | ||
|
||
test('page should have title of "קהילת Pull Request"', async ({page}) => { | ||
await page.goto('http://localhost:3000/') | ||
const title = await page.title() | ||
expect(title).toBe('קהילת Pull Request') | ||
}); | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { PlaywrightTestConfig } from "@playwright/test"; | ||
|
||
const config: PlaywrightTestConfig = { | ||
webServer: { | ||
command: "npm run start", | ||
url: "http://localhost:3000", | ||
} | ||
}; | ||
|
||
export default config; |