Skip to content

Commit

Permalink
diminuindo a quantidade de testes para avaliar o github action
Browse files Browse the repository at this point in the history
  • Loading branch information
ecureuill committed Dec 2, 2023
1 parent a2b9328 commit b8972eb
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 48 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
branches: [ main, dev ]
pull_request:
branches: [ main, master ]
branches: [ main, dev ]
jobs:
test:
timeout-minutes: 60
Expand Down
50 changes: 20 additions & 30 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,16 @@ export default defineConfig({
},
dependencies: ['setup'],
},
{
name: 'e2e problem user',
testMatch: '**/e2e/*.spec.ts',
testIgnore: '**/e2e/login.spec.ts',
use: {
...devices['Desktop Chrome'],
storageState: STORAGE_STATE_PROBLEM_USER
},
dependencies: ['setup'],
},
{
name: 'e2e visual user',
testMatch: '**/e2e/*.spec.ts',
testIgnore: '**/e2e/login.spec.ts',
use: {
...devices['Desktop Chrome'],
storageState: STORAGE_STATE_VISUAL_USER
},
dependencies: ['setup'],
},
// {
// name: 'e2e problem user',
// testMatch: '**/e2e/*.spec.ts',
// testIgnore: '**/e2e/login.spec.ts',
// use: {
// ...devices['Desktop Chrome'],
// storageState: STORAGE_STATE_PROBLEM_USER
// },
// dependencies: ['setup'],
// },
{
name: 'e2e error user',
testMatch: '**/e2e/*.spec.ts',
Expand All @@ -89,16 +79,16 @@ export default defineConfig({
},
dependencies: ['setup'],
},
{
name: 'e2e performance user',
testMatch: '**/e2e/*.spec.ts',
testIgnore: '**/e2e/login.spec.ts',
use: {
...devices['Desktop Chrome'],
storageState: STORAGE_STATE_PERFORMANCE_USER
},
dependencies: ['setup'],
},
// {
// name: 'e2e performance user',
// testMatch: '**/e2e/*.spec.ts',
// testIgnore: '**/e2e/login.spec.ts',
// use: {
// ...devices['Desktop Chrome'],
// storageState: STORAGE_STATE_PERFORMANCE_USER
// },
// dependencies: ['setup'],
// },
{
name: 'visual',
testMatch: '**/visual/*.spec.ts',
Expand Down
32 changes: 16 additions & 16 deletions tests/auth.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ setup('authenticate default user', async({page}) => {
await page.context().storageState({path: STORAGE_STATE_DEFAULT_USER});
})

setup('authenticate visual user', async({page}) => {
loginPage = new LoginPage(page);
await loginPage.visit();
await loginPage.formComponent.fill(data.visual_user);
await loginPage.formComponent.submit();
await page.waitForLoadState('networkidle');
// setup('authenticate visual user', async({page}) => {
// loginPage = new LoginPage(page);
// await loginPage.visit();
// await loginPage.formComponent.fill(data.visual_user);
// await loginPage.formComponent.submit();
// await page.waitForLoadState('networkidle');

await page.context().storageState({path: STORAGE_STATE_VISUAL_USER});
})
// await page.context().storageState({path: STORAGE_STATE_VISUAL_USER});
// })

setup('authenticate problem user', async({page}) => {
loginPage = new LoginPage(page);
Expand All @@ -44,12 +44,12 @@ setup('authenticate error user', async({page}) => {
await page.context().storageState({path: STORAGE_STATE_ERROR_USER});
})

setup('authenticate performance user', async({page}) => {
loginPage = new LoginPage(page);
await loginPage.visit();
await loginPage.formComponent.fill(data.performance_user);
await loginPage.formComponent.submit();
await page.waitForLoadState('networkidle');
// setup('authenticate performance user', async({page}) => {
// loginPage = new LoginPage(page);
// await loginPage.visit();
// await loginPage.formComponent.fill(data.performance_user);
// await loginPage.formComponent.submit();
// await page.waitForLoadState('networkidle');

await page.context().storageState({path: STORAGE_STATE_PERFORMANCE_USER});
})
// await page.context().storageState({path: STORAGE_STATE_PERFORMANCE_USER});
// })

0 comments on commit b8972eb

Please sign in to comment.