Skip to content
Snippets Groups Projects
Commit d77419b4 authored by Yorick de Vries's avatar Yorick de Vries
Browse files

fix using checkbox options

parent 949f683f
No related branches found
No related tags found
1 merge request!171WIP: Configurable option order
Pipeline #366251 passed with warnings
......@@ -274,6 +274,7 @@ describe("Integration", () => {
.post(`/api/checkboxquestionoptions/`)
.send({
text: "option 1",
number: 1,
checkboxQuestionId: checkboxQuestion.id,
})
.set("cookie", await teacherCookie());
......@@ -281,6 +282,7 @@ describe("Integration", () => {
const checkboxoption1 = JSON.parse(res.text);
expect(checkboxoption1).toMatchObject({
text: "option 1",
number: 1,
});
// post Checkbox question option in the questionnaire
......@@ -288,6 +290,7 @@ describe("Integration", () => {
.post(`/api/checkboxquestionoptions/`)
.send({
text: "option 2",
number: 2,
checkboxQuestionId: checkboxQuestion.id,
})
.set("cookie", await teacherCookie());
......@@ -295,6 +298,7 @@ describe("Integration", () => {
const checkboxoption2 = JSON.parse(res.text);
expect(checkboxoption2).toMatchObject({
text: "option 2",
number: 2,
});
// post a MC question in the questionnaire
......@@ -320,6 +324,7 @@ describe("Integration", () => {
.post(`/api/multiplechoicequestionoptions/`)
.send({
text: "option A",
number: 1,
multipleChoiceQuestionId: mcQuestion.id,
})
.set("cookie", await teacherCookie());
......@@ -327,6 +332,7 @@ describe("Integration", () => {
const mcoption1 = JSON.parse(res.text);
expect(mcoption1).toMatchObject({
text: "option A",
number: 1,
});
// post another MC question option in the questionnaire
......@@ -334,6 +340,7 @@ describe("Integration", () => {
.post(`/api/multiplechoicequestionoptions/`)
.send({
text: "option B",
number: 2,
multipleChoiceQuestionId: mcQuestion.id,
})
.set("cookie", await teacherCookie());
......@@ -341,6 +348,7 @@ describe("Integration", () => {
const mcoption2 = JSON.parse(res.text);
expect(mcoption2).toMatchObject({
text: "option B",
number: 2,
});
// post an open question in the questionnaire
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment