Skip to content

Commit

Permalink
[RFR] Fix selecting language on analysis wizard, targets step
Browse files Browse the repository at this point in the history
Follow-up to konveyor#1136

To make sure the test does not unselected the desired target
language that is automatically selected from the application's
tags (language-discovery automatically adds tags when the
application is created), switch from a `click` action to a
`check` action.  A bit more code is used to get to the input
checkbox so the `check()` will work.

Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
  • Loading branch information
sjd78 committed Jun 28, 2024
1 parent 40d1009 commit 7a8d6db
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cypress/e2e/models/migration/applicationinventory/analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,21 @@ export class Analysis extends Application {
selectFormItems(sourceDropdown, source);
}

/**
* Make sure our language is selected. It may already be selected if language-discovery
* added it, or if it was added manually.
*/
public static selectLanguage(language: Languages) {
cy.wait(2 * SEC);
click(actionSelectToggle);
clickByText("div", language);

// find the language's input checkbox and make sure it is checked
cy.get(`${actionSelectToggle} + .pf-v5-c-menu`)
.contains(language)
.closest(".pf-v5-c-menu__list-item")
.find("input[type=checkbox]")
.check();

click(actionSelectToggle);
}

Expand Down

0 comments on commit 7a8d6db

Please sign in to comment.