Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tests/e2e/specs/maintenance-mode.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,16 @@ test.describe( 'Maintenance mode', () => {
writeFileSync( maintenanceLockFile, '<?php $upgrading = 10000000000; ?>' ); // Year 2286.
} );

test.afterAll( async () => {
test.afterAll( async ( { request } ) => {
unlinkSync( maintenanceLockFile );

// A Docker file share can report a deleted file as present for about a
// second, and require() then fails in wp_is_maintenance_mode().
await expect( async () => {
const response = await request.get( '/' );
await expect( response ).toBeOK();
expect( await response.text() ).not.toContain( '.maintenance' );
}, 'should leave maintenance mode after the lock file is deleted' ).toPass( { timeout: 10_000 } );
} );

test( 'should display maintenance mode page', async ( { page } ) => {
Expand Down
Loading