Skip to content

Commit e9ae567

Browse files
ZeegaanNikolaj Geisle
andauthored
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 <[email protected]>
1 parent 9155329 commit e9ae567

File tree

5 files changed

+217
-3484
lines changed

5 files changed

+217
-3484
lines changed

tests/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/scripts.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ context('Scripts', () => {
2424

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

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

3437
//Assert
3538
cy.umbracoSuccessNotification().should('be.visible');
39+
40+
3641
cy.umbracoScriptExists(fileName).should('be.true');
3742

3843

tests/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/stylesheets.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ context('Stylesheets', () => {
1818

1919
cy.umbracoContextMenuAction("action-create").click();
2020
cy.get('.menu-label').first().click(); // TODO: Fucked we cant use something like cy.umbracoContextMenuAction("action-mediaType").click();
21-
21+
//We have to wait here till everything is loaded, or worker will throw error
22+
cy.intercept('/umbraco/lib/ace-builds/src-min-noconflict/worker-css.js').as('aceWorker');
23+
cy.wait('@aceWorker');
2224
//Type name
2325
cy.umbracoEditorHeaderName(name);
2426

tests/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ context('Templates', () => {
136136
// Insert macro
137137
cy.umbracoButtonByLabelKey('general_insert').click();
138138
cy.get('.umb-insert-code-box__title').contains('Macro').click();
139-
cy.get('.umb-card-grid-item').contains(name).click();
139+
cy.get(`.umb-card-grid-item[title='${name}']`).click('bottom');
140140

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

0 commit comments

Comments
 (0)