WordPress.org

Make WordPress Core

Ticket #48978: 48978-2.patch

File 48978-2.patch, 817 bytes (added by hideokamoto, 2 months ago)

New patch file for the ticket

  • tests/e2e/specs/hello.test.js

    diff --git a/tests/e2e/specs/hello.test.js b/tests/e2e/specs/hello.test.js
    index 038957883b..0029ee4061 100644
    a b  
    1 import { visitAdminPage } from '@wordpress/e2e-test-utils';
     1import { visitAdminPage, createURL, loginUser } from '@wordpress/e2e-test-utils';
    22
    33describe( 'Hello World', () => {
    44        it( 'Should load properly', async () => {
    describe( 'Hello World', () => { 
    99                expect( nodes.length ).not.toEqual( 0 );
    1010        } );
    1111} );
     12describe( 'Admin Bar', () => {
     13        it( 'Should show admin bar when user logged in' , async () => {
     14                await loginUser();
     15                await page.goto( createURL( '/' ) );
     16                const nodes = await page.$$( '#wpadminbar' );
     17                expect( nodes.length ).toBe( 1 );
     18        } );
     19} );
     20 No newline at end of file