2022-01-05 16:18:49 +00:00
|
|
|
export default class WebAuthnPolicies {
|
|
|
|
webAuthnPolicyCreateTimeout(value: number) {
|
|
|
|
cy.findByTestId("webAuthnPolicyCreateTimeout").type(String(value));
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
goToTab() {
|
2022-06-22 11:35:10 +00:00
|
|
|
cy.findByTestId("policies").click().get("#pf-tab-3-webauthnPolicy").click();
|
2022-01-05 16:18:49 +00:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToPasswordlessTab() {
|
2022-06-22 11:35:10 +00:00
|
|
|
cy.findByTestId("policies")
|
2022-01-05 16:18:49 +00:00
|
|
|
.click()
|
|
|
|
.get("#pf-tab-4-webauthnPasswordlessPolicy")
|
|
|
|
.click();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
fillSelects(data: Record<string, string>, isPasswordLess: boolean = false) {
|
|
|
|
for (const prop of Object.keys(data)) {
|
|
|
|
cy.get(
|
|
|
|
`#${
|
|
|
|
isPasswordLess ? prop.replace("Policy", "PolicyPasswordless") : prop
|
|
|
|
}`
|
|
|
|
)
|
|
|
|
.click()
|
|
|
|
.parent()
|
|
|
|
.contains(data[prop])
|
|
|
|
.click();
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
save() {
|
|
|
|
cy.findByTestId("save").click();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|