Skip to content

Commit 3c2dab2

Browse files
author
pavanpatil1
committed
Address feedback
1 parent 6f2c0c8 commit 3c2dab2

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

tests/e2e-playwright/specs/01_validate-settings-test.spec.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@ test.describe("Validate the settings", () => {
77
test("Should able to validate the settings", async ({ admin, page }) => {
88
await admin.visitAdminPage("/");
99

10-
await page.screenshot({path: "uploads/img.png"});
11-
1210
await page.hover('role=link[name="Settings"i]');
1311

1412
await page.click('role=link[name="Nginx Helper"i]');
15-
await page.screenshot({path: "uploads/img2.png"});
1613

17-
await page.waitForTimeout(1000);
14+
await page.waitForTimeout(2000);
1815

1916
expect(page.locator(".rt_option_title")).toHaveText("Nginx Settings");
2017
});

tests/e2e-playwright/specs/06_validate-supportpage-test.spec.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99

1010
await page.hover('role=link[name="Settings"i]');
1111

12-
await page.click('role=link[name="Nginx Helper"i]');
13-
await page.screenshot({path: "uploads/img3.png"});
12+
await page.click('role=link[name="Nginx Helper"i]');;
1413

15-
await page.waitForTimeout(1000);
14+
await page.waitForTimeout(2000);
1615

1716
expect(page.locator(".rt_option_title")).toHaveText("Nginx Settings");
1817

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* WordPress dependencies
3+
*/
4+
const { test, expect } = require("@wordpress/e2e-test-utils-playwright");
5+
6+
test.describe("Validate the radis cache settings", () => {
7+
test("Should able to validate the radis settings", async ({ admin, page }) => {
8+
await admin.visitAdminPage("/");
9+
10+
await page.hover('role=link[name="Settings"i]');
11+
12+
await page.click('role=link[name="Nginx Helper"i]');
13+
14+
await page.waitForTimeout(1000);
15+
16+
expect(page.locator(".rt_option_title")).toHaveText("Nginx Settings");
17+
18+
// Validate the radis cache settings.
19+
await page.click( 'role=radio[name="Redis cache"i]' );
20+
expect( page.locator("div[class='postbox cache_method_redis'] span")).toBeVisible();
21+
22+
await page.click("#smart_http_expire_save");
23+
24+
await page.waitForTimeout(1000);
25+
expect(page.locator("div[class='updated'] p")).toHaveText(
26+
"Settings saved."
27+
);
28+
});
29+
});
30+

0 commit comments

Comments
 (0)