itemengine-cypress-automation 1.0.349-IEI-5944-and-IEI-5945-manualAndNonScoredScript-2a676a6.0 → 1.0.349-miscellaneous-questions-r2-a9064f0.0
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.
- package/Dockerfile +1 -0
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +4 -62
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +3 -112
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +0 -210
- package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +0 -208
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +1 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/styleAndLayoutCustomizationLayoutProperties.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/ToolAudioPlayerNew/headerSection.js +1 -89
- package/cypress/pages/audioPlayerPage.js +0 -2
- package/cypress/pages/components/createQuestionBasePage.js +2 -8
- package/cypress/pages/contentBlocksPage.js +0 -2
- package/cypress/pages/textEntryMathPage.js +3 -1
- package/package.json +1 -1
package/Dockerfile
CHANGED
@@ -27,6 +27,7 @@ RUN chmod +x ./deploy/fillInTheGapsQuestion/run.sh
|
|
27
27
|
RUN chmod +x ./deploy/resourcesAndToolsQuestion/run.sh
|
28
28
|
RUN chmod +x ./deploy/audioResponseQuestion/run.sh
|
29
29
|
RUN chmod +x ./deploy/dataApi/run.sh
|
30
|
+
RUN chmod +x ./deploy/feedbackScaleQuestion/run.sh
|
30
31
|
|
31
32
|
RUN npm ci
|
32
33
|
|
@@ -1,11 +1,8 @@
|
|
1
|
-
import { contentBlocksPage
|
2
|
-
import { browseItemsPage } from "../../../pages/components";
|
1
|
+
import { contentBlocksPage } from "../../../pages";
|
3
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
3
|
import utilities from "../../../support/helpers/utilities";
|
5
4
|
const css = Cypress.env('css');
|
6
5
|
|
7
|
-
var itemReferenceID = "";
|
8
|
-
|
9
6
|
describe('Content blocks - Edit tab', () => {
|
10
7
|
before(() => {
|
11
8
|
cy.loginAs('admin');
|
@@ -85,62 +82,6 @@ describe('Content blocks - Edit tab', () => {
|
|
85
82
|
it('Accessibility of header section', { tags: 'a11y' }, () => {
|
86
83
|
cy.checkAccessibility(contentBlocksPage.headerLabel().parents('content-blocks'));
|
87
84
|
});
|
88
|
-
|
89
|
-
describe('Saving a question with incomplete authoring', () => {
|
90
|
-
abortEarlySetup();
|
91
|
-
before(() => {
|
92
|
-
contentBlocksPage.steps.navigateToCreateResource('content blocks');
|
93
|
-
});
|
94
|
-
|
95
|
-
it('User should be able to save the resource with incomplete authoring and display a snackbar with the text "Saved successfully!" when the Save button is clicked', () => {
|
96
|
-
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please enter text block']);
|
97
|
-
contentBlocksPage.steps.saveAQuestionWithIncompleteAuthoring();
|
98
|
-
});
|
99
|
-
contentBlocksPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
100
|
-
});
|
101
|
-
|
102
|
-
describe('User should be able to edit incomplete authored resource', () => {
|
103
|
-
abortEarlySetup();
|
104
|
-
before(() => {
|
105
|
-
contentBlocksPage.steps.navigateToCreateResource('content blocks');
|
106
|
-
contentBlocksPage.steps.saveAQuestionWithIncompleteAuthoring();
|
107
|
-
contentBlocksPage.steps.editItem();
|
108
|
-
});
|
109
|
-
|
110
|
-
it('Warning icons should be displayed on the required input fields', () => {
|
111
|
-
contentBlocksPage.steps.verifyWarningIconOnRequiredFields([
|
112
|
-
'Please enter text block',
|
113
|
-
]);
|
114
|
-
});
|
115
|
-
|
116
|
-
it('When required input fields are filled then warning icons should disappear', () => {
|
117
|
-
contentBlocksPage.steps.enterTextInTextBlockInputField(0, 'Text block text');
|
118
|
-
contentBlocksPage.steps.verifyErrorMessageIsNotDisplayed();
|
119
|
-
});
|
120
|
-
|
121
|
-
it('Clicking on Save button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
122
|
-
contentBlocksPage.steps.saveAQuestionAndVerifySnackbar();
|
123
|
-
});
|
124
|
-
|
125
|
-
it('Warning icon should not be visible', () => {
|
126
|
-
contentBlocksPage.steps.verifyWarningIconNotExist();
|
127
|
-
});
|
128
|
-
});
|
129
|
-
|
130
|
-
describe('Save as you go - Browse item page contents', () => {
|
131
|
-
abortEarlySetup();
|
132
|
-
before(() => {
|
133
|
-
contentBlocksPage.steps.navigateToCreateResource('content blocks');
|
134
|
-
contentBlocksPage.steps.saveAQuestionWithIncompleteAuthoring();
|
135
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
136
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
137
|
-
browseItemsPage.steps.navigateToBrowseItemsPage();
|
138
|
-
});
|
139
|
-
|
140
|
-
it('When user saves an incompletely authored resource then a warning icon should be visible in browse items page', () => {
|
141
|
-
browseItemsPage.steps.verifyWarningIconInBrowseItemPage(`${itemReferenceID}`);
|
142
|
-
});
|
143
|
-
});
|
144
85
|
});
|
145
86
|
|
146
87
|
describe('Body section', () => {
|
@@ -172,9 +113,10 @@ describe('Content blocks - Edit tab', () => {
|
|
172
113
|
contentBlocksPage.steps.verifyTextBlockInputFieldPlaceholderTextNotExist(contentBlocksPage.verifyTextBlockInputFieldPlaceholderText);
|
173
114
|
});
|
174
115
|
|
175
|
-
it('When user clears text and focuses out of text block input field, then error message should
|
116
|
+
it('When user clears text and focuses out of text block input field, then error message \'Error: Text block is required.\' should be displayed', () => {
|
176
117
|
contentBlocksPage.steps.clearAndFocusOutOfTextBlockInputField();
|
177
|
-
utilities.
|
118
|
+
utilities.verifyInnerText(contentBlocksPage.errorMessage(), 'Error: Text block is required.');
|
119
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.errorMessage(), 'visible');
|
178
120
|
});
|
179
121
|
|
180
122
|
it('When user enters text again then error message should not be displayed', () => {
|
@@ -251,15 +251,12 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
|
|
251
251
|
case 'Question preview':
|
252
252
|
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
253
253
|
cy.barsPreLoaderWait();
|
254
|
-
dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options in correct categories.');
|
255
254
|
dragAndDropIntoCategoriesPage.steps.expandScoringTypeDropdown();
|
256
255
|
dragAndDropIntoCategoriesPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
257
256
|
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.scoringTypeDropdown(), 'Manually scored');
|
258
257
|
cy.log('Adding wait to ensure Manually scored is selected');
|
259
258
|
cy.wait(2000);
|
260
|
-
dragAndDropIntoCategoriesPage.steps.allotPoints(20);
|
261
259
|
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Parrot', 'Whale']);
|
262
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
263
260
|
break;
|
264
261
|
case 'Grading view':
|
265
262
|
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
@@ -285,11 +282,6 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
|
|
285
282
|
});
|
286
283
|
};
|
287
284
|
|
288
|
-
it('Question instructions should be visible', () => {
|
289
|
-
dragAndDropIntoCategoriesPage.steps.verifyQuestionInstructionsTextPreviewTab('Drag and drop options in correct categories.');
|
290
|
-
dragAndDropIntoCategoriesPage.steps.verifyVisibityOfQuestionInstructionsText();
|
291
|
-
});
|
292
|
-
|
293
285
|
it('When the user selects \'Grading\' view, correct answer section should not be displayed', () => {
|
294
286
|
if (view === 'Grading view') {
|
295
287
|
studentViewPage.steps.submitResponse();
|
@@ -298,23 +290,6 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
|
|
298
290
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotExists();
|
299
291
|
};
|
300
292
|
});
|
301
|
-
|
302
|
-
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', () => {
|
303
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Parrot': 0, 'Whale': 1 });
|
304
|
-
if (view === 'Grading view') {
|
305
|
-
studentViewPage.steps.submitResponse();
|
306
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
307
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
308
|
-
gradingViewPage.steps.verifyGradingViewScore('', 20);
|
309
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsNotExist();
|
310
|
-
dragAndDropIntoCategoriesPage.steps.verifyAnswerStatusBannerNotExist();
|
311
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotExist();
|
312
|
-
};
|
313
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
314
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
315
|
-
dragAndDropIntoCategoriesPage.steps.checkManuallyScoredScoringLabel();
|
316
|
-
};
|
317
|
-
});
|
318
293
|
});
|
319
294
|
});
|
320
295
|
|
@@ -480,12 +455,10 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
|
|
480
455
|
case 'Question preview':
|
481
456
|
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
482
457
|
cy.barsPreLoaderWait();
|
458
|
+
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle']);
|
459
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1 });
|
483
460
|
dragAndDropIntoCategoriesPage.steps.expandScoringTypeDropdown();
|
484
461
|
dragAndDropIntoCategoriesPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
485
|
-
dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(7);
|
486
|
-
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle', 'Parrot', 'Whale', 'Platypus', 'Ostrich', 'Flying squirrel', 'Peacock', 'Kite']);
|
487
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1, 'Parrot': 2, 'Platypus': 3, 'Ostrich': 4, 'Whale': 5, 'Flying squirrel': 6, 'Peacock': 7, 'Kite': 8 });
|
488
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
489
462
|
break;
|
490
463
|
case 'Grading view':
|
491
464
|
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
@@ -511,97 +484,15 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
|
|
511
484
|
});
|
512
485
|
};
|
513
486
|
|
514
|
-
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', () => {
|
515
|
-
if (view === 'Grading view') {
|
516
|
-
studentViewPage.steps.submitResponse();
|
517
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
518
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
519
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
520
|
-
};
|
521
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
522
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
523
|
-
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
524
|
-
dragAndDropIntoCategoriesPage.steps.checkNonScoredScoringLabel();
|
525
|
-
dragAndDropIntoCategoriesPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
526
|
-
};
|
527
|
-
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.correctAnswersLabel(), 'Correct answers');
|
528
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsNotExist();
|
529
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle'], ['Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], ['Flying squirrel'], ['Peacock'], ['Kite']], ['1', '2', '3', '4', '5', '6', '7', '8', '9']);
|
530
|
-
});
|
531
|
-
|
532
487
|
it('When the user attempts the question incorrectly for a non scored Question, then the incorrect Answer label and correct answer section should not be displayed', () => {
|
533
488
|
if (view === 'Grading view') {
|
534
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat':
|
489
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0, 'Eagle': 7 });
|
535
490
|
studentViewPage.steps.submitResponse();
|
536
491
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
537
492
|
studentViewPage.steps.clickOnGoToGradingViewButton();
|
538
493
|
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
539
|
-
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(0);
|
540
|
-
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(1);
|
541
|
-
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(2);
|
542
|
-
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(3);
|
543
|
-
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(4);
|
544
|
-
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(5);
|
545
|
-
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(6);
|
546
|
-
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(7);
|
547
|
-
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(8);
|
548
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle'], ['Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], ['Flying squirrel'], ['Peacock'], ['Kite']], ['1', '2', '3', '4', '5', '6', '7', '8', '9']);
|
549
494
|
};
|
550
495
|
});
|
551
|
-
|
552
|
-
it('hen 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 beside the correct answer responses, incorrect icon should be displayed beside incorrect answer responses, a status message with text "Your answer is incorrect" and correct answer section with all correct answers should be displayed', () => {
|
553
|
-
if (view === 'Grading view') {
|
554
|
-
studentViewPage.steps.clearResponses();
|
555
|
-
};
|
556
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0, 'Eagle': 1, 'Parrot': 2, 'Platypus': 4 });
|
557
|
-
if (view === 'Grading view') {
|
558
|
-
studentViewPage.steps.submitResponse();
|
559
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
560
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
561
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
562
|
-
};
|
563
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
564
|
-
dragAndDropIntoCategoriesPage.steps.checkNonScoredScoringLabel();
|
565
|
-
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
566
|
-
};
|
567
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(0);
|
568
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
|
569
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
|
570
|
-
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(3);
|
571
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
572
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle'], ['Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], ['Flying squirrel'], ['Peacock'], ['Kite']], ['1', '2', '3', '4', '5', '6', '7', '8', '9']);
|
573
|
-
});
|
574
|
-
|
575
|
-
it('When the 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 responses, a status message with text "Your answer is correct" should be displayed and correct answer section should not be displayed', () => {
|
576
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
577
|
-
dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
|
578
|
-
};
|
579
|
-
if (view === 'Grading view') {
|
580
|
-
studentViewPage.steps.clearResponses();
|
581
|
-
};
|
582
|
-
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0, 'Eagle': 1, 'Parrot': 2, 'Platypus': 3, 'Ostrich': 4, 'Whale': 5, 'Flying squirrel': 6, 'Peacock': 7, 'Kite': 8 });
|
583
|
-
if (view === 'Grading view') {
|
584
|
-
studentViewPage.steps.submitResponse();
|
585
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
586
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
587
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
588
|
-
};
|
589
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
590
|
-
dragAndDropIntoCategoriesPage.steps.checkNonScoredScoringLabel();
|
591
|
-
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
592
|
-
};
|
593
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(0);
|
594
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
|
595
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
|
596
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(3);
|
597
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(4);
|
598
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(5);
|
599
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(6);
|
600
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(7);
|
601
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(8);
|
602
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
603
|
-
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotExists();
|
604
|
-
});
|
605
496
|
});
|
606
497
|
|
607
498
|
})
|
@@ -213,216 +213,6 @@ describe('Create item page - Matching: All or nothing ', () => {
|
|
213
213
|
});
|
214
214
|
});
|
215
215
|
|
216
|
-
views.forEach((view) => {
|
217
|
-
describe(`${view}: Matching drag and drop - Manually scored`, { tags: 'smoke' }, () => {
|
218
|
-
abortEarlySetup();
|
219
|
-
before(() => {
|
220
|
-
switch (view) {
|
221
|
-
case 'Question preview':
|
222
|
-
matchingPage.steps.navigateToCreateQuestion('matching');
|
223
|
-
cy.barsPreLoaderWait();
|
224
|
-
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answers.');
|
225
|
-
matchingPage.steps.expandScoringTypeDropdown();
|
226
|
-
matchingPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
227
|
-
matchingPage.steps.allotPoints(20);
|
228
|
-
matchingPage.steps.addMultipleOptionFields(2);
|
229
|
-
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
230
|
-
matchingPage.steps.enterTextInOptionInputField(optionsArray);
|
231
|
-
matchingPage.steps.switchToPreviewTab();
|
232
|
-
break;
|
233
|
-
case 'Item preview':
|
234
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
235
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
236
|
-
break;
|
237
|
-
case 'Grading view':
|
238
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
239
|
-
break;
|
240
|
-
};
|
241
|
-
});
|
242
|
-
|
243
|
-
beforeEach(() => {
|
244
|
-
switch (view) {
|
245
|
-
case 'Question preview':
|
246
|
-
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
247
|
-
matchingPage.steps.resetQuestionPreview();
|
248
|
-
break;
|
249
|
-
case 'Item preview':
|
250
|
-
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
251
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
252
|
-
break;
|
253
|
-
case 'Grading view':
|
254
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
255
|
-
break;
|
256
|
-
}
|
257
|
-
});
|
258
|
-
|
259
|
-
if (view === 'Question preview') {
|
260
|
-
after(() => {
|
261
|
-
matchingPage.steps.clickOnSaveQuestionButton();
|
262
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
263
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
264
|
-
});
|
265
|
-
};
|
266
|
-
|
267
|
-
it('Question instructions should be visible', () => {
|
268
|
-
matchingPage.steps.verifyQuestionInstructionsTextPreviewTab('Fill the categories with the right answers.');
|
269
|
-
matchingPage.steps.verifyVisibityOfQuestionInstructionsText();
|
270
|
-
});
|
271
|
-
|
272
|
-
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', () => {
|
273
|
-
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Eagle', dropzoneIndex: 1 }, { optionText: 'Fish', dropzoneIndex: 2 }]);
|
274
|
-
if (view === 'Grading view') {
|
275
|
-
studentViewPage.steps.submitResponse();
|
276
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
277
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
278
|
-
gradingViewPage.steps.verifyGradingViewScore('', 20);
|
279
|
-
matchingPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
280
|
-
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
281
|
-
matchingPage.steps.verifyAnswerStatusBannerNotExist();
|
282
|
-
matchingPage.steps.verifyCorrectAnswerSectionNotExist();
|
283
|
-
};
|
284
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
285
|
-
matchingPage.steps.checkManuallyScoredScoringLabel();
|
286
|
-
};
|
287
|
-
});
|
288
|
-
});
|
289
|
-
})
|
290
|
-
|
291
|
-
views.forEach((view) => {
|
292
|
-
describe(`${view}: Matching drag and drop - Non scored`, { tags: 'smoke' }, () => {
|
293
|
-
abortEarlySetup();
|
294
|
-
before(() => {
|
295
|
-
switch (view) {
|
296
|
-
case 'Question preview':
|
297
|
-
matchingPage.steps.navigateToCreateQuestion('matching');
|
298
|
-
cy.barsPreLoaderWait();
|
299
|
-
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
300
|
-
matchingPage.steps.expandScoringTypeDropdown();
|
301
|
-
matchingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
302
|
-
matchingPage.steps.addMultipleOptionFields(2);
|
303
|
-
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
304
|
-
matchingPage.steps.enterTextInOptionInputField(optionsArray);
|
305
|
-
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
306
|
-
matchingPage.steps.switchToPreviewTab();
|
307
|
-
break;
|
308
|
-
case 'Item preview':
|
309
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
310
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
311
|
-
break;
|
312
|
-
case 'Grading view':
|
313
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
314
|
-
break;
|
315
|
-
};
|
316
|
-
});
|
317
|
-
|
318
|
-
beforeEach(() => {
|
319
|
-
switch (view) {
|
320
|
-
case 'Question preview':
|
321
|
-
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
322
|
-
matchingPage.steps.resetQuestionPreview();
|
323
|
-
break;
|
324
|
-
case 'Item preview':
|
325
|
-
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
326
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
327
|
-
break;
|
328
|
-
case 'Grading view':
|
329
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
330
|
-
break;
|
331
|
-
}
|
332
|
-
});
|
333
|
-
|
334
|
-
if (view === 'Question preview') {
|
335
|
-
after(() => {
|
336
|
-
matchingPage.steps.clickOnSaveQuestionButton();
|
337
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
338
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
339
|
-
});
|
340
|
-
};
|
341
|
-
|
342
|
-
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', () => {
|
343
|
-
if (view === 'Grading view') {
|
344
|
-
studentViewPage.steps.submitResponse();
|
345
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
346
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
347
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
348
|
-
};
|
349
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
350
|
-
matchingPage.steps.checkNonScoredScoringLabel();
|
351
|
-
matchingPage.steps.switchToGradingView();
|
352
|
-
matchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
353
|
-
};
|
354
|
-
matchingPage.steps.verifyDropzoneNumeration();
|
355
|
-
matchingPage.steps.verifyCorrectIncorrectIconsNotExist();
|
356
|
-
matchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
357
|
-
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
358
|
-
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
359
|
-
});
|
360
|
-
|
361
|
-
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', () => {
|
362
|
-
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Eagle', dropzoneIndex: 1 }, { optionText: 'Fish', dropzoneIndex: 2 }]);
|
363
|
-
if (view === 'Grading view') {
|
364
|
-
studentViewPage.steps.submitResponse();
|
365
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
366
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
367
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
368
|
-
};
|
369
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
370
|
-
matchingPage.steps.checkNonScoredScoringLabel();
|
371
|
-
matchingPage.steps.switchToGradingView();
|
372
|
-
};
|
373
|
-
matchingPage.steps.verifyIncorrectOptionIcon(0);
|
374
|
-
matchingPage.steps.verifyIncorrectOptionIcon(1);
|
375
|
-
matchingPage.steps.verifyIncorrectOptionIcon(2);
|
376
|
-
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
377
|
-
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
378
|
-
});
|
379
|
-
|
380
|
-
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', () => {
|
381
|
-
if (view === 'Grading view') {
|
382
|
-
studentViewPage.steps.clearResponses();
|
383
|
-
};
|
384
|
-
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
385
|
-
if (view === 'Grading view') {
|
386
|
-
studentViewPage.steps.submitResponse();
|
387
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
388
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
389
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
390
|
-
};
|
391
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
392
|
-
matchingPage.steps.checkNonScoredScoringLabel();
|
393
|
-
matchingPage.steps.switchToGradingView();
|
394
|
-
};
|
395
|
-
matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(0);
|
396
|
-
matchingPage.steps.verifyCorrectOptionIcon(1);
|
397
|
-
matchingPage.steps.verifyCorrectOptionIcon(2);
|
398
|
-
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
399
|
-
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
400
|
-
});
|
401
|
-
|
402
|
-
it('When the 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 responses, a status message with text "Your answer is correct" should be displayed and correct answer section should not be displayed', () => {
|
403
|
-
if (view === 'Grading view') {
|
404
|
-
studentViewPage.steps.clearResponses();
|
405
|
-
};
|
406
|
-
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
407
|
-
if (view === 'Grading view') {
|
408
|
-
studentViewPage.steps.submitResponse();
|
409
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
410
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
411
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
412
|
-
};
|
413
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
414
|
-
matchingPage.steps.checkNonScoredScoringLabel();
|
415
|
-
matchingPage.steps.switchToGradingView();
|
416
|
-
};
|
417
|
-
matchingPage.steps.verifyCorrectOptionIcon(0);
|
418
|
-
matchingPage.steps.verifyCorrectOptionIcon(1);
|
419
|
-
matchingPage.steps.verifyCorrectOptionIcon(2);
|
420
|
-
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
421
|
-
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
422
|
-
});
|
423
|
-
});
|
424
|
-
});
|
425
|
-
|
426
216
|
if (!grepTags || !grepTags.includes('smoke')) {
|
427
217
|
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
428
218
|
abortEarlySetup();
|
@@ -207,214 +207,6 @@ describe('Create item page - Matching: All or nothing ', () => {
|
|
207
207
|
});
|
208
208
|
});
|
209
209
|
|
210
|
-
views.forEach((view) => {
|
211
|
-
describe(`${view}: Matching dropdown - Manually scored`, { tags: 'smoke' }, () => {
|
212
|
-
abortEarlySetup();
|
213
|
-
before(() => {
|
214
|
-
switch (view) {
|
215
|
-
case 'Question preview':
|
216
|
-
matchingPage.steps.navigateToCreateQuestion('matching');
|
217
|
-
cy.barsPreLoaderWait();
|
218
|
-
matchingPage.steps.selectOptionLayoutToggleButton('Dropdown menu');
|
219
|
-
matchingPage.steps.addTextInQuestionInstructionsInputField('Match the following using dropdowns.');
|
220
|
-
matchingPage.steps.expandScoringTypeDropdown();
|
221
|
-
matchingPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
222
|
-
matchingPage.steps.allotPoints(20);
|
223
|
-
matchingPage.steps.addMultipleOptionFields(2);
|
224
|
-
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
225
|
-
matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
|
226
|
-
matchingPage.steps.switchToPreviewTab();
|
227
|
-
break;
|
228
|
-
case 'Item preview':
|
229
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
230
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
231
|
-
break;
|
232
|
-
case 'Grading view':
|
233
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
234
|
-
break;
|
235
|
-
};
|
236
|
-
});
|
237
|
-
|
238
|
-
beforeEach(() => {
|
239
|
-
switch (view) {
|
240
|
-
case 'Question preview':
|
241
|
-
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
242
|
-
matchingPage.steps.resetQuestionPreview();
|
243
|
-
break;
|
244
|
-
case 'Item preview':
|
245
|
-
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
246
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
247
|
-
break;
|
248
|
-
case 'Grading view':
|
249
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
250
|
-
break;
|
251
|
-
}
|
252
|
-
});
|
253
|
-
|
254
|
-
if (view === 'Question preview') {
|
255
|
-
after(() => {
|
256
|
-
matchingPage.steps.clickOnSaveQuestionButton();
|
257
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
258
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
259
|
-
});
|
260
|
-
};
|
261
|
-
|
262
|
-
it('Question instructions should be visible', () => {
|
263
|
-
matchingPage.steps.verifyQuestionInstructionsTextPreviewTab('Match the following using dropdowns.');
|
264
|
-
matchingPage.steps.verifyVisibityOfQuestionInstructionsText();
|
265
|
-
});
|
266
|
-
|
267
|
-
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', () => {
|
268
|
-
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[0] }, { dropdownIndex: 1, dropdownOption: optionsArray[1] }]);
|
269
|
-
if (view === 'Grading view') {
|
270
|
-
studentViewPage.steps.submitResponse();
|
271
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
272
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
273
|
-
gradingViewPage.steps.verifyGradingViewScore('', 20);
|
274
|
-
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(0);
|
275
|
-
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
276
|
-
matchingPage.steps.verifyAnswerStatusBannerNotExist();
|
277
|
-
matchingPage.steps.verifyCorrectAnswerSectionNotExist();
|
278
|
-
};
|
279
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
280
|
-
matchingPage.steps.checkManuallyScoredScoringLabel();
|
281
|
-
};
|
282
|
-
});
|
283
|
-
});
|
284
|
-
});
|
285
|
-
|
286
|
-
views.forEach((view) => {
|
287
|
-
describe(`${view}: Matching dropdown - Non scored`, { tags: 'smoke' }, () => {
|
288
|
-
abortEarlySetup();
|
289
|
-
before(() => {
|
290
|
-
switch (view) {
|
291
|
-
case 'Question preview':
|
292
|
-
matchingPage.steps.navigateToCreateQuestion('matching');
|
293
|
-
cy.barsPreLoaderWait();
|
294
|
-
matchingPage.steps.selectOptionLayoutToggleButton('Dropdown menu');
|
295
|
-
matchingPage.steps.addTextInQuestionInstructionsInputField('Match the following using dropdowns.');
|
296
|
-
matchingPage.steps.addMultipleOptionFields(2);
|
297
|
-
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
298
|
-
matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
|
299
|
-
matchingPage.steps.expandScoringTypeDropdown();
|
300
|
-
matchingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
301
|
-
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
302
|
-
matchingPage.steps.switchToPreviewTab();
|
303
|
-
break;
|
304
|
-
case 'Item preview':
|
305
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
306
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
307
|
-
break;
|
308
|
-
case 'Grading view':
|
309
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
310
|
-
break;
|
311
|
-
};
|
312
|
-
});
|
313
|
-
|
314
|
-
beforeEach(() => {
|
315
|
-
switch (view) {
|
316
|
-
case 'Question preview':
|
317
|
-
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
318
|
-
matchingPage.steps.resetQuestionPreview();
|
319
|
-
break;
|
320
|
-
case 'Item preview':
|
321
|
-
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
322
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
323
|
-
break;
|
324
|
-
case 'Grading view':
|
325
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
326
|
-
break;
|
327
|
-
}
|
328
|
-
});
|
329
|
-
|
330
|
-
if (view === 'Question preview') {
|
331
|
-
after(() => {
|
332
|
-
matchingPage.steps.clickOnSaveQuestionButton();
|
333
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
334
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
335
|
-
});
|
336
|
-
};
|
337
|
-
|
338
|
-
it('When the user selects "Grading" view without attempting the question, dropdown numeration 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 respective option numeration', () => {
|
339
|
-
if (view === 'Grading view') {
|
340
|
-
studentViewPage.steps.submitResponse();
|
341
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
342
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
343
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
344
|
-
};
|
345
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
346
|
-
matchingPage.steps.checkNonScoredScoringLabel();
|
347
|
-
matchingPage.steps.switchToGradingView();
|
348
|
-
matchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
349
|
-
};
|
350
|
-
matchingPage.steps.verifyDropdownNumeration(0);
|
351
|
-
matchingPage.steps.verifyDropdownNumeration(1);
|
352
|
-
matchingPage.steps.verifyDropdownNumeration(2);
|
353
|
-
matchingPage.steps.verifyCorrectIncorrectIconsNotExist();
|
354
|
-
matchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
355
|
-
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
356
|
-
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
357
|
-
});
|
358
|
-
|
359
|
-
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to "Grading" view, incorrect icons should be displayed besides all incorrect responses, a status message with text "Your answer is incorrect" and correct answer section with all correct answers along with numeration should be displayed', () => {
|
360
|
-
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[0] }, { dropdownIndex: 1, dropdownOption: optionsArray[1] }, { dropdownIndex: 2, dropdownOption: optionsArray[2] }]);
|
361
|
-
if (view === 'Grading view') {
|
362
|
-
studentViewPage.steps.submitResponse();
|
363
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
364
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
365
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
366
|
-
};
|
367
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
368
|
-
matchingPage.steps.checkNonScoredScoringLabel();
|
369
|
-
matchingPage.steps.switchToGradingView();
|
370
|
-
};
|
371
|
-
matchingPage.steps.verifyIncorrectOptionIconDropdown(0);
|
372
|
-
matchingPage.steps.verifyIncorrectOptionIconDropdown(1);
|
373
|
-
matchingPage.steps.verifyIncorrectOptionIconDropdown(2);
|
374
|
-
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
375
|
-
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
376
|
-
});
|
377
|
-
|
378
|
-
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 beside the correct answer responses, incorrect icon should be displayed beside incorrect answer responses, a status message with text "Your answer is incorrect" and correct answer section with all correct answers should be displayed', () => {
|
379
|
-
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[3] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
380
|
-
if (view === 'Grading view') {
|
381
|
-
studentViewPage.steps.submitResponse();
|
382
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
383
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
384
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
385
|
-
};
|
386
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
387
|
-
matchingPage.steps.checkNonScoredScoringLabel();
|
388
|
-
matchingPage.steps.switchToGradingView();
|
389
|
-
};
|
390
|
-
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
391
|
-
matchingPage.steps.verifyIncorrectOptionIconDropdown(1);
|
392
|
-
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
393
|
-
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
394
|
-
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
395
|
-
});
|
396
|
-
|
397
|
-
it('When the 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 responses, a status message with text "Your answer is correct" should be displayed and correct answer section should not be displayed', () => {
|
398
|
-
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
399
|
-
if (view === 'Grading view') {
|
400
|
-
studentViewPage.steps.submitResponse();
|
401
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
402
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
403
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
404
|
-
};
|
405
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
406
|
-
matchingPage.steps.checkNonScoredScoringLabel();
|
407
|
-
matchingPage.steps.switchToGradingView();
|
408
|
-
};
|
409
|
-
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
410
|
-
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
411
|
-
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
412
|
-
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
413
|
-
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
414
|
-
});
|
415
|
-
});
|
416
|
-
});
|
417
|
-
|
418
210
|
if (!grepTags || !grepTags.includes('smoke')) {
|
419
211
|
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
420
212
|
abortEarlySetup();
|
@@ -375,7 +375,8 @@ describe('Create Item page - Multiple selection: All or nothing ', () => {
|
|
375
375
|
multipleSelectionPage.steps.verifyCorrectAnswerSectionExist();
|
376
376
|
});
|
377
377
|
|
378
|
-
|
378
|
+
//Failing due to https://weldnorthed.atlassian.net/browse/IEI-6004
|
379
|
+
it.skip('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 with numeration should be displayed', () => {
|
379
380
|
if (view === 'Grading view') {
|
380
381
|
studentViewPage.steps.clearResponses();
|
381
382
|
};
|
package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js
CHANGED
@@ -65,6 +65,7 @@ describe('Create Item page - Multiple selection grid', () => {
|
|
65
65
|
before(() => {
|
66
66
|
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
67
67
|
cy.barsPreLoaderWait();
|
68
|
+
multipleSelectionGridPage.steps.addQuestionInstructions('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
68
69
|
});
|
69
70
|
|
70
71
|
it('When the user selects \'Grading\' view without setting the answer, correct answers section and answer status banner should not be displayed', () => {
|
package/cypress/e2e/ILC/MultipleSelectionGridNew/styleAndLayoutCustomizationLayoutProperties.js
CHANGED
@@ -38,6 +38,7 @@ describe('Multiple selection grid - Additional settings', () => {
|
|
38
38
|
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
39
39
|
cy.barsPreLoaderWait();
|
40
40
|
multipleSelectionGridPage.steps.expandStyleAndLayoutCustomizationAccordion();
|
41
|
+
multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
41
42
|
});
|
42
43
|
|
43
44
|
multipleSelectionGridPage.tests.verifyRowAndColumnSpacingFunctionalityPreviewTab();
|
@@ -209,8 +209,8 @@ describe('Create item page - Text entry math: Question instructions, Add structu
|
|
209
209
|
});
|
210
210
|
|
211
211
|
it('Warning icons should be displayed on the required input fields', () => {
|
212
|
-
utilities.verifyElementVisibilityState(
|
213
|
-
utilities.verifyElementVisibilityState(
|
212
|
+
utilities.verifyElementVisibilityState(textEntryMathPage.questionWarningIcon(), 'exist');
|
213
|
+
utilities.verifyElementVisibilityState(textEntryMathPage.warningIcon(), 'exist');
|
214
214
|
});
|
215
215
|
|
216
216
|
it('When required input fields are filled then warning icons should disappear', () => {
|
@@ -1,12 +1,9 @@
|
|
1
|
-
import { audioPlayerPage, dialogBoxBase, selectQuestionResourceToolPage
|
2
|
-
import { browseItemsPage } from "../../../pages/components";
|
1
|
+
import { audioPlayerPage, dialogBoxBase, selectQuestionResourceToolPage } from "../../../pages";
|
3
2
|
import utilities from "../../../support/helpers/utilities";
|
4
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
5
4
|
import constants from "../../../fixtures/constants";
|
6
5
|
const css = Cypress.env('css');
|
7
6
|
|
8
|
-
var itemReferenceID = "";
|
9
|
-
|
10
7
|
describe('Create question page - Audio player: Header section and saving resource tool', () => {
|
11
8
|
before(() => {
|
12
9
|
cy.loginAs('admin');
|
@@ -125,89 +122,4 @@ describe('Create question page - Audio player: Header section and saving resourc
|
|
125
122
|
audioPlayerPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
126
123
|
});
|
127
124
|
});
|
128
|
-
|
129
|
-
describe('Saving a question with incomplete authoring', () => {
|
130
|
-
abortEarlySetup();
|
131
|
-
before(() => {
|
132
|
-
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
133
|
-
});
|
134
|
-
|
135
|
-
it('User should be able to save the resource with incomplete authoring and display a snackbar with the text "Saved successfully!" when the Save button is clicked', () => {
|
136
|
-
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please add a source URL']);
|
137
|
-
audioPlayerPage.steps.saveAQuestionWithIncompleteAuthoring();
|
138
|
-
});
|
139
|
-
audioPlayerPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
140
|
-
});
|
141
|
-
|
142
|
-
describe('User should be able to edit incomplete authored resource', () => {
|
143
|
-
abortEarlySetup();
|
144
|
-
before(() => {
|
145
|
-
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
146
|
-
audioPlayerPage.steps.saveAQuestionWithIncompleteAuthoring();
|
147
|
-
audioPlayerPage.steps.editItem();
|
148
|
-
});
|
149
|
-
|
150
|
-
it('Warning icons should be displayed on the required input fields', () => {
|
151
|
-
audioPlayerPage.steps.verifyWarningIconOnRequiredFields([
|
152
|
-
'Please add a source URL',
|
153
|
-
]);
|
154
|
-
});
|
155
|
-
|
156
|
-
it('When required input fields are filled then warning icons should disappear', () => {
|
157
|
-
audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
|
158
|
-
audioPlayerPage.steps.verifyErrorMessageIsNotDisplayed();
|
159
|
-
});
|
160
|
-
|
161
|
-
it('Clicking on Save button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
162
|
-
audioPlayerPage.steps.saveAQuestionAndVerifySnackbar();
|
163
|
-
});
|
164
|
-
|
165
|
-
it('Warning icon should not be visible', () => {
|
166
|
-
audioPlayerPage.steps.verifyWarningIconNotExist();
|
167
|
-
});
|
168
|
-
});
|
169
|
-
|
170
|
-
describe('User should be able to edit incomplete authored resource when add audio URL is selected', () => {
|
171
|
-
abortEarlySetup();
|
172
|
-
before(() => {
|
173
|
-
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
174
|
-
audioPlayerPage.steps.saveAQuestionWithIncompleteAuthoring();
|
175
|
-
audioPlayerPage.steps.editItem();
|
176
|
-
});
|
177
|
-
|
178
|
-
it('Warning icons should be displayed on the required input fields', () => {
|
179
|
-
audioPlayerPage.steps.selectAddAudioURLRadioButton();
|
180
|
-
audioPlayerPage.steps.verifyWarningIconOnRequiredFields([
|
181
|
-
'Please add a source URL',
|
182
|
-
]);
|
183
|
-
});
|
184
|
-
|
185
|
-
it('When required input fields are filled then warning icons should disappear', () => {
|
186
|
-
audioPlayerPage.steps.enterTextInSourceURLInputField(constants.sampleMp3Link);
|
187
|
-
audioPlayerPage.steps.verifyErrorMessageIsNotDisplayed();
|
188
|
-
});
|
189
|
-
|
190
|
-
it('Clicking on Save button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
191
|
-
audioPlayerPage.steps.saveAQuestionAndVerifySnackbar();
|
192
|
-
});
|
193
|
-
|
194
|
-
it('Warning icon should not be visible', () => {
|
195
|
-
audioPlayerPage.steps.verifyWarningIconNotExist();
|
196
|
-
});
|
197
|
-
});
|
198
|
-
|
199
|
-
describe('Save as you go - Browse item page contents', () => {
|
200
|
-
abortEarlySetup();
|
201
|
-
before(() => {
|
202
|
-
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
203
|
-
audioPlayerPage.steps.saveAQuestionWithIncompleteAuthoring();
|
204
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
205
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
206
|
-
browseItemsPage.steps.navigateToBrowseItemsPage();
|
207
|
-
});
|
208
|
-
|
209
|
-
it('When user saves an incompletely authored resource then a warning icon should be visible in browse items page', () => {
|
210
|
-
browseItemsPage.steps.verifyWarningIconInBrowseItemPage(`${itemReferenceID}`);
|
211
|
-
});
|
212
|
-
});
|
213
125
|
});
|
@@ -2,7 +2,6 @@ import constants from "../fixtures/constants";
|
|
2
2
|
import utilities from "../support/helpers/utilities";
|
3
3
|
import { ckEditorToolbar, commonComponents, createQuestionBasePage, equationEditorFlyout, playbackControlsBaseComponent } from "./components";
|
4
4
|
import { dialogBoxBase } from "./dialogBoxBase";
|
5
|
-
import { createItemPage } from "./createItemPage";
|
6
5
|
|
7
6
|
const selectors = {
|
8
7
|
...playbackControlsBaseComponent,
|
@@ -128,7 +127,6 @@ const steps = {
|
|
128
127
|
...ckEditorToolbar.steps,
|
129
128
|
...equationEditorFlyout.steps,
|
130
129
|
...commonComponents.steps,
|
131
|
-
...createItemPage.steps,
|
132
130
|
/**
|
133
131
|
* Uploads a file to the audio player by attaching the file located at the specified filePath.
|
134
132
|
* @param {string} filePath - The file path to the file to be uploaded.
|
@@ -146,23 +146,17 @@ const steps = {
|
|
146
146
|
.within(() => {
|
147
147
|
utilities.verifyElementVisibilityState(commonComponents.warningIcon(), 'exist');
|
148
148
|
});
|
149
|
-
}
|
149
|
+
}
|
150
150
|
else if (field === 'Please select a file type') {
|
151
151
|
// Upload Response Select File Type Accordion
|
152
152
|
cy.get('.edit-question-edit-tab-wrapper .ngie-accordion-summary')
|
153
153
|
.within(() => {
|
154
154
|
utilities.verifyElementVisibilityState(commonComponents.warningIcon(), 'exist');
|
155
155
|
});
|
156
|
-
} else if (field === 'Please enter text block') {
|
157
|
-
// Content Block Body Label
|
158
|
-
cy.get('.options-label')
|
159
|
-
.within(() => {
|
160
|
-
utilities.verifyElementVisibilityState(commonComponents.warningIcon(), 'exist');
|
161
|
-
});
|
162
156
|
}
|
163
157
|
})
|
164
158
|
},
|
165
|
-
|
159
|
+
|
166
160
|
|
167
161
|
clickOnEditQuestionButton: () => {
|
168
162
|
createQuestionBasePage.editButton()
|
@@ -25,6 +25,7 @@ const selectors = {
|
|
25
25
|
...equationEditorSectionCommonComponent,
|
26
26
|
...styleAndLayoutCustomizationAccordionComponent,
|
27
27
|
...imageCanvasComponent,
|
28
|
+
...scoringSectionBaseEditTab,
|
28
29
|
addStructureTab: () => cy.get('[data-ngie-testid="add-structure-tab"]'),
|
29
30
|
responseToken: () => cy.get('.cke_button__addresponse'),
|
30
31
|
penaltyPointsForEachIncorrectOptionInputField: () => cy.get('input[aria-label="Penalty points for each incorrect text container"]'),
|
@@ -939,7 +940,8 @@ const steps = {
|
|
939
940
|
|
940
941
|
switchToGradingView: () => {
|
941
942
|
autoScoredScoringPreviewTab.gradingViewRadioButton()
|
942
|
-
.click()
|
943
|
+
.click({ force: true });
|
944
|
+
autoScoredScoringPreviewTab.gradingViewRadioButton()
|
943
945
|
.should('be.checked');
|
944
946
|
cy.wait(1500);
|
945
947
|
},
|
package/package.json
CHANGED