Skip to content

Commit

Permalink
automation: update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJoin95 committed Oct 30, 2024
1 parent fc66b64 commit d71c9fd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ on:
branches: [ main, master ]
jobs:
test:
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: db
POSTGRESQL_FSYNC: "off"
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 4 additions & 4 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://127.0.0.1:3000',
baseURL: 'http://127.0.0.1:3001',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
Expand Down Expand Up @@ -66,9 +66,9 @@ export default defineConfig({
],

/* Run your local dev server before starting the tests */
/* webServer: {
webServer: {
command: 'npm run build',
url: 'http://127.0.0.1:3000',
url: 'http://127.0.0.1:3001',
reuseExistingServer: !process.env.CI,
}, */
},
});
4 changes: 2 additions & 2 deletions tests/signup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ test.describe('Signup page', () => {
signUpPage = new SignUpPage(page)
})

test('Signup page is loading and has the basic elements', async ({ page }) => {
await signUpPage.goto('http://localhost:3000/signup')
test('Signup page is loading and has the basic elements', async () => {
await signUpPage.goto('/signup')

await signUpPage.hasH1()
await signUpPage.hasPresidentQuote()
Expand Down

0 comments on commit d71c9fd

Please sign in to comment.