Skip to content

Commit

Permalink
Fixing CI due to locators and other issues (#258)
Browse files Browse the repository at this point in the history
* Adjusting locators to be compatible in 2.11.
Extending wait for hamburger menu due to speed in 2.11

* Removing flag causing sporadic errors

* testing removal of chrome as default browser
  • Loading branch information
mmartin24 authored Jan 28, 2025
1 parent 40990ad commit addaab2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const qaseAPIToken = process.env.QASE_API_TOKEN
export default defineConfig({
viewportWidth: 1314,
viewportHeight: 954,
defaultBrowser: 'chrome',
// defaultBrowser: 'chrome',
defaultCommandTimeout: 10000,
video: true,
videoCompression: true,
numTestsKeptInMemory: 0,
// numTestsKeptInMemory: 0, //This flag causes sporadic erros. Avoid using it.
experimentalMemoryManagement: true,
reporter: 'cypress-multi-reporters',
reporterOptions: {
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/e2e/unit_tests/p0_fleet.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ if (!/\/2\.7/.test(Cypress.env('rancher_version')) && !/\/2\.8/.test(Cypress.env

cy.contains(repoName).click();
cy.get('ul[role="tablist"]').contains('Recent Events').click();
cy.get('section#events > div > table > tbody > tr.main-row').should('have.length', 2).then(() => {
cy.get('section#events table tr.main-row').should('have.length', 2).then(() => {
cy.contains('GotNewCommit', { timeout: 20000 }).should('be.visible');
cy.contains('GitJob was created', { timeout: 20000 }).should('be.visible');
cy.contains('job deletion triggered because job succeeded', { timeout: 20000 }).should('not.exist');
Expand Down
6 changes: 3 additions & 3 deletions tests/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Cypress.Commands.add('accesMenuSelection', (firstAccessMenu='Continuous Delivery
// added wait of 500ms to make time for CSS transitions to resolve (addresses tests flakiness)
// unfortunately there's no "easy" way of waiting for transitions and 500ms is quick and does the trick
cypressLib.burgerMenuToggle( {animationDistanceThreshold: 10} );
cy.wait(500);
cy.wait(750);

cy.contains(firstAccessMenu).should('be.visible');
cypressLib.accesMenu(firstAccessMenu);
Expand Down Expand Up @@ -632,8 +632,8 @@ Cypress.Commands.add('verifyJobDeleted', (repoName, verifyJobDeletedEvent = true
// To be executed there or after cy.checkGitRepoStatus() function;
if (verifyJobDeletedEvent) {
cy.get('ul[role="tablist"]').contains('Recent Events').click();
cy.get('section#events > div > table > tbody > tr.main-row')
.eq(0)
cy.get('section#events table tr.main-row')
// .eq(0)
.contains('job deletion triggered because job succeeded', { timeout: 20000 })
.should('be.visible');
};
Expand Down

0 comments on commit addaab2

Please sign in to comment.