Skip to content

Commit

Permalink
Gets all of the remaining changes to Cypress tests from v9 dev - all …
Browse files Browse the repository at this point in the history
…tests pass on v8
  • Loading branch information
nul800sebastiaan committed Nov 3, 2021
1 parent a3797aa commit 64dc1d4
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 7 deletions.
6 changes: 5 additions & 1 deletion src/Umbraco.Tests.AcceptanceTest/cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
"password": "<insert password in cypress.env.json>"
},
"supportFile": "cypress/support/index.ts",
"videoUploadOnPasses" : false
"videoUploadOnPasses" : false,
"retries": {
"runMode": 5,
"openMode": 1
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ context('Document Types', () => {
cy.get('#datatype-search').type('Textstring');

// Choose first item
cy.get('ul.umb-card-grid li [title="Textstring"]').closest("li").click();
cy.get('ul.umb-card-grid [title="Textstring"]').closest("li").click();

// Save property
cy.get('.btn-success').last().click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ context('Media Types', () => {
cy.get('#datatype-search').type('Textstring');

// Choose first item
cy.get('ul.umb-card-grid li [title="Textstring"]').closest("li").click();
cy.get('ul.umb-card-grid [title="Textstring"]').closest("li").click();

// Save property
cy.get('.btn-success').last().click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ context('Member Types', () => {
cy.get('#datatype-search').type('Textstring');

// Choose first item
cy.get('ul.umb-card-grid li [title="Textstring"]').closest("li").click();
cy.get('ul.umb-card-grid [title="Textstring"]').closest("li").click();

// Save property
cy.get('.btn-success').last().click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ context('User Groups', () => {

// Assign sections
cy.get('.umb-box:nth-child(1) .umb-property:nth-child(1) localize').click();
cy.get('.umb-tree-item span').click({multiple:true});
cy.get('.umb-tree-item__inner').click({multiple:true, timeout: 10000});
cy.get('.btn-success').last().click();

// Save
Expand Down
9 changes: 9 additions & 0 deletions src/Umbraco.Tests.AcceptanceTest/cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
const del = require('del')

/**
* @type {Cypress.PluginConfig}
Expand All @@ -24,5 +25,13 @@ module.exports = (on, config) => {
config.baseUrl = baseUrl;
}

on('after:spec', (spec, results) => {
if(results.stats.failures === 0 && results.video) {
// `del()` returns a promise, so it's important to return it to ensure
// deleting the video is finished before moving
return del(results.video)
}
})

return config;
}
4 changes: 2 additions & 2 deletions src/Umbraco.Tests.AcceptanceTest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
},
"devDependencies": {
"cross-env": "^7.0.2",
"cypress": "8.4.1",
"cypress": "^8.7.0",
"del": "^6.0.0",
"ncp": "^2.0.0",
"prompt": "^1.2.0",
"umbraco-cypress-testhelpers": "^1.0.0-beta-58"
"umbraco-cypress-testhelpers": "^1.0.0-beta-60"
},
"dependencies": {
"typescript": "^3.9.2"
Expand Down

0 comments on commit 64dc1d4

Please sign in to comment.