Skip to content
Draft
Show file tree
Hide file tree
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
17 changes: 16 additions & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,25 @@ jobs:
version: 'WordPress/WordPress#master',
number: 'trunk',
}
- {
name: 'WP 7.0',
version: 'WordPress/WordPress#7.0-branch',
number: '7.0',
}
- {
name: 'WP 6.9',
version: 'WordPress/WordPress#6.9-branch',
number: '6.9',
}
- {
name: 'WP 6.8',
version: 'WordPress/WordPress#6.8-branch',
number: '6.8',
}
- {
name: 'WP 6.7',
version: 'WordPress/WordPress#6.7-branch',
number: '6.7'
number: '6.7',
}
- {
name: 'WP 6.6',
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
tests/cypress/screenshots
tests/cypress/videos
tests/cypress/reports
tests/cypress/downloads

# wp-env files
.wp-env.override.json
Expand Down
2 changes: 1 addition & 1 deletion run-all-cores.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

MAJOR_VERSIONS="5.7 5.8 5.9 6.0 6.1 6.2 6.3 6.4 6.5 6.6 6.7"
MAJOR_VERSIONS="5.7 5.8 5.9 6.0 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 7.0"
TRUNK="master:trunk"

VERSIONS=""
Expand Down
3 changes: 2 additions & 1 deletion src/commands/insert-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export const insertBlock = (type: string, name?: string): void => {
// Start of Block insertion by click logic.
cy.get(blockSelector).then($block => {
if ($block.length) {
cy.wrap($block).click();
cy.wrap($block).as('block');
cy.get('@block').click();
inserterBtn.click();

const [ns, rest] = type.split('/'); // namespace = ns, second namespace or block name = rest
Expand Down
11 changes: 11 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ declare global {
}
}

// Ignore promises rejected due to missed transitions.
// These are common on CI environments due to the speed of the tests and the environment.
Cypress.on('uncaught:exception', err => {
if (
err?.name === 'AbortError' &&
err?.message?.includes('Transition was skipped')
) {
return false;
}
});

// Register commands
Cypress.Commands.add('checkPostExists', checkPostExists);
Cypress.Commands.add('classicCreatePost', classicCreatePost);
Expand Down
Loading