itemengine-cypress-automation 1.0.374-dnd-flakiness-r1-e98ac55.0 → 1.0.375

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -180,6 +180,219 @@ describe('Create item page - Fill in the gaps over image - text: All or nothing
180
180
  });
181
181
  });
182
182
 
183
+ views.forEach((view) => {
184
+ describe(`Fill in the gaps over image with text - Manually scored: ${view}`, { tags: 'smoke' }, () => {
185
+ abortEarlySetup();
186
+ before(() => {
187
+ switch (view) {
188
+ case 'Question preview':
189
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
190
+ fillInTheGapsOverImageTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
191
+ cy.barsPreLoaderWait();
192
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
193
+ fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
194
+ fillInTheGapsOverImageTextPage.steps.insertResponseArea(10);
195
+ fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
196
+ fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
197
+ fillInTheGapsOverImageTextPage.steps.expandScoringTypeDropdown();
198
+ fillInTheGapsOverImageTextPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
199
+ fillInTheGapsOverImageTextPage.steps.allotPoints(20);
200
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
201
+ break;
202
+ case 'Item preview':
203
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
204
+ itemPreviewPage.steps.switchToPreviewTab();
205
+ break;
206
+ case 'Grading view':
207
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
208
+ break;
209
+ };
210
+ });
211
+
212
+ beforeEach(() => {
213
+ switch (view) {
214
+ case 'Question preview':
215
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
216
+ fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
217
+ break;
218
+ case 'Item preview':
219
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
220
+ itemPreviewPage.steps.resetQuestionPreview();
221
+ break;
222
+ case 'Grading view':
223
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
224
+ break;
225
+ }
226
+ });
227
+
228
+ if (view === 'Question preview') {
229
+ after(() => {
230
+ fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
231
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
232
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
233
+ });
234
+ };
235
+
236
+ it('Question instructions should be visible', () => {
237
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionInstructionsTextPreviewTab('Fill in the gaps');
238
+ fillInTheGapsOverImageTextPage.steps.verifyVisibityOfQuestionInstructionsText();
239
+ });
240
+
241
+ it('User should be able to attempt the question in student view and correct/incorrect icons, Your answer is correct/incorrect label, and correct answer section should not be displayed in grading view', () => {
242
+ fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
243
+ if (view === 'Grading view') {
244
+ studentViewPage.steps.submitResponse();
245
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
246
+ studentViewPage.steps.clickOnGoToGradingViewButton();
247
+ gradingViewPage.steps.verifyGradingViewScore('', 20);
248
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectIconNotExist(0);
249
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectIconNotExist(1);
250
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
251
+ fillInTheGapsOverImageTextPage.steps.verifyAnswerStatusBannerNotExist();
252
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerSectionNotExist();
253
+ };
254
+ if (view === 'Question preview' || view === 'Item preview') {
255
+ fillInTheGapsOverImageTextPage.steps.checkManuallyScoredScoringLabel();
256
+ };
257
+ });
258
+ })
259
+ });
260
+
261
+ views.forEach((view) => {
262
+ describe(`Fill in the gaps with text - Non scored: ${view}`, { tags: 'smoke' }, () => {
263
+ abortEarlySetup();
264
+ before(() => {
265
+ switch (view) {
266
+ case 'Question preview':
267
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
268
+ cy.barsPreLoaderWait();
269
+ fillInTheGapsOverImageTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
270
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
271
+ fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
272
+ fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
273
+ fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
274
+ fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
275
+ fillInTheGapsOverImageTextPage.steps.expandScoringTypeDropdown();
276
+ fillInTheGapsOverImageTextPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
277
+ fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
278
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
279
+ break;
280
+ case 'Item preview':
281
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
282
+ itemPreviewPage.steps.switchToPreviewTab();
283
+ break;
284
+ case 'Grading view':
285
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
286
+ break;
287
+ };
288
+ });
289
+
290
+ beforeEach(() => {
291
+ switch (view) {
292
+ case 'Question preview':
293
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
294
+ fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
295
+ break;
296
+ case 'Item preview':
297
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
298
+ itemPreviewPage.steps.resetQuestionPreview();
299
+ break;
300
+ case 'Grading view':
301
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
302
+ break;
303
+ }
304
+ });
305
+
306
+ if (view === 'Question preview') {
307
+ after(() => {
308
+ fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
309
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
310
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
311
+ });
312
+ };
313
+
314
+ it('When the user selects \'Grading\' view without attempting the question, non scoring label should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and correct/incorrect icons should not be displayed', () => {
315
+ if (view === 'Grading view') {
316
+ studentViewPage.steps.submitResponse();
317
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
318
+ studentViewPage.steps.clickOnGoToGradingViewButton();
319
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
320
+ };
321
+ if (view === 'Question preview' || view === 'Item preview') {
322
+ fillInTheGapsOverImageTextPage.steps.checkNonScoredScoringLabel();
323
+ fillInTheGapsOverImageTextPage.steps.switchToGradingView();
324
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
325
+ };
326
+ fillInTheGapsOverImageTextPage.steps.verifyResponseAreaNumeration();
327
+ utilities.verifyInnerText(fillInTheGapsOverImageTextPage.correctAnswersLabel(), 'Correct answers');
328
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
329
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
330
+ });
331
+
332
+ it('When the user attempts the question incorrectly,and on switching to \'Grading\' view non scoring label should be displayed, incorrect icon should be displayed beside incorrect response, a status message with text \'Your answer is incorrect\' and correct answer section with correct answer should be displayed', () => {
333
+ fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Marigold' }, { responseIndex: 1, responseText: 'Rose' }, { responseIndex: 2, responseText: 'Sunflower' }]);
334
+ if (view === 'Grading view') {
335
+ studentViewPage.steps.submitResponse();
336
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
337
+ studentViewPage.steps.clickOnGoToGradingViewButton();
338
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
339
+ };
340
+ if (view === 'Question preview' || view === 'Item preview') {
341
+ fillInTheGapsOverImageTextPage.steps.checkNonScoredScoringLabel();
342
+ fillInTheGapsOverImageTextPage.steps.switchToGradingView();
343
+ };
344
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(0);
345
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(1);
346
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(2);
347
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
348
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
349
+ });
350
+
351
+ it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along should be displayed', () => {
352
+ if (view === 'Grading view') {
353
+ studentViewPage.steps.clearResponses();
354
+ };
355
+ fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Sunflower' }]);
356
+ if (view === 'Grading view') {
357
+ studentViewPage.steps.submitResponse();
358
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
359
+ studentViewPage.steps.clickOnGoToGradingViewButton();
360
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
361
+ };
362
+ if (view === 'Question preview' || view === 'Item preview') {
363
+ fillInTheGapsOverImageTextPage.steps.checkNonScoredScoringLabel();
364
+ fillInTheGapsOverImageTextPage.steps.switchToGradingView();
365
+ };
366
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(0);
367
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(1);
368
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(2);
369
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
370
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
371
+ });
372
+
373
+ it('When user attempts the question correctly, and on switching to \'Grading\' view non scoring label should be displayed, correct icons should be displayed beside the correct response, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
374
+ if (view === 'Grading view') {
375
+ studentViewPage.steps.clearResponses();
376
+ };
377
+ fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
378
+ if (view === 'Grading view') {
379
+ studentViewPage.steps.submitResponse();
380
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
381
+ studentViewPage.steps.clickOnGoToGradingViewButton();
382
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
383
+ };
384
+ if (view === 'Question preview' || view === 'Item preview') {
385
+ fillInTheGapsOverImageTextPage.steps.checkNonScoredScoringLabel();
386
+ fillInTheGapsOverImageTextPage.steps.switchToGradingView();
387
+ };
388
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(0);
389
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(1);
390
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(2);
391
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
392
+ });
393
+ });
394
+ });
395
+
183
396
  if (!grepTags || !grepTags.includes('smoke')) {
184
397
  describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
185
398
  abortEarlySetup();
@@ -171,6 +171,213 @@ describe('Create item page - Fill in the gaps with text: All or nothing ', () =>
171
171
  });
