Skip to content

Commit

Permalink
Merge pull request stakwork#526 from stakwork/feature-add-architectur…
Browse files Browse the repository at this point in the history
…e-to-feature

Feature add architecture to feature
  • Loading branch information
elraphty authored May 17, 2024
2 parents 4b5f3e0 + b1252b7 commit 630c5b4
Show file tree
Hide file tree
Showing 13 changed files with 391 additions and 144 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prjob_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build
on:
pull_request:
branches:
- master
- "*"
jobs:
build:
name: build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prjob_cypress_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Cypress Tests
on:
pull_request:
branches:
- master
- "*"

jobs:
cypress:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prjob_eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Eslint
on:
pull_request:
branches:
- master
- "*"
jobs:
eslint:
name: eslint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prjob_prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Prettier
on:
pull_request:
branches:
- master
- "*"
jobs:

prettier:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prjob_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Tests
on:
pull_request:
branches:
- master
- "*"
jobs:
test-jest:
name: Jest
Expand Down
60 changes: 60 additions & 0 deletions cypress/e2e/55_updateFeature.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
describe('Update feature To Workspace', () => {
it('Updating A Workspace Feature', () => {
cy.login('carol');
cy.wait(1000);

const WorkSpaceName = 'WS Feature Update';

const workspace = {
loggedInAs: 'carol',
name: WorkSpaceName,
description: 'We are testing out our workspace feature',
website: 'https://community.sphinx.chat',
github: 'https://github.com/stakwork/sphinx-tribes-frontend'
};

cy.create_workspace(workspace);
cy.wait(1000);

cy.contains(workspace.name).contains('Manage').click();
cy.wait(1000);

cy.get('[data-testid="mission-link"]')
.invoke('show')
.then(($link: JQuery<HTMLElement>) => {
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');
cy.contains('No tactics yet');

cy.get('[data-testid="new-feature-btn"]').click();
cy.wait(1000);

cy.contains('Add New Feature');

const newFeature = 'A new Feature';
cy.get('[data-testid="feature-input"]').type(newFeature);
cy.get('[data-testid="add-feature-btn"]').click();
cy.wait(1000);

cy.contains(newFeature).should('exist', { timeout: 3000 });
cy.wait(1000);

cy.get('[data-testid="architecture-option-btn"]').click();
cy.get('[data-testid="architecture-edit-btn"]').click();

const updatedFeature = 'Feature Architecture';
cy.get('[data-testid="architecture-textarea"]').type(updatedFeature);
cy.get('[data-testid="architecture-update-btn"]').click();
cy.wait(1000);

cy.contains(updatedFeature).should('exist', { timeout: 1000 });

cy.logout('carol');
});
});
151 changes: 151 additions & 0 deletions src/pages/tickets/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,157 @@ export const WorkspaceBody = styled.div`
overflow-x: hidden;
`;

export const FeatureBody = styled.div`
display: flex;
flex-direction: column;
background: var(--Search-bar-background, #f2f3f5);
height: 100vh;
overflow-y: auto;
overflow-x: hidden;
`;

export const Header = styled.div`
height: 130px;
width: 65%;
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
`;

export const Leftheader = styled.div`
display: flex;
gap: 20px;
align-items: center;
justify-content: center;
`;

export const HeaderWrap = styled.div`
display: flex;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: #fff;
`;

export const DataWrap = styled.div`
padding: 40px 50px;
display: flex;
width: 50%;
margin: 0 auto;
display: flex;
flex-direction: column;
align-items: left;
justify-content: center;
@media only screen and (max-width: 900px) {
width: 90%;
padding: 30px 40px;
}
@media only screen and (max-width: 500px) {
width: 90%;
padding: 20px 10px;
}
`;

export const FieldWrap = styled.div`
margin-bottom: 30px;
`;

export const Label = styled.h5`
font-size: 1.12rem;
font-weight: bolder;
`;

export const Data = styled.div`
border: 1px solid #ccc;
min-height: 50px;
border-radius: 5px;
padding: 20px 30px;
position: relative;
display: flex;
flex-direction: column;
white-space: pre-wrap;
.MaterialIcon {
font-style: normal;
font-weight: 900;
font-size: 1.4rem;
color: #000000;
}
`;

export const OptionsWrap = styled.div`
position: absolute;
right: 6px;
top: 4px;
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
button {
border: 0.5px solid #000000;
font-size: 0.8rem;
font-weight: 700;
border-radius: 5px;
padding: 2px 10px;
}
`;

export const TextArea = styled.textarea`
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%;
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;
}
`;

interface ButtonProps {
color?: string;
}

export const FeatureLabel = styled.p`
color: var(--Text-2, #3c3f41);
font-family: Barlow;
font-size: 28px;
font-style: normal;
font-weight: 700;
margin: 2px;
display: flex;
align-items: center;
`;

export const FeatureName = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
`;

export const Backdrop = styled.div`
position: fixed;
z-index: 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ interface styledProps {
color?: any;
}

export const Header = styled.div`
height: 130px;
width: 65%;
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
`;

export const UrlButtonContainer = styled.div`
width: 180px;
display: flex;
Expand Down Expand Up @@ -133,12 +124,6 @@ export const FilterLabel = styled.label`
line-height: 17px;
letter-spacing: 0.15px;
`;
export const Leftheader = styled.div`
display: flex;
gap: 20px;
align-items: center;
justify-content: center;
`;
export const CompanyNameAndLink = styled.div`
display: flex;
flex-direction: column;
Expand Down
3 changes: 1 addition & 2 deletions src/pages/tickets/workspace/workspaceHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { WorkspaceBountyHeaderProps } from '../../../../people/interfaces.ts';
import { SearchBar } from '../../../../components/common/index.tsx';
import { useStores } from '../../../../store/index.tsx';
import { userCanManageBounty, filterCount } from '../../../../helpers/index.ts';
import { Leftheader, Header } from '../../style.ts';
import addBounty from './Icons/addBounty.svg';
import file from './Icons/file.svg';
import githubIcon from './Icons/githubIcon.svg';
Expand All @@ -25,11 +26,9 @@ import {
FillContainer,
Filters,
FiltersRight,
Header,
ImageContainer,
Img,
InternalContainer,
Leftheader,
NewStatusContainer,
NumberOfBounties,
PrimaryText,
Expand Down
Loading

0 comments on commit 630c5b4

Please sign in to comment.