v9: Update cypress to newest version and fix errors (#11486)

* 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 <niko737@edu.ucl.dk>
This commit is contained in:
Nikolaj Geisle
2021-10-26 16:03:19 +02:00
committed by GitHub
parent 9155329de8
commit e9ae567617
5 changed files with 217 additions and 3484 deletions

View File

@@ -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);
@@ -33,6 +36,8 @@ context('Scripts', () => {
//Assert
cy.umbracoSuccessNotification().should('be.visible');
cy.umbracoScriptExists(fileName).should('be.true');

View File

@@ -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);

View File

@@ -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');

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,7 @@
},
"devDependencies": {
"cross-env": "^7.0.2",
"cypress": "^6.8.0",
"cypress": "8.4.1",
"del": "^6.0.0",
"ncp": "^2.0.0",
"prompt": "^1.2.0",