diff --git a/cypress/e2e/17_createWorkspaceUser.cy.ts b/cypress/e2e/17_createWorkspaceUser.cy.ts index 2e3447f5..be4416af 100644 --- a/cypress/e2e/17_createWorkspaceUser.cy.ts +++ b/cypress/e2e/17_createWorkspaceUser.cy.ts @@ -14,7 +14,7 @@ describe('Add User to Workspace', () => { cy.create_workspace(workspace); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.contains('Add User').click(); diff --git a/cypress/e2e/18_withdrawWorkspaceBudget.cy.ts b/cypress/e2e/18_withdrawWorkspaceBudget.cy.ts index a6dd23b4..668ad6e9 100644 --- a/cypress/e2e/18_withdrawWorkspaceBudget.cy.ts +++ b/cypress/e2e/18_withdrawWorkspaceBudget.cy.ts @@ -15,7 +15,7 @@ describe('It Withdraws from Workspace budget', () => { cy.create_workspace(workspace); cy.wait(1000); - cy.contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); const depositAmount = 10000; const withdrawAmount = 2000; diff --git a/cypress/e2e/19_manageUserRoles.cy.ts b/cypress/e2e/19_manageUserRoles.cy.ts index bd8aecf7..97212f17 100644 --- a/cypress/e2e/19_manageUserRoles.cy.ts +++ b/cypress/e2e/19_manageUserRoles.cy.ts @@ -14,7 +14,7 @@ describe('Alice Create an Workspace and then manage user roles', () => { cy.create_workspace(workSpace); cy.wait(1000); - cy.contains(workSpace.name).contains('Manage').click(); + cy.contains(workSpace.name).get(`[data-work-name="${workSpace.name}"]`).click(); cy.wait(1000); cy.contains('Add User').click(); diff --git a/cypress/e2e/20_deleteWorkspaceUser.cy.ts b/cypress/e2e/20_deleteWorkspaceUser.cy.ts index 36a17b44..e4939b22 100644 --- a/cypress/e2e/20_deleteWorkspaceUser.cy.ts +++ b/cypress/e2e/20_deleteWorkspaceUser.cy.ts @@ -17,7 +17,7 @@ describe('Delete User from a Workspace', () => { cy.create_workspace(workspace); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.contains('Add User').click(); diff --git a/cypress/e2e/22_viewOrgBountiesFromWorkspace.cy.ts b/cypress/e2e/22_viewOrgBountiesFromWorkspace.cy.ts index 9a64ba00..3d9f13b5 100644 --- a/cypress/e2e/22_viewOrgBountiesFromWorkspace.cy.ts +++ b/cypress/e2e/22_viewOrgBountiesFromWorkspace.cy.ts @@ -40,7 +40,7 @@ describe('User creates a bounties attached to an workspace', () => { cy.contains(workspace.loggedInAs).click(); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.get('a[href*="/workspace/bounties"]').then(($link: JQuery) => { diff --git a/cypress/e2e/23_editWorkspaceDetails.cy.ts b/cypress/e2e/23_editWorkspaceDetails.cy.ts index c827dfed..919b1f48 100644 --- a/cypress/e2e/23_editWorkspaceDetails.cy.ts +++ b/cypress/e2e/23_editWorkspaceDetails.cy.ts @@ -22,7 +22,7 @@ describe('Edit Workspace Details', () => { }); it('should edit workspace details successfully', () => { - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.contains(/^Edit$/).click(); diff --git a/cypress/e2e/29_paymentHistory.cy.ts b/cypress/e2e/29_paymentHistory.cy.ts index d9d93822..af0d3097 100644 --- a/cypress/e2e/29_paymentHistory.cy.ts +++ b/cypress/e2e/29_paymentHistory.cy.ts @@ -18,7 +18,7 @@ describe('It Lists all payments in history', () => { cy.create_workspace(workSpace); cy.wait(1000); - cy.contains(workSpace.name).contains('Manage').click(); + cy.contains(workSpace.name).get(`[data-work-name="${workSpace.name}"]`).click(); cy.wait(1000); const depositAmount = 10000; @@ -111,7 +111,7 @@ describe('It Lists all payments in history', () => { cy.contains(activeUser).click(); cy.wait(1000); - cy.contains(workSpace.name).contains('Manage').click(); + cy.contains(workSpace.name).get(`[data-work-name="${workSpace.name}"]`).click(); cy.wait(1000); cy.contains('History').click({ force: true }); diff --git a/cypress/e2e/39_rolesViewHistory.cy.ts b/cypress/e2e/39_rolesViewHistory.cy.ts index 104adbf2..4ec74a71 100644 --- a/cypress/e2e/39_rolesViewHistory.cy.ts +++ b/cypress/e2e/39_rolesViewHistory.cy.ts @@ -1,7 +1,7 @@ describe('View Transaction History', () => { const workSpace = { loggedInAs: 'alice', - name: 'SyedWorkspaceZ', + name: 'SyedWorkspace3', description: 'We are testing out our workspace', website: '', github: '' @@ -14,7 +14,7 @@ describe('View Transaction History', () => { cy.create_workspace(workSpace); cy.wait(1000); - cy.contains(workSpace.name).contains('Manage').click(); + cy.contains(workSpace.name).get(`[data-work-name="${workSpace.name}"]`).click(); cy.wait(1000); cy.contains('Add User').click(); @@ -55,7 +55,7 @@ describe('View Transaction History', () => { cy.contains(workSpace.name).should('exist'); cy.wait(1000); - cy.contains(workSpace.name).contains('Manage').click(); + cy.contains(workSpace.name).get(`[data-work-name="${workSpace.name}"]`).click(); cy.wait(1000); cy.contains('History').should('not.be.disabled'); diff --git a/cypress/e2e/40_rolesupdateMembers.cy.ts b/cypress/e2e/40_rolesupdateMembers.cy.ts index 3ed23df4..060cae5e 100644 --- a/cypress/e2e/40_rolesupdateMembers.cy.ts +++ b/cypress/e2e/40_rolesupdateMembers.cy.ts @@ -16,7 +16,7 @@ describe('filter by status for workspace bounty', () => { cy.create_workspace(workSpace); cy.wait(1000); - cy.contains(workSpace.name).contains('Manage').click(); + cy.contains(workSpace.name).get(`[data-work-name="${workSpace.name}"]`).click(); cy.wait(1000); cy.contains('Add User').click(); @@ -56,7 +56,7 @@ describe('filter by status for workspace bounty', () => { cy.contains('carol').click({ force: true }); cy.wait(1000); - cy.contains(WorkSpaceName).contains('Manage').click({ force: true }); + cy.contains(workSpace.name).get(`[data-work-name="${workSpace.name}"]`).click(); cy.wait(1000); cy.contains('Add User').click(); diff --git a/cypress/e2e/41_rolesManageWorkspace.cy.ts b/cypress/e2e/41_rolesManageWorkspace.cy.ts index aec304d2..b047504b 100644 --- a/cypress/e2e/41_rolesManageWorkspace.cy.ts +++ b/cypress/e2e/41_rolesManageWorkspace.cy.ts @@ -1,6 +1,6 @@ describe('matches workspace description with Carol updated description', () => { it('should matches workspace description with Carol updated description', () => { - const WorkSpaceName = 'Update Description'; + const WorkSpaceName = 'Update Description1'; const workSpace: Cypress.Workspace = { loggedInAs: 'alice', @@ -18,7 +18,7 @@ describe('matches workspace description with Carol updated description', () => { cy.create_workspace(workSpace); cy.wait(1000); - cy.contains(workSpace.name).contains('Manage').click(); + cy.contains(workSpace.name).get(`[data-work-name="${workSpace.name}"]`).click(); cy.wait(1000); cy.contains('Add User').click(); @@ -59,7 +59,7 @@ describe('matches workspace description with Carol updated description', () => { cy.contains('carol').click({ force: true }); cy.wait(1000); - cy.contains(WorkSpaceName).contains('Manage').click({ force: true }); + cy.contains(workSpace.name).get(`[data-work-name="${workSpace.name}"]`).click(); cy.wait(1000); cy.contains(/^Edit$/).click(); @@ -91,7 +91,7 @@ describe('matches workspace description with Carol updated description', () => { cy.contains(workSpace.loggedInAs).click({ force: true }); cy.wait(1000); - cy.contains(WorkSpaceName).contains('Manage').click({ force: true }); + cy.contains(workSpace.name).get(`[data-work-name="${workSpace.name}"]`).click(); cy.wait(1000); cy.contains(/^Edit$/).click(); diff --git a/cypress/e2e/42_rolesWithdrawWorkspace.cy.ts b/cypress/e2e/42_rolesWithdrawWorkspace.cy.ts index aafb9858..0f68305c 100644 --- a/cypress/e2e/42_rolesWithdrawWorkspace.cy.ts +++ b/cypress/e2e/42_rolesWithdrawWorkspace.cy.ts @@ -23,7 +23,7 @@ describe('Withdraw From Workspace Role Test', () => { cy.create_workspace(workspace); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.contains('Add User').click(); @@ -70,7 +70,7 @@ describe('Withdraw From Workspace Role Test', () => { cy.contains(workspace.name).should('exist').and('be.visible'); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); //Assert that the Withdraw button is not disabled diff --git a/cypress/e2e/43_rolesFundWorkspace.cy.ts b/cypress/e2e/43_rolesFundWorkspace.cy.ts index d1f0e9bf..f9217663 100644 --- a/cypress/e2e/43_rolesFundWorkspace.cy.ts +++ b/cypress/e2e/43_rolesFundWorkspace.cy.ts @@ -23,7 +23,7 @@ describe('Fund Workspace Role Test', () => { cy.create_workspace(workspace); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.contains('Add User').click(); @@ -70,7 +70,7 @@ describe('Fund Workspace Role Test', () => { cy.contains(workspace.name).should('exist').and('be.visible'); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); //Assert that the Deposit button is not disabled diff --git a/cypress/e2e/44_rolesManageBounties.cy.ts b/cypress/e2e/44_rolesManageBounties.cy.ts index 86198d12..e363ef67 100644 --- a/cypress/e2e/44_rolesManageBounties.cy.ts +++ b/cypress/e2e/44_rolesManageBounties.cy.ts @@ -30,7 +30,7 @@ describe('carol manage workspace bounties', () => { cy.create_workspace(workSpace); cy.wait(1000); - cy.contains(workSpace.name).contains('Manage').click(); + cy.contains(workSpace.name).get(`[data-work-name="${workSpace.name}"]`).click(); cy.wait(1000); cy.contains('Add User').click(); @@ -65,7 +65,10 @@ describe('carol manage workspace bounties', () => { cy.contains('carol').click({ force: true }); cy.wait(1000); - cy.contains(WorkSpaceName).contains('Manage').should('exist'); + cy.contains(WorkSpaceName) + .get(`[data-work-name="${workSpace.name}"]`) + .contains('Manage') + .should('exist'); cy.wait(1000); cy.create_bounty(bounty); diff --git a/cypress/e2e/53_workspaceMission.cy.ts b/cypress/e2e/53_workspaceMission.cy.ts index a3cf6519..dc3ff232 100644 --- a/cypress/e2e/53_workspaceMission.cy.ts +++ b/cypress/e2e/53_workspaceMission.cy.ts @@ -16,7 +16,7 @@ describe('Create Workspace And Update Mission', () => { cy.create_workspace(workspace); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.get('[data-testid="mission-link"]') diff --git a/cypress/e2e/54_addFeature.cy.ts b/cypress/e2e/54_addFeature.cy.ts index b1f21a66..77e20148 100644 --- a/cypress/e2e/54_addFeature.cy.ts +++ b/cypress/e2e/54_addFeature.cy.ts @@ -16,7 +16,7 @@ describe('Add feature To Workspace', () => { cy.create_workspace(workspace); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.get('[data-testid="mission-link"]') diff --git a/cypress/e2e/55_updateFeature.cy.ts b/cypress/e2e/55_updateFeature.cy.ts index 2ae37f7b..919aac3f 100644 --- a/cypress/e2e/55_updateFeature.cy.ts +++ b/cypress/e2e/55_updateFeature.cy.ts @@ -16,7 +16,7 @@ describe('Update feature To Workspace', () => { cy.create_workspace(workspace); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.get('[data-testid="mission-link"]') diff --git a/cypress/e2e/56_briefUpdateFeature.cy.ts b/cypress/e2e/56_briefUpdateFeature.cy.ts index c76060df..8200c31b 100644 --- a/cypress/e2e/56_briefUpdateFeature.cy.ts +++ b/cypress/e2e/56_briefUpdateFeature.cy.ts @@ -16,7 +16,7 @@ describe('Update feature To Workspace', () => { cy.create_workspace(workspace); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.get('[data-testid="mission-link"]') diff --git a/cypress/e2e/57_workspaceRequirementFeatureUpdate.cy.ts b/cypress/e2e/57_workspaceRequirementFeatureUpdate.cy.ts index b769ee13..3c2c4939 100644 --- a/cypress/e2e/57_workspaceRequirementFeatureUpdate.cy.ts +++ b/cypress/e2e/57_workspaceRequirementFeatureUpdate.cy.ts @@ -16,7 +16,7 @@ describe('Update Requirements in Workspace Feature', () => { cy.create_workspace(workspace); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.get('[data-testid="mission-link"]') diff --git a/cypress/e2e/58_addUserStoriesToFeature.cy.ts b/cypress/e2e/58_addUserStoriesToFeature.cy.ts index a99253cb..944ec1d2 100644 --- a/cypress/e2e/58_addUserStoriesToFeature.cy.ts +++ b/cypress/e2e/58_addUserStoriesToFeature.cy.ts @@ -16,7 +16,7 @@ describe('Add user stories to features', () => { cy.create_workspace(workspace); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.get('[data-testid="mission-link"]') diff --git a/cypress/e2e/58_updateWorkspaceSchematic.cy.ts b/cypress/e2e/58_updateWorkspaceSchematic.cy.ts index 12ddcb04..0f33bc6d 100644 --- a/cypress/e2e/58_updateWorkspaceSchematic.cy.ts +++ b/cypress/e2e/58_updateWorkspaceSchematic.cy.ts @@ -16,7 +16,7 @@ describe('Updating Workspace schematic', () => { cy.create_workspace(workspace); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.get('[data-testid="mission-link"]') diff --git a/cypress/e2e/59_updateWorkspaceFeaturePhase.cy.ts b/cypress/e2e/59_updateWorkspaceFeaturePhase.cy.ts index 960000e7..08820a89 100644 --- a/cypress/e2e/59_updateWorkspaceFeaturePhase.cy.ts +++ b/cypress/e2e/59_updateWorkspaceFeaturePhase.cy.ts @@ -16,7 +16,7 @@ describe('Workspace Phasing Feature Tests', () => { cy.create_workspace(workspace); cy.wait(3000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.get('[data-testid="mission-link"]') diff --git a/cypress/e2e/60_addPeopleToWorkspaceMission.cy.ts b/cypress/e2e/60_addPeopleToWorkspaceMission.cy.ts index 2ec6beef..0f5478d3 100644 --- a/cypress/e2e/60_addPeopleToWorkspaceMission.cy.ts +++ b/cypress/e2e/60_addPeopleToWorkspaceMission.cy.ts @@ -16,7 +16,7 @@ describe('Create Workspace And Update People On Mission', () => { cy.create_workspace(workspace); cy.wait(1000); - cy.contains(workspace.name).contains('Manage').click(); + cy.contains(workspace.name).get(`[data-work-name="${workspace.name}"]`).click(); cy.wait(1000); cy.get('[data-testid="mission-link"]') diff --git a/src/people/widgetViews/workspace/ManageWorkspaceButton.tsx b/src/people/widgetViews/workspace/ManageWorkspaceButton.tsx index 86b4a5d1..95495f1c 100644 --- a/src/people/widgetViews/workspace/ManageWorkspaceButton.tsx +++ b/src/people/widgetViews/workspace/ManageWorkspaceButton.tsx @@ -48,7 +48,7 @@ const ManageButton = (props: { user_pubkey: string; org: any; action: () => void return ( <> {hasAccess && ( - )}