Skip to content

Commit

Permalink
Update 17_create_org_user.cy.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Vayras authored Mar 18, 2024
1 parent f320541 commit 0cf1918
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions cypress/e2e/17_create_org_user.cy.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
describe('Add User to Organization', () => {
it('should add a user to an organization', () => {
const org = {
loggedInAs: 'alice',
name: 'Budget Org 2',
loggedInAs: 'carol',
name: 'TEST E2E',
description: 'We are testing out our organization',
website: 'https://community.sphinx.chat',
github: 'https://github.com/stakwork/sphinx-tribes-frontend'
Expand All @@ -20,7 +20,7 @@ describe('Add User to Organization', () => {
cy.contains('Add User').click();
cy.wait(1000);

cy.get('input').type('bob');
cy.get('input').type('alice');
cy.wait(1000);

cy.contains('Select').click();
Expand All @@ -39,6 +39,28 @@ describe('Add User to Organization', () => {
cy.wait(1000);
});

cy.contains('alice').get('[data-testid="settings-icon"]').click();
cy.wait(1000);

cy.contains('label', 'Manage bounties').prev('input[type="checkbox"]').should('be.checked');
cy.wait(1000);

cy.contains('label', 'Fund organization').prev('input[type="checkbox"]').should('be.checked');
cy.wait(1000);

cy.contains('label', 'Withdraw from organization')
.prev('input[type="checkbox"]')
.should('be.checked');
cy.wait(1000);

cy.contains('label', 'View transaction history')
.prev('input[type="checkbox"]')
.should('be.checked');
cy.wait(1000);

cy.contains('Update roles').click();
cy.wait(1000);

cy.wait(1000);
cy.logout(org.loggedInAs);
});
Expand Down

0 comments on commit 0cf1918

Please sign in to comment.