From b8972eb0aa8d1ec25ca31e277a9f5b991b9c7888 Mon Sep 17 00:00:00 2001 From: ecureuill Date: Sat, 2 Dec 2023 20:12:38 -0300 Subject: [PATCH] diminuindo a quantidade de testes para avaliar o github action --- .github/workflows/playwright.yml | 4 +-- playwright.config.ts | 50 +++++++++++++------------------- tests/auth.setup.ts | 32 ++++++++++---------- 3 files changed, 38 insertions(+), 48 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 28f3e05..dd4682e 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -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 diff --git a/playwright.config.ts b/playwright.config.ts index f3e4b47..3e0813a 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -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', @@ -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', diff --git a/tests/auth.setup.ts b/tests/auth.setup.ts index 7e0196a..a9abdde 100644 --- a/tests/auth.setup.ts +++ b/tests/auth.setup.ts @@ -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); @@ -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}); -}) \ No newline at end of file +// await page.context().storageState({path: STORAGE_STATE_PERFORMANCE_USER}); +// }) \ No newline at end of file