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]>
(cherry picked from commit e9ae567)

# Conflicts:
#	src/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
  • Loading branch information
Zeegaan authored and nul800sebastiaan committed Nov 3, 2021
1 parent ac83a32 commit 0bd82d3
Show file tree
Hide file tree
Showing 5 changed files with 1,763 additions and 5 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('@Umbraco.RenderMacro("' + name + '")').should('exist');
Expand Down
9 changes: 6 additions & 3 deletions src/Umbraco.Tests.AcceptanceTest/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "acceptancetest",
"private": true,
"scripts": {
"postinstall": "node postinstall.js",
"config": "node config.js",
Expand All @@ -7,10 +9,11 @@
},
"devDependencies": {
"cross-env": "^7.0.2",
"cypress": "^6.8.0",
"cypress": "8.4.1",
"del": "^6.0.0",
"ncp": "^2.0.0",
"prompt": "^1.0.0",
"umbraco-cypress-testhelpers": "^1.0.0-beta-57"
"prompt": "^1.2.0",
"umbraco-cypress-testhelpers": "^1.0.0-beta-58"
},
"dependencies": {
"typescript": "^3.9.2"
Expand Down
Loading

0 comments on commit 0bd82d3

Please sign in to comment.