Skip to content

Commit

Permalink
v9: Update cypress to newest version and fix errors (umbraco#11486)
Browse files Browse the repository at this point in the history
* fixed flaky macro test and updated cypress version

* fixed flaky macro test and updated cypress version

* Update package.json

* Updated cypress to 8.6 and fixed failing script test

* Updated cypress to 8.6 and fixed failing script test

* Update package-lock.json

* Fixed Scripts and stylesheet tests with proper waits instead of magic numbers

* Updated to newest version of cypress and fixed template test

* Remove duplicate click

* Revert version to 8.4.1

* changed template

Co-authored-by: Nikolaj Geisle <[email protected]>
  • Loading branch information
Zeegaan and Nikolaj Geisle authored Oct 26, 2021
1 parent 9155329 commit e9ae567
Show file tree
Hide file tree
Showing 5 changed files with 217 additions and 3,484 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ context('Scripts', () => {

cy.umbracoContextMenuAction("action-create").click();
cy.get('.menu-label').first().click(); // TODO: Fucked we cant use something like cy.umbracoContextMenuAction("action-mediaType").click();
//We have to wait here till everything is loaded, or worker will throw error
cy.intercept('/umbraco/lib/ace-builds/src-min-noconflict/worker-javascript.js').as('aceWorker');
cy.wait('@aceWorker');

//Type name
cy.umbracoEditorHeaderName(name);
Expand All @@ -33,6 +36,8 @@ context('Scripts', () => {

//Assert
cy.umbracoSuccessNotification().should('be.visible');


cy.umbracoScriptExists(fileName).should('be.true');


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ context('Stylesheets', () => {

cy.umbracoContextMenuAction("action-create").click();
cy.get('.menu-label').first().click(); // TODO: Fucked we cant use something like cy.umbracoContextMenuAction("action-mediaType").click();

//We have to wait here till everything is loaded, or worker will throw error
cy.intercept('/umbraco/lib/ace-builds/src-min-noconflict/worker-css.js').as('aceWorker');
cy.wait('@aceWorker');
//Type name
cy.umbracoEditorHeaderName(name);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ context('Templates', () => {
// Insert macro
cy.umbracoButtonByLabelKey('general_insert').click();
cy.get('.umb-insert-code-box__title').contains('Macro').click();
cy.get('.umb-card-grid-item').contains(name).click();
cy.get(`.umb-card-grid-item[title='${name}']`).click('bottom');

// Assert
cy.get('.ace_content').contains('@await Umbraco.RenderMacroAsync("' + name + '")').should('exist');
Expand Down
Loading

0 comments on commit e9ae567

Please sign in to comment.