Changeset 56089
- Timestamp:
- 06/28/2023 10:45:16 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/e2e/specs/edit-posts.test.js
r55392 r56089 28 28 await page.waitForSelector( '#the-list .type-post' ); 29 29 30 // Expect there to be one row in the post list. 31 const posts = await page.$$( '#the-list .type-post' ); 32 expect( posts.length ).toBe( 1 ); 30 // Wait for the editor iframe to load, and switch to it as the active content frame. 31 const editorFrame = await page.waitForSelector( 'iframe[name="editor-canvas"]' ); 33 32 34 const [ firstPost ] = posts;33 const innerFrame = await editorFrame.contentFrame(); 35 34 36 // Expect the title of the post to be correct. 37 const postTitle = await firstPost.$x( 38 `//a[contains(@class, "row-title")][contains(text(), "${ title }")]` 35 // Wait for title field to render onscreen. 36 await innerFrame.waitForSelector( '.editor-post-title__input' ); 37 38 // Expect to now be in the editor with the correct post title shown. 39 const editorPostTitleInput = await innerFrame.$x( 40 `//h1[contains(@class, "editor-post-title__input")][contains(text(), "${ title }")]` 39 41 ); 40 42 expect( postTitle.length ).toBe( 1 );
Note: See TracChangeset
for help on using the changeset viewer.