File tree Expand file tree Collapse file tree 4 files changed +15
-10
lines changed
Expand file tree Collapse file tree 4 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -524,7 +524,7 @@ test-e2e-sqlite: build generate-ini-sqlite
524524test-e2e-sqlite\#% : GOFLAGS+=sqlite sqlite_unlock_notify
525525test-e2e-sqlite\#% : build generate-ini-sqlite
526526 npx playwright install $(PLAYWRIGHT_FLAGS )
527- GITEA_ROOT=$(CURDIR ) GITEA_EXECUTABLE=$(EXECUTABLE ) GITEA_CONF=integrations/sqlite.ini E2E_TESTS=$* ./tools/e2e/run_e2e.sh
527+ GITEA_ROOT=$(CURDIR ) GITEA_EXECUTABLE=$(EXECUTABLE ) GITEA_CONF=integrations/sqlite.ini E2E_TESTS=$* ./tools/e2e/run_e2e.sh
528528
529529.PHONY : test-e2e-mysql8
530530test-e2e-mysql8 : build generate-ini-mysql8
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ import {devices} from '@playwright/test';
66 * @type {import('@playwright/test').PlaywrightTestConfig }
77 */
88const config = {
9- testDir : './tools/e2e/tests' ,
9+ testDir : './tools/e2e/tests' , // TODO: Change this to the ./web_src/ dir?
10+ testMatch : / .* \. t e s t \. e 2 e \. j s / , // Match any .test.e2e.js files
1011
1112 /* Maximum time one test can run for. */
1213 timeout : 30 * 1000 ,
@@ -41,6 +42,9 @@ const config = {
4142 /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
4243 actionTimeout : 1000 ,
4344
45+ /* Maximum time allowed for navigation, such as `page.goto()`. */
46+ navigationTimeout : 5 * 1000 ,
47+
4448 /* Base URL to use in actions like `await page.goto('/')`. */
4549 baseURL : 'http://localhost:3000' ,
4650
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // @ts -check
2+ import { test , expect } from '@playwright/test' ;
3+
4+ test ( 'Load Homepage' , async ( { page} ) => {
5+ const response = await page . goto ( '/' ) ;
6+ await expect ( response . status ( ) ) . toBe ( 200 ) ; // Status OK
7+ await expect ( page ) . toHaveTitle ( / ^ G i t e a : T e s t \s * $ / ) ;
8+ await expect ( page . locator ( '.logo' ) ) . toHaveAttribute ( 'src' , '/assets/img/logo.svg' ) ;
9+ } ) ;
You can’t perform that action at this time.
0 commit comments