fix: login test

This commit is contained in:
Reto Aebersold 2023-10-30 14:13:21 +01:00
parent 7c50d709e9
commit bd85c3675e
2 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ onMounted(dashboardStore.loadDashboardDetails);
<main class="grow bg-gray-200 lg:order-2">
<div class="m-8">
<div class="mb-10 flex items-center justify-between">
<h1 data-cy="welcome-message">Dashboard</h1>
<h1 data-cy="dashboard-title">Dashboard</h1>
<ItDropdownSelect
:model-value="dashboardStore.currentDashboardConfig"
class="mt-4 w-full lg:mt-0 lg:w-96"

View File

@ -19,14 +19,14 @@ describe("login.cy.js", () => {
cy.get('[data-cy="login-button"]').click();
cy.request("/api/core/me").its("status").should("eq", 200);
cy.get('[data-cy="welcome-message"]').should("contain", "Willkommen, Test");
cy.get('[data-cy="dashboard-title"]').should("contain", "Dashboard");
});
it("can login with helper function", () => {
login("test-student1@example.com", "test");
cy.visit("/");
cy.request("/api/core/me").its("status").should("eq", 200);
cy.get('[data-cy="welcome-message"]').should("contain", "Willkommen, Test");
cy.get('[data-cy="dashboard-title"]').should("contain", "Dashboard");
});
it("login will redirect to requestet page", () => {
@ -40,7 +40,7 @@ describe("login.cy.js", () => {
cy.get('[data-cy="learning-path-title"]').should(
"contain",
"Test Lehrgang"
"Test Lehrgang",
);
});
});