test: load correct data for asserts in assignmentTrainer cypress test

This commit is contained in:
Daniel Egger 2023-12-08 11:15:42 +01:00
parent 66cc2dab2b
commit a299fd5e9b
1 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
import { TEST_STUDENT1_USER_ID } from "../../consts";
import { TEST_TRAINER1_USER_ID } from "../../consts";
import { login } from "../helpers";
describe("assignmentTrainer.cy.js", () => {
@ -85,8 +85,8 @@ describe("assignmentTrainer.cy.js", () => {
cy.wait(500);
// load AssignmentCompletion from DB and check
cy.loadAssignmentCompletion(
"assignment_user_id",
TEST_STUDENT1_USER_ID
"evaluation_user_id",
TEST_TRAINER1_USER_ID
).then((ac) => {
expect(ac.completion_status).to.equal("EVALUATION_IN_PROGRESS");
expect(JSON.stringify(ac.completion_data)).to.include("Nicht so gut");
@ -187,8 +187,8 @@ describe("assignmentTrainer.cy.js", () => {
// load AssignmentCompletion from DB and check
cy.loadAssignmentCompletion(
"assignment_user_id",
TEST_STUDENT1_USER_ID
"evaluation_user_id",
TEST_TRAINER1_USER_ID
).then((ac) => {
expect(ac.completion_status).to.equal("EVALUATION_SUBMITTED");
expect(ac.evaluation_points).to.equal(17);
@ -237,8 +237,8 @@ describe("assignmentTrainer.cy.js", () => {
// load AssignmentCompletion from DB and check
cy.loadAssignmentCompletion(
"assignment_user_id",
TEST_STUDENT1_USER_ID
"evaluation_user_id",
TEST_TRAINER1_USER_ID
).then((ac) => {
console.log(ac.completion_status);
expect(ac.completion_status).to.equal("EVALUATION_IN_PROGRESS");
@ -323,8 +323,8 @@ describe("assignmentTrainer.cy.js", () => {
// load AssignmentCompletion from DB and check
cy.loadAssignmentCompletion(
"assignment_user_id",
TEST_STUDENT1_USER_ID
"evaluation_user_id",
TEST_TRAINER1_USER_ID
).then((ac) => {
expect(ac.completion_status).to.equal("EVALUATION_SUBMITTED");
expect(ac.evaluation_max_points).to.equal(0);