Skip to content

Commit

Permalink
SWC-6605: adjust timeouts based on test runs
Browse files Browse the repository at this point in the history
  • Loading branch information
hallieswan committed Nov 27, 2023
1 parent 7812a0f commit c2f3cd7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions e2e/discussions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ test.describe('Discussions', () => {
})

testAuth.afterAll(async ({ browser }) => {
test.slow()
if (userProject.id) {
await teardownProjectsAndFileHandles(
browser,
Expand Down
3 changes: 1 addition & 2 deletions e2e/files.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ test.describe('Files', () => {
})

testAuth.afterAll(async ({ browser }) => {
test.slow()
if (userProject.id) {
await teardownProjectsAndFileHandles(
browser,
Expand All @@ -196,8 +197,6 @@ test.describe('Files', () => {
testAuth(
'File sharing',
async ({ userPage, validatedUserPage, browserName }) => {
test.slow()

// Use test.fixme because test.fail doesn't mark test as expected to fail
// when there is a test timeout. Since test timeouts are expensive,
// Playwright recommends skipping the test entirely with test.fixme.
Expand Down
1 change: 1 addition & 0 deletions e2e/projects.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ test.describe('Projects', () => {
})

testAuth.afterAll(async ({ browser }) => {
test.slow()
// if test failed before project was deleted, then delete project here
if (projectId) {
const context = await browser.newContext()
Expand Down
4 changes: 1 addition & 3 deletions e2e/teams.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ test.describe.configure({ mode: 'serial' })
test.describe('Teams', () => {
testAuth(
'should exercise team lifecycle',
async ({ userPage, validatedUserPage }, testInfo) => {
test.slow()

async ({ userPage, validatedUserPage }) => {
const { userName, validatedUserName } = await testAuth.step(
'should get user names',
async () => {
Expand Down
4 changes: 2 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ dotenv.config()
// FIXME: expect timeout not available in testInfo fixture in v1.39
// change tests to use testInfo fixture once expect settings are exposed,
// see: https://github.com/microsoft/playwright/issues/27915
export const defaultExpectTimeout = process.env.CI ? 2 * 60 * 1000 : 5 * 1000
export const defaultTestTimeout = process.env.CI ? 6 * 60 * 1000 : 2 * 60 * 1000
export const defaultExpectTimeout = process.env.CI ? 60 * 1000 : 5 * 1000
export const defaultTestTimeout = 2 * 60 * 1000

/**
* See https://playwright.dev/docs/test-configuration.
Expand Down

0 comments on commit c2f3cd7

Please sign in to comment.