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 {
|
export class Toasts {
|
||||||
// selectors
|
// selectors
|
||||||
|
toastSlot = ".b-toaster-slot";
|
||||||
|
toastTypeSuccess = ".b-toast-success";
|
||||||
|
toastTypeError = ".b-toast-danger";
|
||||||
toastTitle = ".gdd-toaster-title";
|
toastTitle = ".gdd-toaster-title";
|
||||||
toastMessage = ".gdd-toaster-body";
|
toastMessage = ".gdd-toaster-body";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,11 +25,11 @@ Then("the user is logged in with username {string}", (username: string) => {
|
|||||||
|
|
||||||
Then("the user cannot login", () => {
|
Then("the user cannot login", () => {
|
||||||
const toast = new Toasts();
|
const toast = new Toasts();
|
||||||
cy.get(toast.toastTitle).should("contain.text", "Error!");
|
cy.get(toast.toastSlot).within(() => {
|
||||||
cy.get(toast.toastMessage).should(
|
cy.get(toast.toastTypeError);
|
||||||
"contain.text",
|
cy.get(toast.toastTitle).should("be.visible");
|
||||||
"No user with this credentials."
|
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) => {
|
When("the user is presented a {string} message", (type: string) => {
|
||||||
const toast = new Toasts();
|
const toast = new Toasts();
|
||||||
cy.get(toast.toastTitle).should("contain.text", "Success");
|
cy.get(toast.toastSlot).within(() => {
|
||||||
cy.get(toast.toastMessage).should(
|
cy.get(toast.toastTypeSuccess);
|
||||||
"contain.text",
|
cy.get(toast.toastTitle).should("be.visible");
|
||||||
"Your password has been changed."
|
cy.get(toast.toastMessage).should("be.visible");
|
||||||
);
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user