| Server IP : 3.93.235.159 / Your IP : 216.73.216.140 Web Server : Apache System : Linux ip-172-26-0-169 5.10.0-46-cloud-amd64 #1 SMP Debian 5.10.262-1 (2026-07-31) x86_64 User : bitnami ( 1000) PHP Version : 8.2.9 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /bitnami/wordpress/wp-content/plugins/hello-plus/tests/playwright/tests/ |
Upload File : |
import { parallelTest as test } from '../parallelTest';
import { expect } from '@playwright/test';
import WpAdminPage from '../pages/wp-admin-page';
test.describe( 'Admin menu', () => {
test( 'That the menu is visible and has three entries', async ( { page, apiRequests }, testInfo ) => {
const wpAdmin = new WpAdminPage( page, testInfo, apiRequests );
await wpAdmin.gotoDashboard();
const helloBizCount = await wpAdmin.page.locator( '#toplevel_page_hello-biz' ).count();
const helloCommerceCount = await wpAdmin.page.locator( '#toplevel_page_hello-commerce' ).count();
expect( helloBizCount + helloCommerceCount ).toBeGreaterThan( 0 );
if ( helloBizCount > 0 ) {
expect( await wpAdmin.page.locator( '#toplevel_page_hello-biz' ).isVisible() ).toBeTruthy();
await wpAdmin.page.goto( '/wp-admin/admin.php?page=hello-biz' );
expect( await wpAdmin.page.locator( '#toplevel_page_hello-biz ul li:not(.wp-submenu-head)' ).count() ).toEqual( 4 );
}
if ( helloCommerceCount > 0 ) {
expect( await wpAdmin.page.locator( '#toplevel_page_hello-commerce' ).isVisible() ).toBeTruthy();
}
} );
} );