keycloak-scim/js/apps/admin-ui/cypress/support/forms/Select.ts

21 lines
509 B
TypeScript
Raw Normal View History

export default class Select {
static assertSelectedItem(
chain: Cypress.Chainable<JQuery<HTMLElement>>,
itemName: string,
) {
chain.parent().should("have.text", itemName);
}
static selectItem(
chain: Cypress.Chainable<JQuery<HTMLElement>>,
itemName: string,
) {
chain.click();
this.#getSelectMenu(chain).contains(itemName).click();
}
static #getSelectMenu(chain: Cypress.Chainable<JQuery<HTMLElement>>) {
remove all use of deprecated Select and Dropdown (#29270) * removed deprecated select Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * some more deprecation removal working towards fixing: #28197 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * changed to use new api Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * more deprecation removal Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed merge error Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * small fix Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed merge error Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * no more default text for SelectOption Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed test Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed test Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed test Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed test Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * changed to use id Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed dropdown in keycloakCard and test fixes Signed-off-by: mfrances <mfrances@redhat.com> Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed lint error Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed test Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix dropdown/select related test failures Signed-off-by: mfrances <mfrances@redhat.com> * fixed test Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed test Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * i18n label Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix test Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed tests Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed test Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * removed Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fixed merge error Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> --------- Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> Signed-off-by: mfrances <mfrances@redhat.com> Co-authored-by: mfrances <mfrances@redhat.com>
2024-05-30 11:45:58 +00:00
return chain.parent().get(".pf-v5-c-menu__list");
}
}