PluginProbe
Extendify / 3.1.0
Extendify v3.1.0
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / tests / playwright / HelpCenter / tours.spec.ts

tours.spec.ts in Extendify 3.1.0, at tests/playwright/HelpCenter/tours.spec.ts

48 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { expect, test } from '../fixtures';
2
3 test.beforeEach(async ({ requestUtils }) => {
4 await requestUtils.login();
5 });
6
7 test('Tours section lists available tours', async ({ admin, page }) => {
8 await admin.visitAdminPage('index.php');
9
10 await page.getByTestId('help-center-adminbar-button').click();
11
12 const toursSection = page.getByTestId('help-center-tours-section');
13 await expect(toursSection).toBeAttached();
14 await expect(toursSection).toContainText(
15 'Learn more about your WordPress admin',
16 );
17
18 await page.getByTestId('help-center-tours-open-button').click();
19
20 const items = page.getByTestId('help-center-tours-items-list').locator('li');
21 expect(await items.count()).toBeGreaterThan(1);
22 });
23
24 test('Completing a tour shows the restart icon', async ({ admin, page }) => {
25 await admin.visitAdminPage('index.php');
26
27 await page.getByTestId('help-center-adminbar-button').click();
28 await page.getByTestId('help-center-tours-open-button').click();
29
30 await page
31 .getByTestId('help-center-tours-items-list')
32 .locator('li')
33 .first()
34 .locator('button')
35 .click();
36
37 await page
38 .locator('#extendify-tour-navigation nav[aria-label="Tour Steps"] button')
39 .last()
40 .click();
41
42 await page.locator('#help-center-tour-next-button').click();
43
44 await page.getByTestId('help-center-toggle-minimize-button').click();
45
46 await expect(page.getByTestId('restart-tour-icon')).toHaveCount(1);
47 });
48