Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added priority field to Feature struc and changed cypress tests #1668

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -573,6 +573,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
Loading