Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
69ed6a2
WIP Playwright migration
swissspidy Sep 27, 2023
d76a2c3
Convert visual regression tests
swissspidy Sep 27, 2023
f1f7ce1
Fix mask config
swissspidy Sep 27, 2023
792c758
Initial conversion of edit posts tests
swissspidy Sep 27, 2023
8fb0560
Fix file ext
swissspidy Sep 27, 2023
c7b7ce6
Convert dashboard test
swissspidy Sep 27, 2023
a88e396
Convert another test
swissspidy Sep 27, 2023
c91d0ca
Improve test
swissspidy Sep 27, 2023
0778ffe
Remove types package again
swissspidy Sep 28, 2023
cb04187
Merge branch 'trunk' into add/pw-performance-tests
swissspidy Sep 28, 2023
e691f09
Remove debug cruft
swissspidy Sep 28, 2023
ca36ecb
Install browsers separately
swissspidy Sep 28, 2023
b044cff
Fix webServer command
swissspidy Sep 28, 2023
2e17562
Merge branch 'trunk' into add/pw-performance-tests
swissspidy Sep 28, 2023
85021bb
Some more bug fixes
swissspidy Sep 28, 2023
f6fd1ca
Update dashboard tests
Mamaduka Sep 28, 2023
fda76fc
Update edit post tests
Mamaduka Sep 28, 2023
5afa823
Use keyPress util
Mamaduka Sep 28, 2023
9ae926f
Update empty and restore trash tests
Mamaduka Sep 28, 2023
21e9f12
Try using same PW version as Gutenberg and wp-scripts
Mamaduka Sep 28, 2023
5ffb5d7
Install deps again after git checkout
swissspidy Sep 28, 2023
5ca807c
Remove commented out config
swissspidy Sep 28, 2023
1cd3f2f
Fix test title
swissspidy Sep 28, 2023
fb49007
Use env var for prefix instead of argument
swissspidy Sep 28, 2023
6f3a89f
Fix app passwords tests
swissspidy Sep 28, 2023
53691a1
Debug: use different reporter on CI
swissspidy Sep 28, 2023
f488294
Update app password tests
Mamaduka Sep 28, 2023
d401663
Remove leftovers
swissspidy Sep 28, 2023
2109765
Move order
swissspidy Sep 28, 2023
c346d2b
Make Gutenberg test more robust
swissspidy Sep 28, 2023
1079d5c
Make comparison script more robust
swissspidy Sep 28, 2023
14d7496
Further improve comparison script
swissspidy Sep 28, 2023
cb8e4d6
Undo reporter change
swissspidy Sep 28, 2023
af97340
Merge branch 'trunk' into add/pw-performance-tests
swissspidy Sep 29, 2023
356d967
Merge branch 'trunk' into add/pw-performance-tests
swissspidy Oct 2, 2023
a3048ac
Remove `PUPPETEER_SKIP_DOWNLOAD`
swissspidy Oct 2, 2023
4141e47
Update readmes
swissspidy Oct 2, 2023
737b58c
Make Gutenberg plugin tests more resilient
Mamaduka Oct 2, 2023
8f8a971
Merge branch 'trunk' into add/pw-performance-tests
swissspidy Oct 2, 2023
0e8bd0c
Merge branch 'trunk' into add/pw-performance-tests
swissspidy Oct 5, 2023
dd3000a
Merge branch 'trunk' into add/pw-performance-tests
swissspidy Oct 10, 2023
fb78280
Extend base PW config from wp-scripts
swissspidy Oct 10, 2023
bc35c5e
Fix config
swissspidy Oct 10, 2023
8d64ece
Merge branch 'trunk' into add/pw-performance-tests
swissspidy Oct 10, 2023
827d43d
Fix indentation
swissspidy Oct 10, 2023
9f07be2
use `require.resolve`
swissspidy Oct 10, 2023
53b5166
Fix double comment
swissspidy Oct 12, 2023
a027cae
Options, Meta APIs: Check setting group exists before search in unreg…
hellofromtonya Oct 10, 2023
593894a
Patterns: Inject `theme` attribute into Template Part blocks.
ockham Oct 10, 2023
050997c
REST API: Fix issue with Template and Template Part Revision/Autosave…
spacedmonkey Oct 10, 2023
fc0e71a
Update/Install: Deactivate Gutenberg plugin version older than 16.5.
hellofromtonya Oct 10, 2023
6e632c1
WordPress 6.4 Beta 3.
karmatosed Oct 10, 2023
8e3ae9a
Post WordPress 6.4 Beta 3 version bump.
karmatosed Oct 10, 2023
8544fe3
Build/Test Tools: Correct variable typo.
desrosj Oct 10, 2023
03bdce8
Plugins: Fix broken `sprintf()` call in plugins list table.
costdev Oct 11, 2023
f2d285e
Docs: Use US spelling and correct a typing mistake.
costdev Oct 11, 2023
994d2ab
Help/About: Ensure that focus outline on the Credits screen is not cu…
SergeyBiryukov Oct 11, 2023
889f1a7
Build/Test Tools: Don’t send Slack notification for workflow retries.
desrosj Oct 11, 2023
c2313f9
Editor: Add further test coverage for `wp_render_elements_support()`.
felixarntz Oct 11, 2023
207cdb9
Build/Test Tools: Increase the number of retries when restarting a wo…
desrosj Oct 11, 2023
46d4273
Build/Test Tools: Increase the timeout for the failed workflow.
desrosj Oct 11, 2023
27be854
Build/Test Tools: Remove hardcoded PHPUnit config files.
desrosj Oct 11, 2023
4172c12
Twenty Nineteen: Add margins to editor iframe content.
SergeyBiryukov Oct 12, 2023
15049d6
Mention UI mode in readme
swissspidy Oct 12, 2023
96f591d
Merge branch 'trunk' into add/pw-performance-tests
swissspidy Oct 12, 2023
eba1afa
Revert r56198
swissspidy Oct 12, 2023
aa9fb1c
Apply r56660
swissspidy Oct 12, 2023
ba8db30
Fix env vars
swissspidy Oct 12, 2023
e3da622
Merge branch 'trunk' into add/pw-performance-tests
swissspidy Oct 12, 2023
f837898
Merge branch 'WordPress:trunk' into add/pw-performance-tests
swissspidy Oct 12, 2023
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
Prev Previous commit
Next Next commit
Update dashboard tests
  • Loading branch information
