Skip to content

Commit 2ad61d8

Browse files
committed
Version update 1.46
Updated the config file
1 parent a1a44a1 commit 2ad61d8

File tree

4 files changed

+68
-39
lines changed

4 files changed

+68
-39
lines changed

package-lock.json

Lines changed: 57 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"license": "ISC",
1818
"devDependencies": {
1919
"@axe-core/playwright": "4.6.0",
20-
"@playwright/test": "^1.42.1",
20+
"@playwright/test": "^1.46.0",
21+
"@types/node": "^22.2.0",
2122
"allure-playwright": "^2.0.0-beta.20"
2223
}
2324
}

playwright.config.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { PlaywrightTestConfig } from '@playwright/test';
2-
import { devices } from '@playwright/test';
1+
import { defineConfig, devices } from '@playwright/test';
32

43
/**
54
* Read environment variables from file.
@@ -10,7 +9,7 @@ import { devices } from '@playwright/test';
109
/**
1110
* See https://playwright.dev/docs/test-configuration.
1211
*/
13-
const config: PlaywrightTestConfig = {
12+
export default defineConfig({
1413
testDir: './tests',
1514
/* Maximum time one test can run for. */
1615
timeout: 20 * 1000,
@@ -19,7 +18,7 @@ const config: PlaywrightTestConfig = {
1918
* Maximum time expect() should wait for the condition to be met.
2019
* For example in `await expect(locator).toHaveText();`
2120
*/
22-
timeout: 5000
21+
timeout: 5000,
2322
},
2423

2524
/* Run tests in files in parallel */
@@ -40,7 +39,7 @@ const config: PlaywrightTestConfig = {
4039
use: {
4140
viewport: null,
4241
// extraHTTPHeaders: {
43-
// "Authorozation" : "Basic"
42+
// "Authorization" : "Basic"
4443
// },
4544
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
4645
actionTimeout: 0,
@@ -52,8 +51,8 @@ const config: PlaywrightTestConfig = {
5251
video: 'retry-with-video',
5352
launchOptions: {
5453
headless: true,
55-
args: ["--start-maximized"]
56-
}
54+
args: ["--start-maximized"],
55+
},
5756
// httpCredentials: {
5857
// username: 'bill',
5958
// password: 'pa55w0rd',
@@ -68,7 +67,6 @@ const config: PlaywrightTestConfig = {
6867
...devices['Desktop Chrome'],
6968
screenshot: 'on',
7069
trace: 'on',
71-
7270
},
7371
},
7472

@@ -108,7 +106,6 @@ const config: PlaywrightTestConfig = {
108106
// },
109107
// },
110108
// {
111-
// {
112109
// name: 'Google Chrome',
113110
// use: {
114111
// channel: 'chrome',
@@ -124,6 +121,5 @@ const config: PlaywrightTestConfig = {
124121
// command: 'npm run start',
125122
// port: 3000,
126123
// },
127-
};
124+
});
128125

129-
export default config;

tests/networkMocking.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ test.describe('Network mocking examples', () => {
1313
})
1414
await loginPage.goTo();
1515
await loginPage.validLogin(testData.username, testData.password);
16-
await page.waitForResponse("https://rahulshettyacademy.com/api/ecom/product/get-all-products");
16+
// await page.waitForResponse("https://rahulshettyacademy.com/api/ecom/product/get-all-products");
17+
await page.close();
1718
})
1819

1920
});

0 commit comments

Comments
 (0)