-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1536b7
commit f74be4e
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { test, expect } from '@wordpress/e2e-test-utils-playwright'; | ||
|
||
test.describe( 'Timeline Block', () => { | ||
test.beforeEach( async({ admin }) => { | ||
await admin.createNewPost(); | ||
}); | ||
|
||
test( 'insert block', async({ editor, page }) => { | ||
|
||
await editor.insertBlock({ | ||
name: 'themeisle-blocks/timeline' | ||
}); | ||
|
||
await expect( page.locator( '.o-timeline-content' ).first() ).toBeVisible(); // First container visible. | ||
await expect( page.getByText( 'Project Launch' ) ).toBeVisible(); // Content visible. | ||
|
||
const postId = await editor.publishPost(); | ||
await page.goto( `/?p=${postId}` ); | ||
|
||
await expect( page.locator( '.o-timeline-content' ).first() ).toBeVisible(); // First container visible. | ||
await expect( page.getByText( 'Project Launch' ) ).toBeVisible(); // Content visible. | ||
|
||
await page.waitForTimeout( 1000 ); | ||
}); | ||
|
||
}); |