Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Run Cypress E2E Tests
uses: cypress-io/github-action@v5
with:
build: npm run build --workspaces --if-present
build: npm run build-test-env
start: npm run start-test-env
wait-on: 'http://localhost:8888/wp-admin/index.php, http://localhost:8889'
wait-on-timeout: 220
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
git config user.email "pr@10up.com"

- name: Install all npm packages
run: npm install
run: npm ci

- name: npm update version and release
run: |
Expand Down
3 changes: 2 additions & 1 deletion cypress/e2e/Link.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ context('Link', () => {
cy.savePost();

// click on the View Post snackbar item
cy.get('[data-testid="snackbar-list"] .components-snackbar a').click();
cy.get('[data-testid="snackbar-list"] .components-snackbar a').invoke('removeAttr', 'target').click();
cy.wait(500);

// check that all the links have rendered correctly
cy.get('.wp-block-example-link-example a').first().should('contain', 'First Link Label');
Expand Down
14 changes: 9 additions & 5 deletions cypress/e2e/registerBlockExtension.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@ context('registerBlockExtension', () => {
cy.savePost();

// click on the View Post snackbar item
cy.get('.components-snackbar a').click();
cy.get('.components-snackbar a').invoke('removeAttr', 'target').click();
cy.wait(500);

// ensure the new class names get applied in the frontend
cy.get('.wp-block-group').should('have.class', 'has-background-pattern');

cy.contains('Edit Page').click();
cy.get('a').contains('Edit Page').click();
cy.wait(500);

// ensure the editor loads without eny deprecation errors
cy.get('.wp-block-group').contains('This block contains unexpected or invalid content.').should('not.exist');
})

it('ensure the new settings still respect custom classnames', () => {
cy.createPost({title: 'Block Extension Test'});
cy.insertBlock('Group');
Expand All @@ -45,13 +47,15 @@ context('registerBlockExtension', () => {
cy.savePost();

// click on the View Post snackbar item
cy.get('.components-snackbar a').click();
cy.get('.components-snackbar a').invoke('removeAttr', 'target').click();
cy.wait(500);

// ensure the new class names get applied in the frontend
cy.get('.wp-block-group').should('have.class', 'has-background-pattern');
cy.get('.wp-block-group').should('have.class', 'test-class');

cy.contains('Edit Page').click();
cy.get('a').contains('Edit Page').click();
cy.wait(500);

// ensure the editor loads without eny deprecation errors
cy.get('.wp-block-group').contains('This block contains unexpected or invalid content.').should('not.exist');
Expand Down
Loading
Loading