mirror of
https://github.com/go-gitea/gitea.git
synced 2024-10-01 03:36:12 -04:00
fix playwright
This commit is contained in:
parent
bf9d3b4cef
commit
e55a5cc4bb
@ -5,7 +5,7 @@ const BASE_URL = env.GITEA_URL?.replace?.(/\/$/g, '') || 'http://localhost:3000'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
testDir: './tests/e2e/',
|
testDir: './tests/e2e/',
|
||||||
testMatch: /.*\.test\.e2e\.js/, // Match any .test.e2e.js files
|
testMatch: /.*\.test\.e2e\.ts/, // Match any .test.e2e.ts files
|
||||||
|
|
||||||
/* Maximum time one test can run for. */
|
/* Maximum time one test can run for. */
|
||||||
timeout: 30 * 1000,
|
timeout: 30 * 1000,
|
||||||
|
@ -65,7 +65,7 @@ TEST_MSSQL_HOST=localhost:1433 TEST_MSSQL_DBNAME=gitea_test TEST_MSSQL_USERNAME=
|
|||||||
|
|
||||||
## Running individual tests
|
## Running individual tests
|
||||||
|
|
||||||
Example command to run `example.test.e2e.js` test file:
|
Example command to run `example.test.e2e.ts` test file:
|
||||||
|
|
||||||
_Note: unlike integration tests, this filtering is at the file level, not function_
|
_Note: unlike integration tests, this filtering is at the file level, not function_
|
||||||
|
|
||||||
|
@ -73,10 +73,10 @@ func TestMain(m *testing.M) {
|
|||||||
os.Exit(exitVal)
|
os.Exit(exitVal)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestE2e should be the only test e2e necessary. It will collect all "*.test.e2e.js" files in this directory and build a test for each.
|
// TestE2e should be the only test e2e necessary. It will collect all "*.test.e2e.ts" files in this directory and build a test for each.
|
||||||
func TestE2e(t *testing.T) {
|
func TestE2e(t *testing.T) {
|
||||||
// Find the paths of all e2e test files in test directory.
|
// Find the paths of all e2e test files in test directory.
|
||||||
searchGlob := filepath.Join(filepath.Dir(setting.AppPath), "tests", "e2e", "*.test.e2e.js")
|
searchGlob := filepath.Join(filepath.Dir(setting.AppPath), "tests", "e2e", "*.test.e2e.ts")
|
||||||
paths, err := filepath.Glob(searchGlob)
|
paths, err := filepath.Glob(searchGlob)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user