172
172
  });
173
173
 
174
+ views.forEach((view) => {
175
+ describe(`Fill in the gaps with text - Manually scored: ${view}`, { tags: 'smoke' }, () => {
176
+ abortEarlySetup();
177
+ before(() => {
178
+ switch (view) {
179
+ case 'Question preview':
180
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
181
+ cy.barsPreLoaderWait();
182
+ fillInTheGapsTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
183
+ fillInTheGapsTextPage.steps.expandScoringTypeDropdown();
184
+ fillInTheGapsTextPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
185
+ fillInTheGapsTextPage.steps.allotPoints(20);
186
+ fillInTheGapsTextPage.steps.addResponseArea();
187
+ fillInTheGapsTextPage.steps.switchToPreviewTab();
188
+ break;
189
+ case 'Item preview':
190
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
191
+ itemPreviewPage.steps.switchToPreviewTab();
192
+ break;
193
+ case 'Grading view':
194
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
195
+ break;
196
+ };
197
+ });
198
+
199
+ beforeEach(() => {
200
+ switch (view) {
201
+ case 'Question preview':
202
+ fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
203
+ fillInTheGapsTextPage.steps.resetQuestionPreview();
204
+ break;
205
+ case 'Item preview':
206
+ fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
207
+ itemPreviewPage.steps.resetQuestionPreview();
208
+ break;
209
+ case 'Grading view':
210
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
211
+ break;
212
+ }
213
+ });
214
+
215
+ if (view === 'Question preview') {
216
+ after(() => {
217
+ fillInTheGapsTextPage.steps.clickOnSaveQuestionButton();
218
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
219
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
220
+ });
221
+ };
222
+
223
+ it('Question instructions should be visible', () => {
224
+ fillInTheGapsTextPage.steps.verifyQuestionInstructionsTextPreviewTab('Fill in the gaps');
225
+ fillInTheGapsTextPage.steps.verifyVisibityOfQuestionInstructionsText();
226
+ });
227
+
228
+ it('User should be able to attempt the question in student view and correct/incorrect icons, Your answer is correct/incorrect label, and correct answer section should not be displayed in grading view', () => {
229
+ fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Marigold' }, { responseIndex: 1, responseText: 'Rose' }, { responseIndex: 2, responseText: 'Sunflower' }]);
230
+ if (view === 'Grading view') {
231
+ studentViewPage.steps.submitResponse();
232
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
233
+ studentViewPage.steps.clickOnGoToGradingViewButton();
234
+ gradingViewPage.steps.verifyGradingViewScore('', 20);
235
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(0);
236
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(1);
237
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
238
+ fillInTheGapsTextPage.steps.verifyAnswerStatusBannerNotExist();
239
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExist();
240
+ };
241
+ if (view === 'Question preview' || view === 'Item preview') {
242
+ fillInTheGapsTextPage.steps.checkManuallyScoredScoringLabel();
243
+ };
244
+ });
245
+ })
246
+ });
247
+
248
+ views.forEach((view) => {
249
+ describe(`Fill in the gaps with text - Non scored: ${view}`, { tags: 'smoke' }, () => {
250
+ abortEarlySetup();
251
+ before(() => {
252
+ switch (view) {
253
+ case 'Question preview':
254
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
255
+ cy.barsPreLoaderWait();
256
+ fillInTheGapsTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
257
+ fillInTheGapsTextPage.steps.expandScoringTypeDropdown();
258
+ fillInTheGapsTextPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
259
+ fillInTheGapsTextPage.steps.addResponseArea();
260
+ fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
261
+ fillInTheGapsTextPage.steps.switchToPreviewTab();
262
+ break;
263
+ case 'Item preview':
264
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
265
+ itemPreviewPage.steps.switchToPreviewTab();
266
+ break;
267
+ case 'Grading view':
268
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
269
+ break;
270
+ };
271
+ });
272
+
273
+ beforeEach(() => {
274
+ switch (view) {
275
+ case 'Question preview':
276
+ fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
277
+ fillInTheGapsTextPage.steps.resetQuestionPreview();
278
+ break;
279
+ case 'Item preview':
280
+ fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
281
+ itemPreviewPage.steps.resetQuestionPreview();
282
+ break;
283
+ case 'Grading view':
284
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
285
+ break;
286
+ }
287
+ });
288
+
289
+ if (view === 'Question preview') {
290
+ after(() => {
291
+ fillInTheGapsTextPage.steps.clickOnSaveQuestionButton();
292
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
293
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
294
+ });
295
+ };
296
+
297
+ it('When the user selects \'Grading\' view without attempting the question, non scoring label should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and correct/incorrect icons should not be displayed', () => {
298
+ if (view === 'Grading view') {
299
+ studentViewPage.steps.submitResponse();
300
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
301
+ studentViewPage.steps.clickOnGoToGradingViewButton();
302
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
303
+ };
304
+ if (view === 'Question preview' || view === 'Item preview') {
305
+ fillInTheGapsTextPage.steps.checkNonScoredScoringLabel();
306
+ fillInTheGapsTextPage.steps.switchToGradingView();
307
+ fillInTheGapsTextPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
308
+ };
309
+ utilities.verifyInnerText(fillInTheGapsTextPage.correctAnswersLabel(), 'Correct answers');
310
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
311
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(0);
312
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(1);
313
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
314
+ });
315
+
316
+ it('When the user attempts the question incorrectly,and on switching to \'Grading\' view non scoring label should be displayed, incorrect icon should be displayed beside incorrect response, a status message with text \'Your answer is incorrect\' and correct answer section with correct answer should be displayed', () => {
317
+ fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Marigold' }, { responseIndex: 1, responseText: 'Rose' }, { responseIndex: 2, responseText: 'Sunflower' }]);
318
+ if (view === 'Grading view') {
319
+ studentViewPage.steps.submitResponse();
320
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
321
+ studentViewPage.steps.clickOnGoToGradingViewButton();
322
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
323
+ };
324
+ if (view === 'Question preview' || view === 'Item preview') {
325
+ fillInTheGapsTextPage.steps.checkNonScoredScoringLabel();
326
+ fillInTheGapsTextPage.steps.switchToGradingView();
327
+ };
328
+ fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(0);
329
+ fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
330
+ fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
331
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
332
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
333
+ });
334
+
335
+ it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along should be displayed', () => {
336
+ if (view === 'Grading view') {
337
+ studentViewPage.steps.clearResponses();
338
+ };
339
+ fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Sunflower' }]);
340
+ if (view === 'Grading view') {
341
+ studentViewPage.steps.submitResponse();
342
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
343
+ studentViewPage.steps.clickOnGoToGradingViewButton();
344
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
345
+ };
346
+ if (view === 'Question preview' || view === 'Item preview') {
347
+ fillInTheGapsTextPage.steps.checkNonScoredScoringLabel();
348
+ fillInTheGapsTextPage.steps.switchToGradingView();
349
+ };
350
+ fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
351
+ fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
352
+ fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
353
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
354
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
355
+ });
356
+
357
+ it('When user attempts the question correctly, and on switching to \'Grading\' view non scoring label should be displayed, correct icons should be displayed beside the correct response, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
358
+ if (view === 'Grading view') {
359
+ studentViewPage.steps.clearResponses();
360
+ };
361
+ fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
362
+ if (view === 'Grading view') {
363
+ studentViewPage.steps.submitResponse();
364
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
365
+ studentViewPage.steps.clickOnGoToGradingViewButton();
366
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
367
+ };
368
+ if (view === 'Question preview' || view === 'Item preview') {
369
+ fillInTheGapsTextPage.steps.checkNonScoredScoringLabel();
370
+ fillInTheGapsTextPage.steps.switchToGradingView();
371
+ };
372
+ fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
373
+ fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
374
+ fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
375
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
376
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
377
+ });
378
+ });
379
+ });
380
+
174
381
  if (!grepTags || !grepTags.includes('smoke')) {
175
382
  describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
176
383
  abortEarlySetup();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.374-dnd-flakiness-r1-e98ac55.0",
3
+ "version": "1.0.375",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -52,4 +52,4 @@
52
52
  "devDependencies": {
53
53
  "@applitools/eyes-cypress": "^3.47.0"
54
54
  }
55
- }
55
+ }