forked from stakwork/sphinx-tribes-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request stakwork#399 from aliraza556/cypress-test-Mark-Bou…
…nty-As-UnPaid Added Cypress Test For Mark Bounty As UnPaid
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |