diff --git a/cypress/e2e/53_workspaceMission.cy.ts b/cypress/e2e/53_workspaceMission.cy.ts index 647b6ae7..131c9bcd 100644 --- a/cypress/e2e/53_workspaceMission.cy.ts +++ b/cypress/e2e/53_workspaceMission.cy.ts @@ -3,7 +3,7 @@ describe('Create Workspace And Update Mission', () => { cy.login('carol'); cy.wait(1000); - const WorkSpaceName = 'Workspace Mission5'; + const WorkSpaceName = 'Workspace Mission'; const workspace = { loggedInAs: 'carol', @@ -19,12 +19,14 @@ describe('Create Workspace And Update Mission', () => { cy.contains(workspace.name).contains('Manage').click(); cy.wait(1000); - cy.get('[data-testid="mission-link"]').then(($link: JQuery) => { - const modifiedHref = $link.attr('href'); - cy.wrap($link).invoke('removeAttr', 'target'); - cy.wrap($link).click(); - cy.url().should('include', modifiedHref); - }); + cy.get('[data-testid="mission-link"]') + .invoke('show') + .then(($link: JQuery) => { + const modifiedHref = $link.attr('href'); + cy.wrap($link).invoke('removeAttr', 'target'); + cy.wrap($link).click(); + cy.url().should('include', modifiedHref); + }); cy.wait(1000); cy.contains('No mission yet'); @@ -36,7 +38,6 @@ describe('Create Workspace And Update Mission', () => { const missionStatment = 'This is my Mission'; cy.get('[data-testid="mission-textarea"]').type(missionStatment); cy.get('[data-testid="mission-update-btn"]').click(); - cy.get('[data-testid="mission-cancel-btn"]').click(); cy.get('[data-testid="tactics-option-btn"]').click(); cy.get('[data-testid="tactics-edit-btn"]').click(); @@ -44,10 +45,9 @@ describe('Create Workspace And Update Mission', () => { const tacticsStatment = 'This is my Tactics'; cy.get('[data-testid="tactics-textarea"]').type(tacticsStatment); cy.get('[data-testid="tactics-update-btn"]').click(); - cy.get('[data-testid="tactics-cancel-btn"]').click(); - cy.contains(missionStatment); - cy.contains(tacticsStatment); + cy.contains(missionStatment).should('exist', { timeout: 1000 }); + cy.contains(tacticsStatment).should('exist', { timeout: 1000 }); cy.logout('carol'); }); diff --git a/src/people/widgetViews/WorkspaceDetails.tsx b/src/people/widgetViews/WorkspaceDetails.tsx index f3edf3a5..0780c91f 100644 --- a/src/people/widgetViews/WorkspaceDetails.tsx +++ b/src/people/widgetViews/WorkspaceDetails.tsx @@ -378,7 +378,7 @@ const WorkspaceDetails = (props: { style={{ textDecoration: 'none', color: 'inherit', - display: 'block' + display: 'none' }} target="_blank" data-testid="mission-link" diff --git a/src/people/widgetViews/WorkspaceMission.tsx b/src/people/widgetViews/WorkspaceMission.tsx index 0ad91b6e..5cb2c8b6 100644 --- a/src/people/widgetViews/WorkspaceMission.tsx +++ b/src/people/widgetViews/WorkspaceMission.tsx @@ -108,11 +108,32 @@ const OptionsWrap = styled.div` `; const TextArea = styled.textarea` - border: 0.5px solid #000000; - padding: 12px 20px; + padding: 0.5rem 1rem; + border-radius: 0.375rem; + border: 2px solid #dde1e5; + outline: none; + caret-color: #618aff; + color: #3c3f41; + font-family: 'Barlow'; + font-size: 1rem; + font-style: normal; + font-weight: 500; + line-height: 20px; width: 100%; - margin-top: 10px; - border-radius: 5px; + resize: none; + min-height: 5.9375rem; + + ::placeholder { + color: #b0b7bc; + font-family: 'Barlow'; + font-size: 13px; + font-style: normal; + font-weight: 400; + line-height: 20px; + } + :focus { + border: 2px solid #82b4ff; + } `; const ButtonWrap = styled.div` @@ -206,8 +227,11 @@ const WorkspaceMission = () => { setDidplayMission(false); }; - const missionChange = (e: any) => { - setMission(e.target.value); + const missionChange = (e: React.ChangeEvent) => { + const newValue = e.target.value; + if (newValue.length) { + setMission(newValue); + } }; const tacticsChange = (e: any) => { @@ -222,6 +246,7 @@ const WorkspaceMission = () => { }; await main.workspaceUpdateMission(body); await getWorkspaceData(); + setEditMission(false); }; const submitTactics = async () => { @@ -232,6 +257,7 @@ const WorkspaceMission = () => { }; await main.workspaceUpdateTactics(body); await getWorkspaceData(); + setEditTactics(false); }; return ( @@ -298,7 +324,7 @@ const WorkspaceMission = () => {