mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix language dependency of some selectors in login and user profile tests
This commit is contained in:
parent
480378a182
commit
e7207da9ac
@ -2,6 +2,9 @@
|
||||
|
||||
export class Toasts {
|
||||
// selectors
|
||||
toastSlot = ".b-toaster-slot";
|
||||
toastTypeSuccess = ".b-toast-success";
|
||||
toastTypeError = ".b-toast-danger";
|
||||
toastTitle = ".gdd-toaster-title";
|
||||
toastMessage = ".gdd-toaster-body";
|
||||
}
|
||||
|
||||
@ -25,11 +25,11 @@ Then("the user is logged in with username {string}", (username: string) => {
|
||||
|
||||
Then("the user cannot login", () => {
|
||||
const toast = new Toasts();
|
||||
cy.get(toast.toastTitle).should("contain.text", "Error!");
|
||||
cy.get(toast.toastMessage).should(
|
||||
"contain.text",
|
||||
"No user with this credentials."
|
||||
);
|
||||
cy.get(toast.toastSlot).within(() => {
|
||||
cy.get(toast.toastTypeError);
|
||||
cy.get(toast.toastTitle).should("be.visible");
|
||||
cy.get(toast.toastMessage).should("be.visible");
|
||||
});
|
||||
});
|
||||
|
||||
//
|
||||
|
||||
@ -24,9 +24,9 @@ And("the user submits the password form", () => {
|
||||
|
||||
When("the user is presented a {string} message", (type: string) => {
|
||||
const toast = new Toasts();
|
||||
cy.get(toast.toastTitle).should("contain.text", "Success");
|
||||
cy.get(toast.toastMessage).should(
|
||||
"contain.text",
|
||||
"Your password has been changed."
|
||||
);
|
||||
cy.get(toast.toastSlot).within(() => {
|
||||
cy.get(toast.toastTypeSuccess);
|
||||
cy.get(toast.toastTitle).should("be.visible");
|
||||
cy.get(toast.toastMessage).should("be.visible");
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user