-
Notifications
You must be signed in to change notification settings - Fork 40
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
[Draft] ✨ Adding tests for checking filter&sort abilities in application table #1238
Conversation
Signed-off-by: TalyaNaima <[email protected]>
Hi @TalyaNaima. Thanks for your PR. I'm waiting for a konveyor member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!!! 😄 I left a few comments
@@ -140,6 +141,16 @@ describe(["@tier3"], "Application inventory filter validations", function () { | |||
clickByText(button, clearAllFilters); | |||
}); | |||
|
|||
it("Analysis filter validations",function(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: Analysis status filter validations
it("Analysis filter validations",function(){ | ||
Application.open(); | ||
getFirstAnalysisColumnValue().then((firstValue) => { | ||
cy.log("First Analysis column value: ", firstValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: This line can be removed
getFirstAnalysisColumnValue().then((firstValue) => { | ||
cy.log("First Analysis column value: ", firstValue); | ||
applySearchFilter(analysis,firstValue); | ||
cy.wait(2000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this line and it should work anyway
// Sort the application inventory by analysis in descending order | ||
clickOnSortButton(analysis, SortType.descending); | ||
cy.wait(2000); | ||
// Verify that the application inventory table rows are displayed in descending order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is explanatory enough so we can remove the comments.
I think the cy.wait
lineas can be removed as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are methods like verifySortAsc and verifySortDesc in utils which can be used directly .Please check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used these methods here a well,
the verifySortDesc is only a verification function that checks that the filter works right,
after the application filters the apps by pressing on the filter button
Application.open(); | ||
getFirstAnalysisColumnValue().then((firstValue) => { | ||
cy.log("First Analysis column value: ", firstValue); | ||
applySearchFilter(analysis,firstValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test suite creates 2 applications at the beginning and does not analyze it so we can be sure that at least there is going to be one application with the "Not started" status.
In fact, there is a high probability only apps with "Not started" status exist when this test is executed, so maybe it would be a good idea to create an app then start and cancel an analysis on it so we have, at least, 2 statuses to correctly test the feature.
relates to issue: #1745 in tackle2-ui
Adding ability to test the filter & sort by analysis
Should be merged after: konveyor/tackle2-ui#2100