test: load correct data for asserts in assignmentTrainer cypress test
This commit is contained in:
parent
66cc2dab2b
commit
a299fd5e9b
|
|
@ -1,4 +1,4 @@
|
||||||
import { TEST_STUDENT1_USER_ID } from "../../consts";
|
import { TEST_TRAINER1_USER_ID } from "../../consts";
|
||||||
import { login } from "../helpers";
|
import { login } from "../helpers";
|
||||||
|
|
||||||
describe("assignmentTrainer.cy.js", () => {
|
describe("assignmentTrainer.cy.js", () => {
|
||||||
|
|
@ -85,8 +85,8 @@ describe("assignmentTrainer.cy.js", () => {
|
||||||
cy.wait(500);
|
cy.wait(500);
|
||||||
// load AssignmentCompletion from DB and check
|
// load AssignmentCompletion from DB and check
|
||||||
cy.loadAssignmentCompletion(
|
cy.loadAssignmentCompletion(
|
||||||
"assignment_user_id",
|
"evaluation_user_id",
|
||||||
TEST_STUDENT1_USER_ID
|
TEST_TRAINER1_USER_ID
|
||||||
).then((ac) => {
|
).then((ac) => {
|
||||||
expect(ac.completion_status).to.equal("EVALUATION_IN_PROGRESS");
|
expect(ac.completion_status).to.equal("EVALUATION_IN_PROGRESS");
|
||||||
expect(JSON.stringify(ac.completion_data)).to.include("Nicht so gut");
|
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
|
// load AssignmentCompletion from DB and check
|
||||||
cy.loadAssignmentCompletion(
|
cy.loadAssignmentCompletion(
|
||||||
"assignment_user_id",
|
"evaluation_user_id",
|
||||||
TEST_STUDENT1_USER_ID
|
TEST_TRAINER1_USER_ID
|
||||||
).then((ac) => {
|
).then((ac) => {
|
||||||
expect(ac.completion_status).to.equal("EVALUATION_SUBMITTED");
|
expect(ac.completion_status).to.equal("EVALUATION_SUBMITTED");
|
||||||
expect(ac.evaluation_points).to.equal(17);
|
expect(ac.evaluation_points).to.equal(17);
|
||||||
|
|
@ -237,8 +237,8 @@ describe("assignmentTrainer.cy.js", () => {
|
||||||
|
|
||||||
// load AssignmentCompletion from DB and check
|
// load AssignmentCompletion from DB and check
|
||||||
cy.loadAssignmentCompletion(
|
cy.loadAssignmentCompletion(
|
||||||
"assignment_user_id",
|
"evaluation_user_id",
|
||||||
TEST_STUDENT1_USER_ID
|
TEST_TRAINER1_USER_ID
|
||||||
).then((ac) => {
|
).then((ac) => {
|
||||||
console.log(ac.completion_status);
|
console.log(ac.completion_status);
|
||||||
expect(ac.completion_status).to.equal("EVALUATION_IN_PROGRESS");
|
expect(ac.completion_status).to.equal("EVALUATION_IN_PROGRESS");
|
||||||
|
|
@ -323,8 +323,8 @@ describe("assignmentTrainer.cy.js", () => {
|
||||||
|
|
||||||
// load AssignmentCompletion from DB and check
|
// load AssignmentCompletion from DB and check
|
||||||
cy.loadAssignmentCompletion(
|
cy.loadAssignmentCompletion(
|
||||||
"assignment_user_id",
|
"evaluation_user_id",
|
||||||
TEST_STUDENT1_USER_ID
|
TEST_TRAINER1_USER_ID
|
||||||
).then((ac) => {
|
).then((ac) => {
|
||||||
expect(ac.completion_status).to.equal("EVALUATION_SUBMITTED");
|
expect(ac.completion_status).to.equal("EVALUATION_SUBMITTED");
|
||||||
expect(ac.evaluation_max_points).to.equal(0);
|
expect(ac.evaluation_max_points).to.equal(0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue