Skip to content

Commit

Permalink
Merge pull request stakwork#399 from aliraza556/cypress-test-Mark-Bou…
Browse files Browse the repository at this point in the history
…nty-As-UnPaid

Added Cypress Test For Mark Bounty As UnPaid
  • Loading branch information
elraphty authored Mar 14, 2024
2 parents 51855e3 + 4098148 commit 0f96633
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions cypress/e2e/12_mark_as_unpaid.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
describe('Alice tries to paid and unpaid a hunter after creating a bounty', () => {
const assignee = 'carol';

const bounty: Cypress.Bounty = {
title: 'My new Bounty for unapaid user',
category: 'Web development',
coding_language: ['Typescript', 'Javascript', 'Lightning'],
description: 'This is available',
amount: '123',
assign: assignee,
deliverables: 'We are good to go man',
tribe: '',
estimate_session_length: 'Less than 3 hour',
estimate_completion_date: '09/09/2024'
};

it('Create a bounty with an assignee then paid and unpaid the user', () => {
let activeUser = 'alice';
cy.login(activeUser);
cy.wait(1000);

cy.create_bounty(bounty);
cy.wait(1000);

cy.contains('Filter').click();
cy.contains('Assigned').click();
cy.wait(1000);

cy.contains(bounty.title).click();
cy.wait(1000);

cy.contains('Mark as Paid').click();
cy.wait(1000);

cy.contains('Next').click();
cy.wait(1000);

cy.contains('Skip and Mark Paid').click();
cy.wait(1000);

cy.contains('completed');

cy.contains('Mark as Unpaid').click();
cy.wait(1000);

cy.contains('assigned');

// click outside the modal
cy.get('body').click(0, 0);

cy.logout(activeUser);
});
});

0 comments on commit 0f96633

Please sign in to comment.