Skip to content

Commit

Permalink
fixed test failure, after seeing screenshot on workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
elraphty committed Jun 7, 2024
1 parent c81129d commit 4a40fd6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
27 changes: 11 additions & 16 deletions cypress/e2e/37_bountyFilters.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ describe('Alice tries to create 6 bounties and then assert filtered bounties', (
estimate_session_length: 'Less than 3 hour',
estimate_completion_date: '09/09/2024'
});
cy.wait(1500);
cy.wait(1000);

if (i > 2) {
if (i === 3) {
// Unchecked the Open Filter and Checked the Assigned Filter
cy.contains('Filter').click();
cy.contains('Open').click();
cy.contains('Assigned').click();
cy.contains('label', 'Open').click();
cy.contains('label', 'Assigned').click();
cy.wait(1000);

cy.contains(`Filter Bounty Title ${i}`).click();
Expand All @@ -48,12 +48,6 @@ describe('Alice tries to create 6 bounties and then assert filtered bounties', (
cy.wait(1000);

cy.get('body').click(0, 0);
cy.wait(1000);

// open filter
cy.contains('Filter').click();
cy.contains('Assigned').click();
cy.get('body').click(0, 0);
}
}
}
Expand All @@ -63,17 +57,18 @@ describe('Alice tries to create 6 bounties and then assert filtered bounties', (

// check open filter
cy.contains('Filter').click();
cy.contains('Open').click();
cy.contains('label', 'Assigned').click();
cy.contains('label', 'Open').click();
cy.wait(1000);
// close filter
cy.get('body').click(0, 0);

cy.wait('@bountyFilter');

for (let i = 0; i < 3; i++) {
// assigned bounties should not exists
cy.contains(`Filter Bounty Title ${i}`).should('not.exist');
}
// assigned bounties should not exists
cy.contains(`Filter Bounty Title 0`).should('not.exist');
cy.contains(`Filter Bounty Title 1`).should('not.exist');

cy.wait(1000);

cy.contains('Filter').click();
Expand All @@ -89,12 +84,12 @@ describe('Alice tries to create 6 bounties and then assert filtered bounties', (

cy.contains('Filter').click();
// uncheck
cy.contains('Open').click();
cy.contains('label', 'Open').click();
cy.contains('label', 'Typescript').click();
cy.wait(1000);

// check
cy.contains('Assigned').click();
cy.contains('label', 'Assigned').click();
cy.contains('label', 'Lightning').click();
cy.wait('@bountyFilter');

Expand Down
6 changes: 3 additions & 3 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ Cypress.Commands.add('create_bounty', (bounty, clickMethod = 'contains') => {
cy.get('[data-testid="Category *"]').click();
cy.get('[data-testid="Category *"]').contains(bounty.category).click();

cy.contains('Next').click({ force: true });
cy.contains('Next').click();

cy.get('.euiTextArea').type(bounty.description);
cy.contains('Next').click();
Expand Down Expand Up @@ -226,7 +226,7 @@ Cypress.Commands.add('create_bounty', (bounty, clickMethod = 'contains') => {
cy.get('textarea.inputText').type(bounty.deliverables);
}

cy.contains('Next').click({ force: true });
cy.contains('Next').click();

if (bounty.assign) {
cy.get('.SearchInput').type(bounty.assign);
Expand All @@ -236,7 +236,7 @@ Cypress.Commands.add('create_bounty', (bounty, clickMethod = 'contains') => {
cy.contains('Decide Later').click({ force: true });
}

cy.contains('Finish').click({ force: true });
cy.contains('Finish').click();
});

Cypress.Commands.add('create_workspace_bounty', (workspaceBounty) => {
Expand Down

0 comments on commit 4a40fd6

Please sign in to comment.