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

[Draft] ✨ Adding tests for checking filter&sort abilities in application table #1238

Conversation

TalyaNaima
Copy link

@TalyaNaima TalyaNaima commented Oct 9, 2024

relates to issue: #1745 in tackle2-ui
Adding ability to test the filter & sort by analysis

Should be merged after: konveyor/tackle2-ui#2100

Copy link

openshift-ci bot commented Oct 9, 2024

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 9, 2024
@mguetta1 mguetta1 self-requested a review October 10, 2024 11:42
@mguetta1
Copy link
Contributor

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 10, 2024
@abrugaro abrugaro changed the title ✨adding tests for checking filter&sort abilities in application table ✨ Adding tests for checking filter&sort abilities in application table Oct 16, 2024
@abrugaro abrugaro self-requested a review October 16, 2024 14:23
Copy link

@Brugui7 Brugui7 left a 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(){
Copy link

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);
Copy link

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);
Copy link

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
Copy link

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

Copy link
Collaborator

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.

Copy link
Author

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);
Copy link

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.

@sshveta sshveta changed the title ✨ Adding tests for checking filter&sort abilities in application table [Draft] ✨ Adding tests for checking filter&sort abilities in application table Nov 4, 2024
@TalyaNaima TalyaNaima closed this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants