diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 414b2b1..f414c65 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -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', diff --git a/.gitignore b/.gitignore index 8d26efa..d11a9d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ tests/cypress/screenshots tests/cypress/videos tests/cypress/reports +tests/cypress/downloads # wp-env files .wp-env.override.json diff --git a/run-all-cores.sh b/run-all-cores.sh index 41e9eed..664fe20 100755 --- a/run-all-cores.sh +++ b/run-all-cores.sh @@ -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="" diff --git a/src/commands/insert-block.ts b/src/commands/insert-block.ts index 6ad7c8f..f2d4b57 100644 --- a/src/commands/insert-block.ts +++ b/src/commands/insert-block.ts @@ -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 diff --git a/src/index.ts b/src/index.ts index d8fbbef..0152714 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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);