diff --git a/client/src/pages/cockpit/cockpitPage/CockpitExpertParentPage.vue b/client/src/pages/cockpit/cockpitPage/CockpitExpertParentPage.vue
index a5fca484..3e861216 100644
--- a/client/src/pages/cockpit/cockpitPage/CockpitExpertParentPage.vue
+++ b/client/src/pages/cockpit/cockpitPage/CockpitExpertParentPage.vue
@@ -1,9 +1,11 @@
diff --git a/cypress/e2e/settings.cy.js b/cypress/e2e/settings.cy.js
index 94e52c7a..70a986df 100644
--- a/cypress/e2e/settings.cy.js
+++ b/cypress/e2e/settings.cy.js
@@ -1,20 +1,24 @@
-import {EXPERT_COCKPIT_URL, login} from "./helpers";
+import { EXPERT_COCKPIT_URL, login } from "./helpers";
describe("settings.cy.js", () => {
beforeEach(() => {
cy.manageCommand("cypress_reset");
+ cy.intercept("/server/graphql").as("graphql");
});
describe("with circle documents enabled", () => {
it("student can see circle documents", () => {
login("test-student1@example.com", "test");
cy.visit("/course/test-lehrgang/learn/fahrzeug");
+ cy.wait(["@graphql", "@graphql"]);
cy.get('[data-cy="circle-document-section"]').should("exist");
});
it("trainer can see circle documents", () => {
login("test-trainer1@example.com", "test");
+
cy.visit(EXPERT_COCKPIT_URL);
+ cy.wait(["@graphql", "@graphql"]);
cy.get('[data-cy="circle-documents"]').should("exist");
});
});
@@ -27,6 +31,7 @@ describe("settings.cy.js", () => {
it("student cannot see circle documents", () => {
login("test-student1@example.com", "test");
cy.visit("/course/test-lehrgang/learn/fahrzeug");
+ cy.wait(["@graphql", "@graphql"]);
cy.get('[data-cy="circle-title"]').should("contain", "Fahrzeug");
cy.get('[data-cy="circle-document-section"]').should("not.exist");
});
@@ -34,6 +39,7 @@ describe("settings.cy.js", () => {
it("trainer cannot see circle documents", () => {
login("test-trainer1@example.com", "test");
cy.visit(EXPERT_COCKPIT_URL);
+ cy.wait(["@graphql", "@graphql"]);
cy.get('[data-cy="circle-documents"]').should("not.exist");
});
});