itemengine-cypress-automation 1.0.201-28thMayRepoUpdate-e720349.0 → 1.0.201
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/headerSection.js +1 -1
- package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +4 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionMinimumAndPenaltyScoring.js +18 -18
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +1 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +5 -7
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +5 -5
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsForDropdowns.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/conditionalCheckboxScoring.js +28 -28
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +4 -3
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsScoring.js +2 -2
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeigtsCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/ImageHighlight/additionalSettings.js +3 -3
- package/cypress/e2e/ILC/ImageHighlight/editTabScoring.js +1 -1
- package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/partialDifferentWeightsBasic.js +6 -6
- package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +18 -18
- package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/partialEqualWeightsBasic.js +6 -6
- package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +2 -1
- package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +0 -14
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +12 -12
- package/cypress/e2e/ILC/NumberLineLabel/layoutSection.js +6 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +2 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +2 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +1 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/TextSelection/additionalSettings.js +2 -2
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +1 -1
- package/cypress/e2e/ILC/TextSelection/headerSection.js +3 -2
- package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +1 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +3 -1
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +4 -4
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +1 -1
- package/cypress/e2e/ILC/VideoResponseNew/customizePlaybackControlsStandardRecorderStyle.js +1 -1
- package/cypress/e2e/ILC/VideoResponseNew/editTabBasicSection.js +3 -2
- package/cypress/e2e/ILC/chartsDotsPlot/headerSection.js +1 -1
- package/cypress/pages/audioPlayerPage.js +2 -0
- package/cypress/pages/chartsLinePage.js +2 -2
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -1
- package/cypress/pages/components/commonComponents.js +1 -0
- package/cypress/pages/components/createQuestionBasePage.js +1 -1
- package/cypress/pages/components/draggableOptionContainer.js +2 -2
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +2 -2
- package/cypress/pages/components/imageCanvasComponent.js +10 -0
- package/cypress/pages/dialogBoxBase.js +3 -2
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +2 -23
- package/cypress/pages/drawingResponsePage.js +1 -1
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +2 -1
- package/cypress/pages/listOrderingPage.js +9 -6
- package/cypress/pages/numberLineLabelPage.js +2 -0
- package/cypress/pages/numberLinePage.js +55 -54
- package/cypress/pages/textSelectionPage.js +0 -3
- package/cypress/pages/videoResponsePage.js +5 -1
- package/package.json +2 -2
@@ -47,7 +47,7 @@ describe('Create Item page - Video response: Customize playback controls', () =>
|
|
47
47
|
utilities.verifyElementVisibilityState(videoResponsePage.fullScreenButtonControlsForPlayback(), 'visible');
|
48
48
|
utilities.verifyInnerText(utilities.getNthElement(videoResponsePage.controlsForPlaybackButtonLabel(), 6), 'Fullscreen');
|
49
49
|
utilities.verifyElementVisibilityState(videoResponsePage.forwardBackwardButtonControlsForPlayback(), 'visible');
|
50
|
-
utilities.verifyInnerText(utilities.getNthElement(videoResponsePage.controlsForPlaybackButtonLabel(), 7), 'Forward/backward');
|
50
|
+
utilities.verifyInnerText(utilities.getNthElement(videoResponsePage.controlsForPlaybackButtonLabel(), 7), 'Forward/ backward');
|
51
51
|
videoResponsePage.steps.verifyControlsForPlaybackToggleButtonSelectedState('Play');
|
52
52
|
videoResponsePage.steps.verifyControlsForPlaybackToggleButtonSelectedState('Pause');
|
53
53
|
videoResponsePage.steps.verifyControlsForPlaybackToggleButtonSelectedState('Seek');
|
@@ -117,7 +117,7 @@ describe('Create item page - Video response: Question instructions, Maximum reco
|
|
117
117
|
});
|
118
118
|
});
|
119
119
|
|
120
|
-
//Failing due to https://redmine.zeuslearning.com/issues/
|
120
|
+
//Failing due to https://redmine.zeuslearning.com/issues/573549
|
121
121
|
describe('Maximum recording duration: Edit tab', () => {
|
122
122
|
abortEarlySetup();
|
123
123
|
before(() => {
|
@@ -200,6 +200,7 @@ describe('Create item page - Video response: Question instructions, Maximum reco
|
|
200
200
|
});
|
201
201
|
|
202
202
|
it('When the user toggles to "Mins", "5" should be displayed in \'Maximum recording duration\' field', () => {
|
203
|
+
videoResponsePage.steps.setMaximumRecordingDuration(300);
|
203
204
|
videoResponsePage.steps.toggleMaximumRecordingDurationInputField('Mins');
|
204
205
|
videoResponsePage.steps.verifyMaximumRecordingDuration(5);
|
205
206
|
});
|
@@ -246,7 +247,7 @@ describe('Create item page - Video response: Question instructions, Maximum reco
|
|
246
247
|
});
|
247
248
|
|
248
249
|
it('By default, maximum recording duration (5 minutes) should be displayed in minutes(mm:ss) format', () => {
|
249
|
-
utilities.verifyInnerText(videoResponsePage.recordingTimer(), '
|
250
|
+
utilities.verifyInnerText(videoResponsePage.recordingTimer(), '5:00');
|
250
251
|
utilities.verifyElementVisibilityState(videoResponsePage.recordingTimer(), 'visible');
|
251
252
|
});
|
252
253
|
|
@@ -43,7 +43,7 @@ describe('Create item page - Charts - Dot plot: Header section and saving questi
|
|
43
43
|
chartsDotPlotPage.steps.allotPoints(20);
|
44
44
|
chartsDotPlotPage.steps.clickOnCancelButton();
|
45
45
|
utilities.verifyElementVisibilityState(chartsDotPlotPage.dialogBox(), 'visible');
|
46
|
-
utilities.verifyInnerText(chartsDotPlotPage.
|
46
|
+
utilities.verifyInnerText(chartsDotPlotPage.dialogBoxContentText(), 'Are you sure you want to leave this page? Your changes have not been saved.');
|
47
47
|
utilities.verifyInnerText(chartsDotPlotPage.buttonAccept(), 'Yes, I want to leave this page');
|
48
48
|
utilities.verifyInnerText(chartsDotPlotPage.buttonReject(), 'No, I\'d like to go back');
|
49
49
|
});
|
@@ -1,10 +1,12 @@
|
|
1
1
|
import constants from "../fixtures/constants";
|
2
2
|
import utilities from "../support/helpers/utilities";
|
3
3
|
import { ckEditorToolbar, commonComponents, createQuestionBasePage, equationEditorFlyout, playbackControlsBaseComponent } from "./components";
|
4
|
+
import { dialogBoxBase } from "./dialogBoxBase";
|
4
5
|
|
5
6
|
const selectors = {
|
6
7
|
...playbackControlsBaseComponent,
|
7
8
|
...commonComponents,
|
9
|
+
...dialogBoxBase,
|
8
10
|
uploadAudioFileLabel: () => cy.get('[class*="RadioGroupMUI5styles__RadioOptionContainer"] .ngie-radio-label').eq(0),
|
9
11
|
uploadAudioFileRadioButton: () => cy.get('.ngie-radio-btn input').eq(0),
|
10
12
|
addAudioURLLabel: () => cy.get('[class*="RadioGroupMUI5styles__RadioOptionContainer"] .ngie-radio-label').eq(1),
|
@@ -357,7 +357,7 @@ const tests = {
|
|
357
357
|
it('When user hovers over the point, then point tooltip should be displayed', () => {
|
358
358
|
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
359
359
|
.realHover({ position: 'left' });
|
360
|
-
utilities.verifyElementVisibilityState(chartsLinePage.
|
360
|
+
utilities.verifyElementVisibilityState(chartsLinePage.barAndPointTooltipDeleteButton(), 'visible');
|
361
361
|
});
|
362
362
|
|
363
363
|
it('The point tooltip should contain and point label button, and delete button', () => {
|
@@ -372,7 +372,7 @@ const tests = {
|
|
372
372
|
|
373
373
|
it('When user hovers away from the point, then point tooltip should be not be displayed', () => {
|
374
374
|
utilities.hoverAwayFromElement();
|
375
|
-
utilities.verifyElementVisibilityState(chartsLinePage.
|
375
|
+
utilities.verifyElementVisibilityState(chartsLinePage.barAndPointTooltipDeleteButton(), 'notExist');
|
376
376
|
});
|
377
377
|
|
378
378
|
it('CSS of point tooltip', { tags: 'css' }, () => {
|
@@ -356,11 +356,13 @@ const tests = {
|
|
356
356
|
.within(() => {
|
357
357
|
utilities.verifyElementVisibilityState(scoringSectionBaseEditTab.pleaseEnterPointsErrorMessage(), 'notExist');
|
358
358
|
});
|
359
|
-
if (questionType != 'list ordering' && questionType != 'short text response' && questionType != 'text entry math') {
|
359
|
+
if (questionType != 'list ordering' && questionType != 'short text response' && questionType != 'text entry math' && questionType != 'text selection') {
|
360
360
|
steps.verifySpecifyCorrectAnswerErrorMessage();
|
361
361
|
}
|
362
362
|
else if (questionType === 'short text response' || questionType === 'fill in the gaps with text' || questionType === 'fill in the gaps over image text' || questionType === 'text entry math') {
|
363
363
|
utilities.verifyInnerText(utilities.getNthElement(commonComponents.errorMessage(), -1), 'Error: Answer is required.');
|
364
|
+
} else if (questionType === 'text selection') {
|
365
|
+
utilities.verifyInnerText(commonComponents.alertMessage(), 'Error: Please set a correct answer.');
|
364
366
|
}
|
365
367
|
});
|
366
368
|
},
|
@@ -16,6 +16,7 @@ const selectors = {
|
|
16
16
|
deleteButton: () => cy.get('button[aria-label*="Delete option"]'),
|
17
17
|
tickIconForOptionButtons: () => cy.get('.ngie-toggle-button-tick-icon'),
|
18
18
|
errorIcon: () => cy.get('[id="Icon_material-error"]'),
|
19
|
+
alertMessage: () => cy.get('[role="alert"]:visible')
|
19
20
|
}
|
20
21
|
|
21
22
|
const steps = {
|
@@ -162,7 +162,7 @@ const tests = {
|
|
162
162
|
createQuestionBasePage.cancelButton()
|
163
163
|
.click();
|
164
164
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
165
|
-
utilities.verifyInnerText(dialogBoxBase.
|
165
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxContentText(), 'Are you sure you want to leave this page? Your changes have not been saved.');
|
166
166
|
utilities.verifyInnerText(dialogBoxBase.buttonAccept(), 'Yes, I want to leave this page');
|
167
167
|
utilities.verifyInnerText(dialogBoxBase.buttonReject(), 'No, I\'d like to go back');
|
168
168
|
});
|
@@ -17,10 +17,10 @@ const selectors = {
|
|
17
17
|
groupedOptionsContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="GroupDiv"]'),
|
18
18
|
groupedOptionsTitlePreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="GroupTitleWrapper"]'),
|
19
19
|
groupedOptionsGridPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="DraggableGroupsGrid"]'),
|
20
|
-
draggableOptionText: () => cy.get('.icon-container-wrapper [class*="
|
20
|
+
draggableOptionText: () => cy.get('.icon-container-wrapper [class*="DraggableItems"][class*="__QuestionTextWrapper"]:visible'),
|
21
21
|
optionContainerItemListPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .item-list'),
|
22
22
|
optionContainerItemListSpecifyCorrectAnswerSection: () => cy.get('.item-list'),
|
23
|
-
draggableOptionDragIcon: () => cy.get('.drag-
|
23
|
+
draggableOptionDragIcon: () => cy.get('.drag-icon-button')
|
24
24
|
}
|
25
25
|
|
26
26
|
const steps = {
|
@@ -334,6 +334,7 @@ const steps = {
|
|
334
334
|
expandAndCollapseDropdownInSpecifyCorrectAnswerSection: (dropdownIndex) => {
|
335
335
|
utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownSpecifyCorrectAnswerSection(), dropdownIndex)
|
336
336
|
.click();
|
337
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDropdownCommonComponent.dropdownListOptions(), 'visible');
|
337
338
|
cy.get('body')
|
338
339
|
.click({ position: 'center' });
|
339
340
|
},
|
@@ -990,8 +990,8 @@ const tests = {
|
|
990
990
|
|
991
991
|
it('When user enters zero in maximum limit input field, then error message \'Error: Maximum limit must be greater than 0.\' should be displayed', () => {
|
992
992
|
fillInTheGapsTextCommonComponent.steps.setMaximumLimit(0);
|
993
|
-
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Maximum limit must be greater than 0.');
|
994
|
-
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
|
993
|
+
utilities.verifyInnerText(commonComponents.errorMessage().eq(1), 'Error: Maximum limit must be greater than 0.');
|
994
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage().eq(1), 'visible');
|
995
995
|
});
|
996
996
|
|
997
997
|
it('When user enters limit more than zero in maximum limit input field, then error message should disappear', () => {
|
@@ -496,6 +496,16 @@ const steps = {
|
|
496
496
|
.should('have.css', 'color', color);
|
497
497
|
},
|
498
498
|
|
499
|
+
/**
|
500
|
+
* Selects the textbox inserted on the canvas
|
501
|
+
* @param {number} index index of the text box
|
502
|
+
*/
|
503
|
+
selectInsertedTextBox: (index) => {
|
504
|
+
imageCanvasComponent.textResponse()
|
505
|
+
.eq(index)
|
506
|
+
.click();
|
507
|
+
},
|
508
|
+
|
499
509
|
verifyTextColorOfTextBoxInPreviewTab: (color) => {
|
500
510
|
imageCanvasComponent.textBoxInPreviewTab()
|
501
511
|
.should('have.css', 'color', color);
|
@@ -8,7 +8,8 @@ const selectors = {
|
|
8
8
|
dialogBoxContent: () => cy.get('[class*="dialog-content"]'),
|
9
9
|
buttonReject: () => cy.get('[data-testid="reject-button"]'),
|
10
10
|
buttonAccept: () => cy.get('[data-testid="accept-button"]'),
|
11
|
-
buttonClose: () => cy.get('[aria-label="CLOSE"]')
|
11
|
+
buttonClose: () => cy.get('[aria-label="CLOSE"]'),
|
12
|
+
dialogBoxContentText: () => cy.get('[class*="dialog-content"] [class*="EditQuestionstyles__PopupContentWrapper"]')
|
12
13
|
}
|
13
14
|
|
14
15
|
const steps = {
|
@@ -52,7 +53,7 @@ const tests = {
|
|
52
53
|
|
53
54
|
verifyContentsOfLeavePagePopupWithCSSAnda11y: () => {
|
54
55
|
it('The pop up should be displayed with the message \'Are you sure you want to leave this page? Your changes have not been saved.\'', () => {
|
55
|
-
utilities.verifyInnerText(dialogBoxBase.
|
56
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxContentText(), 'Are you sure you want to leave this page? Your changes have not been saved.');
|
56
57
|
utilities.verifyInnerText(dialogBoxBase.buttonAccept(), 'Yes, I want to leave this page');
|
57
58
|
utilities.verifyInnerText(dialogBoxBase.buttonReject(), 'No, I\'d like to go back');
|
58
59
|
});
|
@@ -56,7 +56,7 @@ const selectors = {
|
|
56
56
|
rightArrowNavigationButton: () => cy.get('[class*="DragAndDropTablestyles__PaginationRightControl"]'),
|
57
57
|
|
58
58
|
//Specify correct answer matrix
|
59
|
-
tableCellContainerSpecifyCorrectAnswerSection: () => cy.get('[class*="
|
59
|
+
tableCellContainerSpecifyCorrectAnswerSection: () => cy.get('[class*="CellDropZonestyles__CellContainer"]'),
|
60
60
|
tableRowContainerSpecifyCorrectAnswerSection: () => cy.get('[class*="Matrixstyles__RowContainer"]'),
|
61
61
|
leftArrowNavigationButtonSpecifyCorrectAnswerSection: () => cy.get('.classification-set-correct-answer-wrapper [aria-label="Left Pagination Button"]'),
|
62
62
|
rightArrowNavigationButtonSpecifyCorrectAnswerSection: () => cy.get('.classification-set-correct-answer-wrapper [aria-label="Right Pagination Button"]'),
|
@@ -515,7 +515,7 @@ const steps = {
|
|
515
515
|
.within(() => {
|
516
516
|
draggableOptionContainer.draggableOption()
|
517
517
|
.contains(optionText)
|
518
|
-
.click();
|
518
|
+
.click({ force: true });
|
519
519
|
});
|
520
520
|
dragAndDropIntoCategoriesPage.dropzoneCellSpecifyCorrectAnswerSection()
|
521
521
|
.eq(dropzoneIndex)
|
@@ -1324,7 +1324,6 @@ const tests = {
|
|
1324
1324
|
});
|
1325
1325
|
} else {
|
1326
1326
|
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
|
1327
|
-
.eq(1)
|
1328
1327
|
.within(() => {
|
1329
1328
|
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
|
1330
1329
|
});
|
@@ -1339,26 +1338,6 @@ const tests = {
|
|
1339
1338
|
|
1340
1339
|
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
1341
1340
|
|
1342
|
-
it('When user clicks on right arrow navigation button, then the table should be scrolled to the right by 1 column and left arrow navigation button should be enabled', () => {
|
1343
|
-
dragAndDropIntoCategoriesPage.steps.clickOnRightArrowNavigationButtonSpecifyCorrectAnswerSection();
|
1344
|
-
dragAndDropIntoCategoriesPage.steps.verifyColumnIsVisibleInTableSpecifyCorrectAnswer(8);
|
1345
|
-
utilities.verifyElementNotDisabled(dragAndDropIntoCategoriesPage.leftArrowNavigationButtonSpecifyCorrectAnswerSection());
|
1346
|
-
});
|
1347
|
-
|
1348
|
-
it('When user has scrolled to the rightmost column using the right arrow navigation button, then the table right arrow navigation button should be enabled', () => {
|
1349
|
-
for (let index = 9; index < 15; index++) {
|
1350
|
-
dragAndDropIntoCategoriesPage.steps.clickOnRightArrowNavigationButtonSpecifyCorrectAnswerSection();
|
1351
|
-
}
|
1352
|
-
utilities.verifyElementDisabled(dragAndDropIntoCategoriesPage.rightArrowNavigationButtonSpecifyCorrectAnswerSection());
|
1353
|
-
});
|
1354
|
-
|
1355
|
-
it('When user clicks on left arrow navigation button, then the table should be scrolled to the left by 1 column and right arrow navigation button should be enabled again', () => {
|
1356
|
-
dragAndDropIntoCategoriesPage.steps.clickOnLeftArrowNavigationButtonSpecifyCorrectAnswerSection();
|
1357
|
-
dragAndDropIntoCategoriesPage.steps.verifyColumnIsVisibleInTableSpecifyCorrectAnswer(8);
|
1358
|
-
dragAndDropIntoCategoriesPage.steps.verifyColumnIsNotVisibleInSpecifyColumnsAndRowsTable(14);
|
1359
|
-
utilities.verifyElementNotDisabled(dragAndDropIntoCategoriesPage.leftArrowNavigationButtonSpecifyCorrectAnswerSection());
|
1360
|
-
});
|
1361
|
-
|
1362
1341
|
it('CSS of \'Correct\' accordion contents', { tags: 'css' }, () => {
|
1363
1342
|
//Navigation button
|
1364
1343
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.leftArrowNavigationButtonSpecifyCorrectAnswerSection().find('path'), {
|
@@ -72,7 +72,7 @@ const selectors = {
|
|
72
72
|
previewTabToolbarOptionName: () => cy.get('[class*="tool-name"]:visible'),
|
73
73
|
previewTabSecondaryOptionPopup: () => cy.get('.edit-question-preview-wrapper .drawing-tool-options__options'),
|
74
74
|
previewTabSecondaryOptionPopupTitle: () => cy.get('.edit-question-preview-wrapper .drawing-tool-options__options .drawing-tool-options__options__label'),
|
75
|
-
previewTabSecondaryOptionPopupOptions: () => cy.get('.
|
75
|
+
previewTabSecondaryOptionPopupOptions: () => cy.get('.drawing-tool-options__options .drawing-tool-options__options__options-list__button'),
|
76
76
|
previewTabColorPickerLabel: () => cy.get('.drawing-tool-color-picker__label'),
|
77
77
|
colorPalleteSelectedColorLabel: () => cy.get('.drawing-tool-color-picker__selected-color-label'),
|
78
78
|
colorPalleteSelectedColorBlock: () => cy.get('.drawing-tool-color-picker__selected-color'),
|
@@ -20,6 +20,7 @@ const selectors = {
|
|
20
20
|
...additionalSettingsAccessibilitySectionComponent,
|
21
21
|
...ariaLabelSectionComponent,
|
22
22
|
...placeholderTextSectionComponent,
|
23
|
+
...dialogBoxBase,
|
23
24
|
//TODO: Update below selectors after https://redmine.zeuslearning.com/issues/557945 is resolved
|
24
25
|
|
25
26
|
responseContainerInPreviewTab: () => cy.get('[class*="AddTextResponseOnImagestyles__DraggableInput"]'),
|
@@ -166,7 +167,7 @@ const steps = {
|
|
166
167
|
case 'top left':
|
167
168
|
return { top: '12px', left: '23px' };
|
168
169
|
case 'left':
|
169
|
-
return { top: '-
|
170
|
+
return { top: '-16px', left: '28px' };
|
170
171
|
case 'bottom left':
|
171
172
|
return { top: '-37px', left: '18px' };
|
172
173
|
}
|
@@ -17,11 +17,13 @@ const selectors = {
|
|
17
17
|
...enableOuterBorderComponent,
|
18
18
|
//Specify correct answer section
|
19
19
|
optionSpecifyCorrectAnswerSection: () => cy.get('.list-ordering-set-correct-answer [class*="AnswerWrapper"][role="button"]'),
|
20
|
+
optionTextSpecifyCorrectAnswerSection: () => cy.get('.draggable-item-wrapper[overflow] .question-text-wrapper'),
|
20
21
|
optionWrapperSpecifyCorrectAnswerSection: () => cy.get('[class*="ListOrderingResponsestyles__DroppableWrapper"]'),
|
21
22
|
partialDifferentWeightsPointsLabel: () => cy.get('.partial-points-per-response-label'),
|
22
23
|
pointsPerResponseValue: () => cy.get('.alternate-points-points-per-value-span'),
|
23
24
|
draggableOptionDragIcon: () => cy.get('.drag-indicator-icon'),
|
24
25
|
//Preview Tab
|
26
|
+
optionTextPreviewTab: () => cy.get('.draggable-item-wrapper[overflow] .question-text-wrapper'),
|
25
27
|
optionPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="AnswerWrapper"][role="button"]'),
|
26
28
|
optionWrapperPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .orderlist-option-wrapper'),
|
27
29
|
correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="__CorrectAnswerLabel"]'),
|
@@ -163,7 +165,7 @@ const steps = {
|
|
163
165
|
* @description this function verifies options text content
|
164
166
|
*/
|
165
167
|
verifyTextContentOfOptionInPreviewTab: (optionsText, index) => {
|
166
|
-
utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.
|
168
|
+
utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.optionTextPreviewTab(), index), optionsText);
|
167
169
|
},
|
168
170
|
|
169
171
|
/**
|
@@ -291,7 +293,7 @@ const steps = {
|
|
291
293
|
*/
|
292
294
|
verifyOptionsOrderInPreviewTab: (optionsTextArray) => {
|
293
295
|
optionsTextArray.forEach((option, index) => {
|
294
|
-
utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.
|
296
|
+
utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.optionTextPreviewTab(), index), option);
|
295
297
|
});
|
296
298
|
},
|
297
299
|
|
@@ -305,7 +307,7 @@ const steps = {
|
|
305
307
|
|
306
308
|
getOptionsArray: () => {
|
307
309
|
const optionsArray = []
|
308
|
-
listOrderingPage.
|
310
|
+
listOrderingPage.optionTextPreviewTab()
|
309
311
|
.each(($el) => {
|
310
312
|
cy.wrap($el)
|
311
313
|
.invoke('text')
|
@@ -322,8 +324,9 @@ const steps = {
|
|
322
324
|
*/
|
323
325
|
verifyRandomizeOptionOrder: (optionsArray) => {
|
324
326
|
let currentOptionsArray = [...optionsArray]
|
327
|
+
cy.log(currentOptionsArray)
|
325
328
|
for (let index = 0; index < currentOptionsArray.length; index++) {
|
326
|
-
listOrderingPage.
|
329
|
+
listOrderingPage.optionTextPreviewTab()
|
327
330
|
.eq(index)
|
328
331
|
.then(($element) => {
|
329
332
|
expect($element.text()).to.be.oneOf(currentOptionsArray);
|
@@ -338,7 +341,7 @@ const steps = {
|
|
338
341
|
* @description this function verifies that the order of the options is different from the previous order
|
339
342
|
*/
|
340
343
|
verifyOptionsAreReRandomized: (previousOrderOfOptionsArray) => {
|
341
|
-
listOrderingPage.
|
344
|
+
listOrderingPage.optionTextPreviewTab()
|
342
345
|
.should('not.have.text', '')
|
343
346
|
.and('not.have.text', previousOrderOfOptionsArray.join(''));
|
344
347
|
},
|
@@ -371,7 +374,7 @@ const steps = {
|
|
371
374
|
* @param {number} index - The index of the option in the Specify Correct Answer section.
|
372
375
|
*/
|
373
376
|
verifyBoldTextInSpecifyCorrectAnswerSection: (index) => {
|
374
|
-
utilities.getNthElement(listOrderingPage.
|
377
|
+
utilities.getNthElement(listOrderingPage.optionTextSpecifyCorrectAnswerSection(), index)
|
375
378
|
.find('strong')
|
376
379
|
.should('have.text', 'This is a bold option');
|
377
380
|
},
|
@@ -29,10 +29,12 @@ const selectors = {
|
|
29
29
|
//Specify correct answer section
|
30
30
|
draggableLabelsSpecifyCorrectAnswer: () => cy.get('.label-tool'),
|
31
31
|
labelContainerSpecifyCorrectAnswer: () => cy.get('.items-container'),
|
32
|
+
numberLinePointSpecifyCorrectAnswer: () => cy.get('.ngie-accordion .ngie-jxgbox svg ellipse:visible'),
|
32
33
|
|
33
34
|
//Preview tab
|
34
35
|
draggableLabelsPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .label-tool'),
|
35
36
|
labelContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .items-container'),
|
37
|
+
numberLinePointPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(0).find('svg ellipse[display="inline"]:visible'),
|
36
38
|
|
37
39
|
//Correct answer section
|
38
40
|
numberLineCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox svg').eq(2),
|