Skip to content

Commit

Permalink
Merge pull request stakwork#392 from chiragDork/issue_383
Browse files Browse the repository at this point in the history
Issue 383
  • Loading branch information
elraphty authored Mar 14, 2024
2 parents 80e5d0a + 51aa015 commit 45f2ac9
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
54 changes: 54 additions & 0 deletions cypress/e2e/7_viewOrgBounties.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
describe('View Organization Bounties', () => {
const OrgName = 'OrganizationView';

const org: Cypress.Organization = {
loggedInAs: 'alice',
name: OrgName,
description: 'An organization focused on amazing projects.',
website: 'https://amazing.org',
github: 'https://github.com/amazing'
};

const bounty: Cypress.Bounty = {
organization: OrgName,
title: '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',
assign: ''
};

beforeEach(() => {
cy.login(org.loggedInAs);
cy.wait(1000);
cy.create_org(org);
cy.wait(1000);
});

it('should verify bounty tile displays the organization label is clickable and redirects the user to the organizations bounty page.', () => {
cy.create_bounty(bounty);
cy.wait(5000);

cy.contains(bounty.title);
cy.wait(5000);

cy.contains(org.name);
cy.wait(1000);

cy.contains(org.name).invoke('removeAttr', 'target').click({ force: true });
cy.wait(5000);

cy.url().should('include', '/org/bounties');
cy.wait(5000);

cy.contains(bounty.title).should('exist');
cy.wait(1000);

cy.logout(org.loggedInAs);
});
});
1 change: 1 addition & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ Cypress.Commands.add('lnurl_login', () => {

Cypress.Commands.add('create_org', (organization) => {
cy.contains(organization.loggedInAs).click({ force: true });

cy.wait(1000);
cy.contains('Add Organization').click();

Expand Down

0 comments on commit 45f2ac9

Please sign in to comment.