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.
Added Cypress Test For Delete Bounty Modal
- Loading branch information
1 parent
45f2ac9
commit 5468cb5
Showing
1 changed file
with
42 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,42 @@ | ||
describe('Can Delete Bounty From Modal', () => { | ||
const bounty: Cypress.Bounty = { | ||
title: 'Ali Bounty', | ||
category: 'Web development', | ||
coding_language: ['Typescript', 'Javascript', 'Lightning'], | ||
description: 'This is available', | ||
amount: '123', | ||
tribe: 'Amazing Org Tribe', | ||
estimate_session_length: 'Less than 3 hour', | ||
estimate_completion_date: '09/09/2024', | ||
deliverables: 'We are good to go man' | ||
}; | ||
|
||
it('Can delete a bounty from modal', () => { | ||
const activeUser = 'alice'; | ||
cy.login(activeUser); | ||
cy.wait(1000); | ||
|
||
cy.create_bounty(bounty); | ||
cy.wait(1000); | ||
|
||
cy.contains(bounty.title).click(); | ||
cy.wait(1000); | ||
|
||
cy.contains('Delete').click(); | ||
cy.wait(1000); | ||
|
||
cy.get('.euiButton').contains('Delete').click({ force: true }); | ||
cy.wait(1000); | ||
|
||
cy.contains('Your Bounty is Successfully Deleted'); | ||
cy.wait(600); | ||
|
||
cy.visit('http://localhost:3007/bounties'); | ||
cy.wait(1000); | ||
|
||
cy.contains(bounty.title).should('not.exist'); | ||
cy.get('body').click(0, 0); | ||
|
||
cy.logout(activeUser); | ||
}); | ||
}); |