Skip to content

Commit

Permalink
Merge pull request #1668 from stakwork/feature-add-priority-to-feature
Browse files Browse the repository at this point in the history
Added priority field to Feature struc and changed cypress tests
  • Loading branch information
elraphty authored May 24, 2024
2 parents e3bc11a + 8a16c40 commit d4a0dd3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cypress/e2e/03_features.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ describe('Create Features for Workspace', () => {
expect(body).to.have.property('brief').and.equal(Features[i].brief.trim());
expect(body).to.have.property('requirements').and.equal(Features[i].requirements.trim());
expect(body).to.have.property('architecture').and.equal(Features[i].architecture.trim());
expect(body).to.have.property('priority').and.equal(Features[i].priority);
});
}
})
Expand All @@ -39,6 +40,7 @@ describe('Modify name for Feature', () => {
expect(body).to.have.property('brief').and.equal(Features[i].brief.trim());
expect(body).to.have.property('requirements').and.equal(Features[i].requirements.trim());
expect(body).to.have.property('architecture').and.equal(Features[i].architecture.trim());
expect(body).to.have.property('priority').and.equal(Features[i].priority);
});
}
})
Expand All @@ -62,6 +64,7 @@ describe('Modify brief for Feature', () => {
expect(body).to.have.property('brief').and.equal(Features[i].brief.trim() + " _addtext");
expect(body).to.have.property('requirements').and.equal(Features[i].requirements.trim());
expect(body).to.have.property('architecture').and.equal(Features[i].architecture.trim());
expect(body).to.have.property('priority').and.equal(Features[i].priority);
});
}
})
Expand All @@ -85,6 +88,7 @@ describe('Modify requirements for Feature', () => {
expect(body).to.have.property('brief').and.equal(Features[i].brief.trim() + " _addtext");
expect(body).to.have.property('requirements').and.equal(Features[i].requirements.trim() + " _addtext");
expect(body).to.have.property('architecture').and.equal(Features[i].architecture.trim());
expect(body).to.have.property('priority').and.equal(Features[i].priority);
});
}
})
Expand All @@ -108,6 +112,7 @@ describe('Modify architecture for Feature', () => {
expect(body).to.have.property('brief').and.equal(Features[i].brief.trim() + " _addtext");
expect(body).to.have.property('requirements').and.equal(Features[i].requirements.trim() + " _addtext");
expect(body).to.have.property('architecture').and.equal(Features[i].architecture.trim() + " _addtext");
expect(body).to.have.property('priority').and.equal(Features[i].priority);
});
}
})
Expand All @@ -131,6 +136,7 @@ describe('Get Features for Workspace', () => {
expect(feature).to.have.property('brief', expectedFeature.brief.trim() + " _addtext");
expect(feature).to.have.property('requirements', expectedFeature.requirements.trim() + " _addtext");
expect(feature).to.have.property('architecture', expectedFeature.architecture.trim() + " _addtext");
expect(feature).to.have.property('priority', expectedFeature.priority);
});
})
})
Expand All @@ -154,6 +160,7 @@ describe('Old Get Features for Workspace', () => {
expect(feature).to.have.property('brief', expectedFeature.brief.trim() + " _addtext");
expect(feature).to.have.property('requirements', expectedFeature.requirements.trim() + " _addtext");
expect(feature).to.have.property('architecture', expectedFeature.architecture.trim() + " _addtext");
expect(feature).to.have.property('priority', expectedFeature.priority);
});
}
});
Expand All @@ -176,6 +183,7 @@ describe('Get Feature by uuid', () => {
expect(resp.body).to.have.property('brief', Features[i].brief.trim() + " _addtext")
expect(resp.body).to.have.property('requirements', Features[i].requirements.trim() + " _addtext")
expect(resp.body).to.have.property('architecture', Features[i].architecture.trim() + " _addtext")
expect(resp.body).to.have.property('priority', Features[i].priority)
})
}
})
Expand Down
1 change: 1 addition & 0 deletions db/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ type WorkspaceFeatures struct {
Requirements string `json:"requirements"`
Architecture string `json:"architecture"`
Url string `json:"url"`
Priority int `json:"priority"`
Created *time.Time `json:"created"`
Updated *time.Time `json:"updated"`
CreatedBy string `json:"created_by"`
Expand Down

0 comments on commit d4a0dd3

Please sign in to comment.