Skip to content

Commit a3172c5

Browse files
committed
fix:testes
1 parent 8aa51b7 commit a3172c5

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

pages/LoginPage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class LoginPage {
1616
}
1717

1818
async acessarPagina() {
19-
await this.page.goto('https://www.saucedemo.com/');
19+
await this.page.goto('/');
2020
}
2121

2222
async realizarLogin(user: string, pass: string) {

playwright.config.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export default defineConfig({
3131
reporter: 'html',
3232
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
3333
use: {
34-
baseURL: process.env.GOREST_BASE_URL,
3534
trace: 'on-first-retry',
3635
screenshot: 'only-on-failure',
3736
extraHTTPHeaders: {
@@ -41,6 +40,16 @@ export default defineConfig({
4140

4241
/* Configure projects for major browsers */
4342
projects: [
43+
{
44+
name: 'API-Tests',
45+
testMatch: /.*\.api\.spec\.ts/, // Só arquivos de API
46+
use: { baseURL: 'https://gorest.co.in' },
47+
},
48+
{
49+
name: 'E2E-Tests',
50+
testMatch: /.*\.e2e\.spec\.ts/, // Só arquivos de site
51+
use: { baseURL: 'https://www.saucedemo.com' },
52+
},
4453
{
4554
name: 'chromium',
4655
use: { ...devices['Desktop Chrome'] },

0 commit comments

Comments
 (0)