itemengine-cypress-automation 1.0.45 → 1.0.47

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.
Files changed (19) hide show
  1. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +1 -1
  2. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothingCorrectPointsEqualToAlternatePoints.js +1 -1
  3. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardAllOrNothingCorrectPointsEqualToAlternatePoints.js +1 -1
  4. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardAllOrNothingCorrectPointsGreaterThanAlternatePoints.js +1 -1
  5. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAddResponseContainer.js +221 -0
  6. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettings.js +1588 -0
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAllOrNothingScoring.js +950 -0
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextConditionalCheckboxes.js +357 -0
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.js +134 -0
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.js +208 -0
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabScoringSection.js +227 -0
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextHeaderSection.js +109 -0
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextImageProperties.js +156 -0
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextManualAndNonScored.js +157 -0
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialDifferentWeightsScoring.js +1199 -0
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialEqualWeightsScoring.js +1084 -0
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPreviewTab.js +66 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextSetCorrectAnswerSection.js +113 -0
  19. package/package.json +1 -1
@@ -0,0 +1,156 @@
1
+ import constants from "../../../fixtures/constants";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import { dialogBoxBase, fillInTheGapsOverImageTextPage } from "../../../pages";
4
+ import { uploadImageSectionComponent } from "../../../pages/components";
5
+ import utilities from "../../../support/helpers/utilities";
6
+ const css = Cypress.env('css');
7
+
8
+ describe('Create item page - Fill in the gaps over image - text: Image properties', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Edit image popup contents and functionality', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ cy.log('Navigate to fill in the gaps over image - text question type');
17
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
18
+ cy.log('Uploading an image');
19
+ uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
20
+ uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
21
+ uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
22
+ uploadImageSectionComponent.steps.clickOnEditImageButton();
23
+ });
24
+
25
+ uploadImageSectionComponent.tests.verifyUploadImagePopupImageTitle();
26
+
27
+ uploadImageSectionComponent.tests.uploadImagePopupContents(500, 500);
28
+
29
+ uploadImageSectionComponent.tests.verifyButtonReplaceInImagePopup();
30
+
31
+ uploadImageSectionComponent.tests.uploadImageHeightWidthAspectRatioAndResetDimensionsFunctionality(500, 500);
32
+
33
+ it('When user clicks on \'Cancel\' button the popup should close and image should not get edited', () => {
34
+ uploadImageSectionComponent.steps.clickOnImagePopupCancelButton();
35
+ fillInTheGapsOverImageTextPage.steps.verifyWidthInputFieldValue(500);
36
+ fillInTheGapsOverImageTextPage.steps.verifyHeightInputFieldValue(500);
37
+ cy.log('Post step: Clicking on edit image button')
38
+ uploadImageSectionComponent.steps.clickOnEditImageButton();
39
+ });
40
+
41
+ uploadImageSectionComponent.tests.uploadImageReplaceButtonFunctionality();
42
+
43
+ it('When user makes some edits and clicks on the \'Ok\' button the popup should close and the edited image should be uploaded', () => {
44
+ uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
45
+ fillInTheGapsOverImageTextPage.steps.verifyWidthInputFieldValue(225);
46
+ fillInTheGapsOverImageTextPage.steps.verifyHeightInputFieldValue(225);
47
+ });
48
+ });
49
+
50
+ describe('Edit image pop up content - source URL', () => {
51
+ abortEarlySetup();
52
+ before(() => {
53
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
54
+ cy.log('Uploading an image using source url');
55
+ uploadImageSectionComponent.steps.clickOnSourceURL();
56
+ uploadImageSectionComponent.steps.uploadImageUsingSourceURL(constants.flowerImage);
57
+ uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
58
+ uploadImageSectionComponent.steps.clickOnEditImageButton();
59
+ });
60
+
61
+ //Failing due to https://redmine.zeuslearning.com/issues/543833
62
+ uploadImageSectionComponent.tests.verifyUploadImageSourceURLTitle();
63
+
64
+ uploadImageSectionComponent.tests.verifyUploadImageSourceURLLabelAndInputFieldInEditSourceURLPopup();
65
+
66
+ uploadImageSectionComponent.tests.uploadImagePopupContents(650, 684);
67
+ });
68
+
69
+ describe('Delete image - Edit tab', () => {
70
+ abortEarlySetup();
71
+ before(() => {
72
+ cy.log('Navigate to fill in the gaps over image - text question type');
73
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
74
+ cy.log('Uploading an image');
75
+ uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
76
+ uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
77
+ uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
78
+ });
79
+
80
+ uploadImageSectionComponent.tests.verifyDeleteImagePopup();
81
+
82
+ it('When user clicks on \'Cancel\' button the popup should close and image should not get deleted', () => {
83
+ dialogBoxBase.steps.clickOnRejectButtonInDialogBox();
84
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.imageSectionImage(), 'visible');
85
+ });
86
+
87
+ it('When user clicks on \'Delete image\' button the popup should close and image should get deleted', () => {
88
+ uploadImageSectionComponent.steps.clickOnDeleteImageButton();
89
+ dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
90
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.imageSectionImage(), 'notExist')
91
+ });
92
+ });
93
+
94
+ describe('Image properties section contents', () => {
95
+ abortEarlySetup();
96
+ before(() => {
97
+ cy.log('Navigate to fill in the gaps over image - text question type');
98
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
99
+ cy.barsPreLoaderWait();
100
+ });
101
+
102
+ fillInTheGapsOverImageTextPage.tests.verifyImagePropertiesSectionContents();
103
+ });
104
+
105
+ describe('Image properties - \'Image hover text\' and \'Image alternative text\' : Edit tab', () => {
106
+ abortEarlySetup();
107
+ before(() => {
108
+ cy.log('Navigate to fill in the gaps over image - text question type');
109
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
110
+ cy.barsPreLoaderWait();
111
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
112
+ fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
113
+ });
114
+
115
+ fillInTheGapsOverImageTextPage.tests.verifyImageHoverAndAlternativeTextFunctionalityInEditTab();
116
+ });
117
+
118
+ describe('Image properties - \'Image hover text\' and \'Image alternative text\' : Preview tab', () => {
119
+ abortEarlySetup();
120
+ before(() => {
121
+ cy.log('Navigate to fill in the gaps over image - text question type');
122
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
123
+ cy.barsPreLoaderWait();
124
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
125
+ fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
126
+ });
127
+
128
+ fillInTheGapsOverImageTextPage.tests.verifyImageHoverAndAlternativeTextFunctionalityInPreviewTab();
129
+ });
130
+
131
+ describe('Image properties - \'Height and width (px)\' : Edit tab', () => {
132
+ abortEarlySetup();
133
+ before(() => {
134
+ cy.log('Navigate to fill in the gaps over image - text question type');
135
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
136
+ cy.barsPreLoaderWait();
137
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
138
+ fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
139
+ });
140
+
141
+ fillInTheGapsOverImageTextPage.tests.verifyImagePropertiesHeightAndWidthInputFieldInEditTab();
142
+ });
143
+
144
+ describe('Image properties - \'Height and width (px)\' : Preview tab', () => {
145
+ abortEarlySetup();
146
+ before(() => {
147
+ cy.log('Navigate to fill in the gaps over image - text question type');
148
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
149
+ cy.barsPreLoaderWait();
150
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
151
+ fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
152
+ });
153
+
154
+ fillInTheGapsOverImageTextPage.tests.verifyImagePropertiesHeightAndWidthInputFieldInPreviewTab();
155
+ });
156
+ });
@@ -0,0 +1,157 @@
1
+ import { fillInTheGapsOverImageTextPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const correctTabAnswerArray = ['Flower', 'Leaf', 'Stem'];
5
+ const incorrectAnswerArray = ['Roots', 'Branch', 'Seed'];
6
+
7
+ describe('Create item page - Fill in the gaps over image - text: Manually and Non-scored', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Question preview: Manually scored', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ cy.log('Navigate to fill in the gaps over image - text question type');
16
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
17
+ cy.barsPreLoaderWait();
18
+ fillInTheGapsOverImageTextPage.steps.addQuestionInstructions();
19
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
20
+ fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
21
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
22
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
23
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
24
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
25
+ fillInTheGapsOverImageTextPage.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored');
26
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
27
+ });
28
+
29
+ it('When user switches to the Preview tab, the question instruction and the response fields should be displayed in the preview tab', () => {
30
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionInstructionsText();
31
+ utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseFieldPreviewTab(), 2);
32
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseFieldPreviewTab(), 'visible');
33
+ });
34
+
35
+ fillInTheGapsOverImageTextPage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab();
36
+ });
37
+
38
+ describe('Question Preview: Non scored', () => {
39
+ abortEarlySetup();
40
+ before(() => {
41
+ cy.log('Navigate to fill in the gaps over image - text question type');
42
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
43
+ cy.barsPreLoaderWait();
44
+ fillInTheGapsOverImageTextPage.steps.addQuestionInstructions();
45
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
46
+ fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
47
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
48
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
49
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
50
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
51
+ fillInTheGapsOverImageTextPage.steps.selectAScoringTypeFromScoringTypeDropdown('Non scored');
52
+ fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
53
+ fillInTheGapsOverImageTextPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
54
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
55
+ });
56
+
57
+ fillInTheGapsOverImageTextPage.tests.verifyShowCorrectAnswerLabelAndCheckboxExistAndPreviewScoreNotExistInPreviewTab();
58
+
59
+ it('When the user selects \'Show correct answer\' checkbox without attempting the question, correct/incorrect icons or label should not be displayed, correct answer container along with \'Correct answers:\' label and correct responses with numeric count should be displayed below the question preview', () => {
60
+ fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
61
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectIconsDoesNotExist();
62
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
63
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
64
+ utilities.verifyInnerText(fillInTheGapsOverImageTextPage.previewTabCorrectAnswerLabel(), 'Correct answers:');
65
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[0], correctTabAnswerArray[1]], ['1', '2']);
66
+ fillInTheGapsOverImageTextPage.steps.uncheckShowCorrectAnswerCheckbox();
67
+ });
68
+
69
+ it('When user selects Check answer button without attempting the question, correct/incorrect label and border should not be displayed below and check-mark or cross-mark should not be displayed for any option', () => {
70
+ fillInTheGapsOverImageTextPage.steps.checkAnswer();
71
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
72
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectIconsDoesNotExist();
73
+ });
74
+
75
+ it('When the user attempts the question incorrectly then on selecting \'Show correct answer\' checkbox, red cross-mark icons should be displayed beside all incorrect response fields, a label \'Incorrect answer\' and incorrect answer border should be displayed below the question preview and the correct answer container with all correct answers along with numeration should be displayed', () => {
76
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, incorrectAnswerArray[0]);
77
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[1]);
78
+ fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
79
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
80
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
81
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
82
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
83
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[0], correctTabAnswerArray[1]], ['1', '2']);
84
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
85
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
86
+ cy.log('When the user attempts the question incorrectly and clicks on the \'Check answer\' button, then red cross-mark icons should be displayed beside all incorrect the responses, a label \'Incorrect answer\' and incorrect answer border should be displayed below the question preview and the correct answer container should not be displayed')
87
+ fillInTheGapsOverImageTextPage.steps.checkAnswer();
88
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
89
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
90
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
91
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
92
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
93
+ });
94
+
95
+ it('When user attempts the question partially correct without incorrect answer, then on selecting \'Show correct answer\' checkbox, green check-mark should be displayed besides correct answer responses, red cross-mark should not be displayed beside any responses and correct/incorrect border and label should not be displayed', () => {
96
+ fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
97
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
98
+ fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
99
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
100
+ fillInTheGapsOverImageTextPage.steps.verifyCheckmarkOrCrossmarkNotVisible(1);
101
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
102
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
103
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[1]], ['2']);
104
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
105
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
106
+
107
+ cy.log('When user attempts the question partially correct and clicks on the \'Check answer\' button, green check-mark should be displayed besides correctly attempted responses, red cross-mark should not be displayed beside any responses and correct/incorrect border and label should not be displayed');
108
+ fillInTheGapsOverImageTextPage.steps.checkAnswer();
109
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
110
+ fillInTheGapsOverImageTextPage.steps.verifyCheckmarkOrCrossmarkNotVisible(1);
111
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
112
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
113
+ });
114
+
115
+ it('When user attempts the question partially correct with incorrect answer, then on selecting \'Show correct answer\' checkbox, the user should be awarded 0 points, green check-mark should be displayed besides correct answer responses, red cross-mark should be displayed besides incorrectly answered option and correct/incorrect border and label should not be displayed', () => {
116
+ fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
117
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
118
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[1]);
119
+ fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
120
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
121
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
122
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
123
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
124
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[1]], ['2']);
125
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
126
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
127
+
128
+ cy.log('When user attempts the question partially correct and clicks on the \'Check Answer\' button, green check-mark should be displayed besides correctly attempted responses, red cross-mark should be displayed besides incorrectly answered option and correct/incorrect border and label should not be displayed')
129
+ fillInTheGapsOverImageTextPage.steps.checkAnswer();
130
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
131
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
132
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
133
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
134
+ });
135
+
136
+ it('When user attempts the question correctly then on selecting \'Show correct answer\' checkbox, green check-mark icons should be displayed besides the correctly answered responses, correct/incorrect border and label and correct answer container should not be displayed', () => {
137
+ fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
138
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
139
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, correctTabAnswerArray[1]);
140
+ fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
141
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
142
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
143
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
144
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAttemptBorder();
145
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
146
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
147
+
148
+ cy.log('When user attempts the question correctly and clicks on the \'Check Answer\' button, green check-mark icons should be displayed besides the correctly answered responses and correct/incorrect border and label should not be displayed')
149
+ fillInTheGapsOverImageTextPage.steps.checkAnswer();
150
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
151
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
152
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
153
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAttemptBorder();
154
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
155
+ });
156
+ });
157
+ });