Mamaduka committed Sep 28, 2023
commit f6fd1cab620eff7868d31e4b3977341f46fdf73e
57 changes: 25 additions & 32 deletions tests/e2e/specs/dashboard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ test.describe( 'Quick Draft', () => {
} ) => {
await admin.visitAdminPage( '/' );

// Wait for Quick Draft title field to appear and focus it
const draftTitleField = await page.waitForSelector(
'#quick-press #title'
);
await draftTitleField.focus();
// Wait for Quick Draft title field to appear.
const draftTitleField = page.locator(
'#quick-press'
).getByRole( 'textbox', { name: 'Title' } );

// Type in a title.
await page.keyboard.type( 'Test Draft Title' );
await expect( draftTitleField ).toBeVisible();

// Focus and fill in a title.
await draftTitleField.fill( 'Test Draft Title' );

// Navigate to content field and type in some content
await page.keyboard.press( 'Tab' );
Expand All @@ -32,21 +33,16 @@ test.describe( 'Quick Draft', () => {
await page.keyboard.press( 'Enter' );

// Check that new draft appears in Your Recent Drafts section
const newDraft = await page.waitForSelector( '.drafts .draft-title' );

expect(
await newDraft.evaluate( ( element ) => element.innerText )
).toContain( 'Test Draft Title' );
await expect(
page.locator( '.drafts .draft-title' ).first().getByRole( 'link' )
).toHaveText( 'Test Draft Title' );

// Check that new draft appears in Posts page
await admin.visitAdminPage( '/edit.php' );
const postsListDraft = await page.waitForSelector(
'.type-post.status-draft .title'
);

expect(
await postsListDraft.evaluate( ( element ) => element.innerText )
).toContain( 'Test Draft Title' );
await expect(
page.locator( '.type-post.status-draft .title' ).first()
).toContainText( 'Test Draft Title' );
} );

test( 'Allows draft to be created without Title or Content', async ( {
Expand All @@ -56,26 +52,23 @@ test.describe( 'Quick Draft', () => {
await admin.visitAdminPage( '/' );

// Wait for Save Draft button to appear and click it
const saveDraftButton = await page.waitForSelector(
'#quick-press #save-post'
);
const saveDraftButton = page.locator(
'#quick-press'
).getByRole( 'button', { name: 'Save Draft' } );

await expect( saveDraftButton ).toBeVisible();
await saveDraftButton.click();

// Check that new draft appears in Your Recent Drafts section
const newDraft = await page.waitForSelector( '.drafts .draft-title a' );

expect(
await newDraft.evaluate( ( element ) => element.innerText )
).toContain( '(no title)' );
await expect(
page.locator( '.drafts .draft-title' ).first().getByRole( 'link' )
).toHaveText( 'Untitled' );

// Check that new draft appears in Posts page
await admin.visitAdminPage( '/edit.php' );
const postsListDraft = await page.waitForSelector(
'.type-post.status-draft .title a'
);

expect(
await postsListDraft.evaluate( ( element ) => element.innerText )
).toContain( '(no title)' );
await expect(
page.locator( '.type-post.status-draft .title' ).first()
).toContainText( 'Untitled' );
} );
} );