itemengine-cypress-automation 1.0.72 → 1.0.73
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponse/{audioResponseMinimalPreviewSection.js → audioResponseMinimalPreviewSection.smoke.js} +263 -254
- package/cypress/e2e/ILC/AudioResponse/{audioResponseStandardPreviewSection.js → audioResponseStandardPreviewSection.smoke.js} +100 -97
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/groupedOptionsAllOrNothing.smoke.js +121 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{groupedOptionsPartialScoreForEachCell.js → groupedOptionsPartialScoreForEachCell.smoke.js} +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{groupedOptionsPartialScoreForEachResponse.js → groupedOptionsPartialScoreForEachResponse.smoke.js} +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/standardAllOrNothing.smoke.js +164 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{standardTotalScoreDividedBetweenResponse.js → standardTotalScoreDividedBetweenResponse.smoke.js} +21 -18
- package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +753 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.smoke.js +943 -0
- package/cypress/e2e/ILC/EssayResponse/{essayResponseCustomizeFormattingOptions1.js → essayResponseCustomizeFormattingOptions1.smoke.js} +113 -110
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +581 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseGradingViewAndCorrectAnswerViewContents.smoke.js +111 -0
- package/cypress/e2e/ILC/EssayResponse/{essayResponsePreviewContentsForAllViews.js → essayResponsePreviewContentsForAllViews.smoke.js} +6 -3
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedEditTab.smoke.js +81 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/{fillInTheGapsDragAndDropGroupedOptionsAllOrNothingScoring.js → fillInTheGapsDragAndDropGroupedOptionsAllOrNothingScoring.smoke.js} +25 -22
- package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownAllOrNothingScoring.js → fillInTheGapsDropdownAllOrNothingScoring.smoke.js} +16 -14
- package/cypress/e2e/ILC/{fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.js → FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.smoke.js} +80 -74
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.smoke.js +361 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.smoke.js +137 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.smoke.js +171 -0
- package/cypress/e2e/ILC/{fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.js → FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.smoke.js} +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextAllOrNothingScoring.js → fillInTheGapsOverImageTextAllOrNothingScoring.smoke.js} +32 -29
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextCheckAnswerForAllViews.js → fillInTheGapsOverImageTextCheckAnswerForAllViews.smoke.js} +5 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.smoke.js +137 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.smoke.js +146 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextPreviewContentsForAllViews.js → fillInTheGapsOverImageTextPreviewContentsForAllViews.smoke.js} +5 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextPreviewTab.js → fillInTheGapsOverImageTextPreviewTab.smoke.js} +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextShowCorrectAnswerForAllView.js → fillInTheGapsOverImageTextShowCorrectAnswerForAllView.smoke.js} +6 -4
- package/cypress/e2e/ILC/FillInTheGapsText/{fillInTheGapsTextAutoScoredScoring.js → fillInTheGapsTextAutoScoredScoring.smoke.js} +12 -9
- package/cypress/e2e/ILC/Highlight/HighlightScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +36 -34
- package/cypress/e2e/ILC/Highlight/HighlightScoring/highlightBasicScoringForTextSelectionTypes.smoke.js +462 -0
- package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.smoke.js +148 -0
- package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.smoke.js +185 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.smoke.js +138 -0
- package/cypress/e2e/ILC/HighlightImage/{highlightImagePreviewTab.js → highlightImagePreviewTab.smoke.js} +1 -1
- package/cypress/e2e/ILC/HighlightImage/{highlightImageToolsFunctionalityPreviewTab.js → highlightImageToolsFunctionalityPreviewTab.smoke.js} +4 -4
- package/cypress/e2e/ILC/ListMatching/ListMatchingScoring/groupedOptionsAllOrNothingScoring.smoke.js +122 -0
- package/cypress/e2e/ILC/ListMatching/{listMatchingAlternateAnswer.js → listMatchingAlternateAnswer.smoke.js} +47 -43
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.smoke.js +211 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.smoke.js +254 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.smoke.js +191 -0
- package/cypress/e2e/ILC/ListOrdering/ListOrderingScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +34 -32
- package/cypress/e2e/ILC/ListSorting/ListSortingScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +41 -38
- package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.smoke.js +269 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/{multipleSelectionGridAutoScoredScoring.js → multipleSelectionGridAutoScoredScoring.smoke.js} +36 -34
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAutoScoredScoring.smoke.js +407 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/{singleSelectionGridAutoScoredScoring.js → singleSelectionGridAutoScoredScoring.smoke.js} +32 -29
- package/cypress/e2e/ILC/UploadResponse/{uploadResponsePreview.js → uploadResponsePreview.smoke.js} +64 -59
- package/cypress/e2e/ILC/VideoResponse/{videoResponsePreviewTab.js → videoResponsePreviewTab.smoke.js} +290 -281
- package/cypress/pages/components/additionalSettingsPanel.js +0 -27
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +321 -0
- package/cypress/pages/components/createQuestionBasePage.js +1 -7
- package/cypress/pages/components/essayResponseCommonComponents.js +0 -6
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +0 -13
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +0 -10
- package/cypress/pages/components/scoringSectionBase.js +3 -2
- package/cypress/pages/createItemPage.js +3 -79
- package/cypress/pages/dialogBoxBase.js +8 -23
- package/cypress/pages/index.js +1 -4
- package/cypress/pages/itemPreviewSettingsPage.js +446 -0
- package/cypress/pages/multipleSelectionPage.js +113 -64
- package/cypress/pages/selectQuestionResourceToolPage.js +0 -5
- package/cypress/pages/shortTextResponsePage.js +0 -6
- package/cypress/pages/singleSelectionPage.js +0 -1
- package/package.json +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/groupedOptionsAllOrNothing.js +0 -116
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/standardAllOrNothing.js +0 -160
- package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.js +0 -932
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.js +0 -572
- package/cypress/e2e/ILC/EssayResponse/essayResponseGradingViewAndCorrectAnswerViewContents.js +0 -106
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedEditTab.js +0 -76
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.js +0 -134
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.js +0 -133
- package/cypress/e2e/ILC/Highlight/HighlightScoring/highlightBasicScoringForTextSelectionTypes.js +0 -457
- package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.js +0 -143
- package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.js +0 -178
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.js +0 -125
- package/cypress/e2e/ILC/ListMatching/ListMatchingScoring/groupedOptionsAllOrNothingScoring.js +0 -117
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.js +0 -207
- package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.js +0 -246
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.js +0 -185
- package/cypress/e2e/ILC/ListSorting/listSortingAdditionalSettings.js +0 -820
- package/cypress/e2e/ILC/ListSorting/listSortingAutoScoredScoring.js +0 -936
- package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.js +0 -263
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAutoScoredScoring.js +0 -402
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.js +0 -356
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.js +0 -134
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.js +0 -156
@@ -0,0 +1,171 @@
|
|
1
|
+
import { dialogBoxBase, fillInTheGapsOverImageDropdownPage } from "../../../pages";
|
2
|
+
import { uploadImageSectionComponent } from "../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import constants from "../../../fixtures/constants";
|
5
|
+
import utilities from "../../../support/helpers/utilities";
|
6
|
+
const css = Cypress.env('css');
|
7
|
+
const grepTags = Cypress.env('grepTags');
|
8
|
+
|
9
|
+
describe('Create item page - fill in the gaps over image - dropdown: Image properties', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
15
|
+
describe('Edit image popup contents and functionality', () => {
|
16
|
+
abortEarlySetup();
|
17
|
+
before(() => {
|
18
|
+
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
19
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
20
|
+
cy.log('Uploading an image');
|
21
|
+
uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
|
22
|
+
uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
|
23
|
+
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
24
|
+
uploadImageSectionComponent.steps.clickOnEditImageButton();
|
25
|
+
});
|
26
|
+
|
27
|
+
uploadImageSectionComponent.tests.verifyUploadImagePopupImageTitle();
|
28
|
+
|
29
|
+
uploadImageSectionComponent.tests.uploadImagePopupContents(500, 500);
|
30
|
+
|
31
|
+
uploadImageSectionComponent.tests.verifyButtonReplaceInImagePopup();
|
32
|
+
|
33
|
+
uploadImageSectionComponent.tests.uploadImageHeightWidthAspectRatioAndResetDimensionsFunctionality(500, 500);
|
34
|
+
|
35
|
+
it('When user clicks on \'Cancel\' button the popup should close and image should not get edited', () => {
|
36
|
+
uploadImageSectionComponent.steps.clickOnImagePopupCancelButton();
|
37
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyWidthInputFieldValue(500);
|
38
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyHeightInputFieldValue(500);
|
39
|
+
cy.log('Post step: Clicking on edit image button')
|
40
|
+
uploadImageSectionComponent.steps.clickOnEditImageButton();
|
41
|
+
});
|
42
|
+
|
43
|
+
uploadImageSectionComponent.tests.uploadImageReplaceButtonFunctionality();
|
44
|
+
|
45
|
+
it('When user makes some edits and clicks on the \'Ok\' button the popup should close and the edited image should be uploaded', () => {
|
46
|
+
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
47
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyWidthInputFieldValue(225);
|
48
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyHeightInputFieldValue(225);
|
49
|
+
});
|
50
|
+
});
|
51
|
+
}
|
52
|
+
|
53
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
54
|
+
describe('Edit image pop up content - source URL', () => {
|
55
|
+
abortEarlySetup();
|
56
|
+
before(() => {
|
57
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
58
|
+
cy.log('Uploading an image using source url');
|
59
|
+
uploadImageSectionComponent.steps.clickOnSourceURL();
|
60
|
+
uploadImageSectionComponent.steps.uploadImageUsingSourceURL(constants.flowerImage);
|
61
|
+
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
62
|
+
uploadImageSectionComponent.steps.clickOnEditImageButton();
|
63
|
+
});
|
64
|
+
|
65
|
+
//Failing due to https://redmine.zeuslearning.com/issues/543833
|
66
|
+
uploadImageSectionComponent.tests.verifyUploadImageSourceURLTitle();
|
67
|
+
|
68
|
+
uploadImageSectionComponent.tests.verifyUploadImageSourceURLLabelAndInputFieldInEditSourceURLPopup();
|
69
|
+
|
70
|
+
uploadImageSectionComponent.tests.uploadImagePopupContents(650, 684);
|
71
|
+
});
|
72
|
+
}
|
73
|
+
|
74
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
75
|
+
describe('Delete image - Edit tab', () => {
|
76
|
+
abortEarlySetup();
|
77
|
+
before(() => {
|
78
|
+
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
79
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
80
|
+
cy.log('Uploading an image');
|
81
|
+
uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
|
82
|
+
uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
|
83
|
+
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
84
|
+
});
|
85
|
+
|
86
|
+
uploadImageSectionComponent.tests.verifyDeleteImagePopup();
|
87
|
+
|
88
|
+
it('When user clicks on \'Cancel\' button the popup should close and image should not get deleted', () => {
|
89
|
+
dialogBoxBase.steps.clickOnRejectButtonInDialogBox();
|
90
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.imageSectionImage(), 'visible');
|
91
|
+
});
|
92
|
+
|
93
|
+
it('When user clicks on \'Delete image\' button the popup should close and image should get deleted', () => {
|
94
|
+
uploadImageSectionComponent.steps.clickOnDeleteImageButton();
|
95
|
+
dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
|
96
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.imageSectionImage(), 'notExist')
|
97
|
+
});
|
98
|
+
});
|
99
|
+
}
|
100
|
+
|
101
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
102
|
+
describe('Image properties section contents', () => {
|
103
|
+
abortEarlySetup();
|
104
|
+
before(() => {
|
105
|
+
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
106
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
107
|
+
cy.barsPreLoaderWait();
|
108
|
+
});
|
109
|
+
|
110
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyImagePropertiesSectionContents();
|
111
|
+
});
|
112
|
+
}
|
113
|
+
|
114
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
115
|
+
describe('Image properties - \'Image hover text\' and \'Image alternative text\' : Edit tab', () => {
|
116
|
+
abortEarlySetup();
|
117
|
+
before(() => {
|
118
|
+
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
119
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
120
|
+
cy.barsPreLoaderWait();
|
121
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
122
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
123
|
+
});
|
124
|
+
|
125
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyImageHoverAndAlternativeTextFunctionalityInEditTab();
|
126
|
+
});
|
127
|
+
}
|
128
|
+
|
129
|
+
describe('Image properties - \'Image hover text\' and \'Image alternative text\' : Preview tab', { tags: 'smoke' }, () => {
|
130
|
+
abortEarlySetup();
|
131
|
+
before(() => {
|
132
|
+
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
133
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
134
|
+
cy.barsPreLoaderWait();
|
135
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
136
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
137
|
+
});
|
138
|
+
|
139
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyImageHoverAndAlternativeTextFunctionalityInPreviewTab();
|
140
|
+
});
|
141
|
+
|
142
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
143
|
+
describe('Image properties - \'Height and width (px)\' : Edit tab', () => {
|
144
|
+
abortEarlySetup();
|
145
|
+
before(() => {
|
146
|
+
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
147
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
148
|
+
cy.barsPreLoaderWait();
|
149
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
150
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
151
|
+
});
|
152
|
+
|
153
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyImagePropertiesHeightAndWidthInputFieldInEditTab();
|
154
|
+
});
|
155
|
+
}
|
156
|
+
|
157
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
158
|
+
describe('Image properties - \'Height and width (px)\' : Preview tab', () => {
|
159
|
+
abortEarlySetup();
|
160
|
+
before(() => {
|
161
|
+
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
162
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
163
|
+
cy.barsPreLoaderWait();
|
164
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
165
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
166
|
+
});
|
167
|
+
|
168
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyImagePropertiesHeightAndWidthInputFieldInPreviewTab();
|
169
|
+
});
|
170
|
+
}
|
171
|
+
});
|
@@ -11,7 +11,7 @@ describe('Create item page - Fill in the gaps over image - dropdown: Preview tab
|
|
11
11
|
cy.loginAs('admin');
|
12
12
|
});
|
13
13
|
|
14
|
-
describe('Preview tab contents', () => {
|
14
|
+
describe('Preview tab contents', { tags: 'smoke' }, () => {
|
15
15
|
abortEarlySetup();
|
16
16
|
before(() => {
|
17
17
|
cy.log('Navigating to Fill in the gaps over image - dropdown question type');
|
@@ -4,47 +4,50 @@ import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
5
5
|
const correctTabAnswerArray = ['Flower', 'Leaf', 'Stem'];
|
6
6
|
const incorrectAnswerArray = ['Root', 'Branch', 'Seed'];
|
7
|
+
const grepTags = Cypress.env('grepTags');
|
7
8
|
|
8
9
|
describe('Create item page - Fill in the gaps over image - text: All or nothing scoring', () => {
|
9
10
|
before(() => {
|
10
11
|
cy.loginAs('admin');
|
11
12
|
});
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
14
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
15
|
+
describe('Show correct answer', () => {
|
16
|
+
abortEarlySetup();
|
17
|
+
before(() => {
|
18
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
19
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
20
|
+
cy.barsPreLoaderWait();
|
21
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
22
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
23
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
24
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
25
|
+
});
|
24
26
|
|
25
|
-
|
27
|
+
fillInTheGapsOverImageTextPage.tests.verifyShowCorrectAnswerAndPointsInPreviewTabWhenNoCorrectAnswerIsSet();
|
26
28
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
29
|
+
it('When the user has set correct answer responses and alloted points \'Show correct answer\' checkbox should be displayed and it should be unchecked by default and points for the question should be displayed beside it', () => {
|
30
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
31
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
32
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
33
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
34
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
35
|
+
fillInTheGapsOverImageTextPage.steps.verifyDefaultShowCorrectAnswerCheckboxAndLabel();
|
36
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(0, 20);
|
37
|
+
});
|
36
38
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
it('When the user attempts question in preview tab and switches to edit tab, then on re-switching to the preview tab users response should not persist', () => {
|
40
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
|
41
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, correctTabAnswerArray[1]);
|
42
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
43
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(0, '');
|
44
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(1, '');
|
45
|
+
});
|
43
46
|
});
|
44
|
-
}
|
47
|
+
}
|
45
48
|
|
46
49
|
//Failing due to https://redmine.zeuslearning.com/issues/545382, https://redmine.zeuslearning.com/issues/542590
|
47
|
-
describe('Question preview: Auto scored - All or nothing', () => {
|
50
|
+
describe('Question preview: Auto scored - All or nothing', { tags: 'smoke' }, () => {
|
48
51
|
abortEarlySetup();
|
49
52
|
before(() => {
|
50
53
|
cy.log('Navigate to fill in the gaps over image - text question type');
|
@@ -2,7 +2,9 @@ import { fillInTheGapsOverImageTextPage } from "../../../pages/fillInTheGapsOver
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
4
|
import { itemPreviewPage } from "../../../pages";
|
5
|
-
|
5
|
+
let checkAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
6
|
+
const views = Cypress.env('views');
|
7
|
+
checkAnswerViews = checkAnswerViews.filter(view => views.includes(view));
|
6
8
|
const correctTabAnswerArray = ['Flower', 'Leaf'];
|
7
9
|
const incorrectAnswerArray = ['Stem', 'Root'];
|
8
10
|
var itemReferenceID = "";
|
@@ -12,7 +14,7 @@ describe('Create item page - Fill in the gaps over image - text: Check answer',
|
|
12
14
|
cy.loginAs('admin');
|
13
15
|
});
|
14
16
|
|
15
|
-
|
17
|
+
checkAnswerViews.forEach((view) => {
|
16
18
|
// Remove after https://redmine.zeuslearning.com/issues/549542 is fixed
|
17
19
|
const checkAnswer = (view) => {
|
18
20
|
switch (view) {
|
@@ -29,7 +31,7 @@ describe('Create item page - Fill in the gaps over image - text: Check answer',
|
|
29
31
|
throw new Error(`Unsupported page identifier: ${view}`);
|
30
32
|
}
|
31
33
|
};
|
32
|
-
describe(`Fill in the gaps over image - text: Check answer - ${view}`, () => {
|
34
|
+
describe(`Fill in the gaps over image - text: Check answer - ${view}`, { tags: 'smoke' }, () => {
|
33
35
|
abortEarlySetup();
|
34
36
|
before(() => {
|
35
37
|
switch (view) {
|
@@ -0,0 +1,137 @@
|
|
1
|
+
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const grepTags = Cypress.env('grepTags');
|
6
|
+
|
7
|
+
describe('Create item page - Fill in the gaps over image - text: Edit aria-label checkbox', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
13
|
+
describe('Edit aria-label in edit tab', () => {
|
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.barsPreLoaderWait();
|
19
|
+
fillInTheGapsOverImageTextPage.steps.addQuestionInstructions();
|
20
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
21
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
22
|
+
});
|
23
|
+
|
24
|
+
it('When the user uploads an image in image section, then \'Edit aria-labels for response containers\' checkbox and label should be displayed in the image properties in disabled state', () => {
|
25
|
+
fillInTheGapsOverImageTextPage.steps.verifyDisabledStateOfEditAriaLabelsForResponseContainersCheckbox();
|
26
|
+
});
|
27
|
+
|
28
|
+
it('When the user adds a response container in the image, then \'Edit aria-labels for response containers\' checkbox should be enabled and by default it should be unchecked', () => {
|
29
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
30
|
+
fillInTheGapsOverImageTextPage.steps.verifyDefaultEnabledStateOfEditAriaLabelsForResponseContainersCheckbox();
|
31
|
+
});
|
32
|
+
|
33
|
+
it('CSS of \'Edit aria-labels for response containers\' label', { tags: 'css' }, () => {
|
34
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.editAriaLabelForResponseContainersLabel(), {
|
35
|
+
'color': css.color.labelText,
|
36
|
+
'font-size': css.fontSize.normal,
|
37
|
+
'font-weight': css.fontWeight.regular
|
38
|
+
});
|
39
|
+
});
|
40
|
+
|
41
|
+
it('Accessibility of \'Edit aria-labels for response containers\' checkbox', { tags: 'a11y' }, () => {
|
42
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.editAriaLabelForResponseContainersCheckbox());
|
43
|
+
});
|
44
|
+
|
45
|
+
it('When the user checks the \'Edit aria-labels for response containers\' checkbox, then a label \'ARIA labels\' and an input field with numeration and placeholder text \'Enter label\' should be displayed', () => {
|
46
|
+
fillInTheGapsOverImageTextPage.steps.checkEditAriaLabelCheckbox();
|
47
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.ariaLabelsLabel(), 'exist');
|
48
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.ariaLabelsLabel(), 'ARIA labels');
|
49
|
+
fillInTheGapsOverImageTextPage.steps.verifyEditAriaLabelInputFieldContents(1);
|
50
|
+
});
|
51
|
+
|
52
|
+
//Failing due to https://redmine.zeuslearning.com/issues/547543
|
53
|
+
it('CSS of \'ARIA labels\' label and input fields', { tags: 'css' }, () => {
|
54
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.ariaLabelsLabel(), {
|
55
|
+
'color': css.color.labels,
|
56
|
+
'font-size': css.fontSize.normal,
|
57
|
+
'font-weight': css.fontWeight.semibold
|
58
|
+
});
|
59
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.ariaLabelsInputFieldNumeration(), {
|
60
|
+
'color': css.color.labels,
|
61
|
+
'font-size': css.fontSize.default,
|
62
|
+
'font-weight': css.fontWeight.semibold
|
63
|
+
});
|
64
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.ariaLabelsInputField(), {
|
65
|
+
'color': css.color.text,
|
66
|
+
'font-size': css.fontSize.default,
|
67
|
+
'font-weight': css.fontWeight.regular
|
68
|
+
});
|
69
|
+
});
|
70
|
+
|
71
|
+
it('Accessibility of \'ARIA labels\' input fields', { tags: 'a11y' }, () => {
|
72
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.ariaLabelsInputField());
|
73
|
+
});
|
74
|
+
|
75
|
+
it('When the user adds another response container to the uploaded image, a input field should be added in the \'Edit aria-labels for response container section\' with the numeration \'2\'', () => {
|
76
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
77
|
+
fillInTheGapsOverImageTextPage.steps.verifyEditAriaLabelInputFieldContents(2);
|
78
|
+
});
|
79
|
+
|
80
|
+
it('When the user removes a response container from the uploaded image, the edit aria-label response field corresponding to the removed response container should not be displayed and the remaining edit aria-label input field should be displayed with updated numeration', () => {
|
81
|
+
fillInTheGapsOverImageTextPage.steps.clickOnResponseContainerCloseButton(0);
|
82
|
+
fillInTheGapsOverImageTextPage.steps.verifyEditAriaLabelInputFieldContents(1);
|
83
|
+
});
|
84
|
+
|
85
|
+
//Failing due to - https://redmine.zeuslearning.com/issues/547533
|
86
|
+
it('When the user has not given any input to the edit aria-label input field, the aria-label attribute for response container in image section and aria-label attribute for response field in set correct answer section should be \'Add answer for Response #\'', () => {
|
87
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseContainerAriaLabelAttribute(0, 'Add answer for Response 1');
|
88
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseFieldAriaLabelAttributeInSetCorrectAnswerSection(0, 'Add answer for Response 1');
|
89
|
+
});
|
90
|
+
|
91
|
+
it('When the user enters text in the edit aria-label input field, the added text should appear as the aria-label attribute of the response container in the uploaded image and response field in the set correct answer section', () => {
|
92
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInEditAriaLabelInputField(0, 'Custom aria-label');
|
93
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseContainerAriaLabelAttribute(0, 'Custom aria-label');
|
94
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseFieldAriaLabelAttributeInSetCorrectAnswerSection(0, 'Custom aria-label');
|
95
|
+
});
|
96
|
+
|
97
|
+
it('When the user clears the text in the edit aria-label input field, the aria-label attribute of the response container in the uploaded image and aria-label attribute of the response field in the set correct answer section should again appear as \'Add answer for Response #\'', () => {
|
98
|
+
fillInTheGapsOverImageTextPage.steps.clearEditAriaLabelInputField(0);
|
99
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseContainerAriaLabelAttribute(0, 'Add answer for Response 1');
|
100
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseFieldAriaLabelAttributeInSetCorrectAnswerSection(0, 'Add answer for Response 1');
|
101
|
+
});
|
102
|
+
});
|
103
|
+
}
|
104
|
+
|
105
|
+
describe('Edit aria-label in preview tab', { tags: 'smoke' }, () => {
|
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.addQuestionInstructions();
|
112
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
113
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
114
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
115
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
116
|
+
});
|
117
|
+
|
118
|
+
it('When the user has not given any input to the edit aria-label input field, the aria-label attribute for response field in preview tab should be \'Add answer for Response #\'', () => {
|
119
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseFieldAriaLabelAttributeInPreviewTab(0, 'Add answer for Response 1');
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When the user enters text in the edit aria-label input field, the added text should appear as the aria-label attribute of the response field in preview tab', () => {
|
123
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
124
|
+
fillInTheGapsOverImageTextPage.steps.checkEditAriaLabelCheckbox();
|
125
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInEditAriaLabelInputField(0, 'Custom aria-label');
|
126
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
127
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseFieldAriaLabelAttributeInPreviewTab(0, 'Custom aria-label');
|
128
|
+
});
|
129
|
+
|
130
|
+
it('When the user clears the text in the edit aria-label input field, the aria-label attribute of the response field in preview tab should again appear as \'Add answer for Response #\'', () => {
|
131
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
132
|
+
fillInTheGapsOverImageTextPage.steps.clearEditAriaLabelInputField(0);
|
133
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
134
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseFieldAriaLabelAttributeInPreviewTab(0, 'Add answer for Response 1');
|
135
|
+
});
|
136
|
+
});
|
137
|
+
});
|
@@ -0,0 +1,146 @@
|
|
1
|
+
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
2
|
+
import { uploadImageSectionComponent } from "../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
import constants from "../../../fixtures/constants";
|
6
|
+
const css = Cypress.env('css');
|
7
|
+
const grepTags = Cypress.env('grepTags');
|
8
|
+
|
9
|
+
describe('Create Item page - Fill in the gaps over image - text: Question instructions, image section, upload image popup and source URL popup', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
15
|
+
describe('Question Instructions input field - Edit tab', () => {
|
16
|
+
abortEarlySetup();
|
17
|
+
before(() => {
|
18
|
+
cy.log('Navigating to fill in the gaps over image - text question type');
|
19
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
20
|
+
cy.barsPreLoaderWait();
|
21
|
+
});
|
22
|
+
|
23
|
+
fillInTheGapsOverImageTextPage.tests.verifyQuestionInstructionsInputFieldEditTab();
|
24
|
+
});
|
25
|
+
}
|
26
|
+
|
27
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
28
|
+
describe('Question Instructions input field - Preview tab', () => {
|
29
|
+
abortEarlySetup();
|
30
|
+
before(() => {
|
31
|
+
cy.log('Navigating to fill in the gaps over image - text question type');
|
32
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
33
|
+
cy.barsPreLoaderWait();
|
34
|
+
});
|
35
|
+
|
36
|
+
fillInTheGapsOverImageTextPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
|
37
|
+
});
|
38
|
+
}
|
39
|
+
|
40
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
41
|
+
describe('Image section contents', () => {
|
42
|
+
abortEarlySetup();
|
43
|
+
before(() => {
|
44
|
+
cy.log('Navigating to fill in the gaps over image - text question type');
|
45
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
46
|
+
cy.barsPreLoaderWait();
|
47
|
+
});
|
48
|
+
|
49
|
+
it('\'Image\' title should be displayed', () => {
|
50
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.imageSectionImageLabel(), 'Image');
|
51
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.imageSectionImageLabel(), 'visible');
|
52
|
+
});
|
53
|
+
|
54
|
+
uploadImageSectionComponent.tests.uploadImageEditTabContents();
|
55
|
+
});
|
56
|
+
}
|
57
|
+
|
58
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
59
|
+
describe('Upload image - device popup contents', () => {
|
60
|
+
abortEarlySetup();
|
61
|
+
before(() => {
|
62
|
+
cy.log('Navigating to fill in the gaps over image - text question type');
|
63
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
64
|
+
cy.barsPreLoaderWait();
|
65
|
+
});
|
66
|
+
|
67
|
+
uploadImageSectionComponent.tests.verifyUploadImagePopupImageTitle();
|
68
|
+
|
69
|
+
uploadImageSectionComponent.tests.uploadImagePopupContents(500, 500);
|
70
|
+
|
71
|
+
uploadImageSectionComponent.tests.verifyButtonReplaceInImagePopup();
|
72
|
+
});
|
73
|
+
}
|
74
|
+
|
75
|
+
describe('Upload image popup contents functionality', { tags: 'smoke' }, () => {
|
76
|
+
abortEarlySetup();
|
77
|
+
before(() => {
|
78
|
+
cy.log('Navigating to fill in the gaps over image - text question type');
|
79
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
80
|
+
cy.barsPreLoaderWait();
|
81
|
+
uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
|
82
|
+
});
|
83
|
+
|
84
|
+
//Failing due to - https://redmine.zeuslearning.com/issues/547305
|
85
|
+
uploadImageSectionComponent.tests.uploadImageHeightWidthAspectRatioAndResetDimensionsFunctionality(500, 500);
|
86
|
+
|
87
|
+
uploadImageSectionComponent.tests.uploadImageReplaceButtonFunctionality();
|
88
|
+
|
89
|
+
it('When user selects the \'Cancel\' button the image should not be uploaded', () => {
|
90
|
+
uploadImageSectionComponent.steps.clickOnImagePopupCancelButton();
|
91
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.imageSectionImage(), 'notExist');
|
92
|
+
});
|
93
|
+
|
94
|
+
it('When user uploads an image and selects \'Ok\' button the image should be displayed in the image section', () => {
|
95
|
+
uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
|
96
|
+
uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
|
97
|
+
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
98
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.imageSectionImage(), 'visible');
|
99
|
+
});
|
100
|
+
});
|
101
|
+
|
102
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
103
|
+
describe('Upload image - source URL popup contents', () => {
|
104
|
+
abortEarlySetup();
|
105
|
+
before(() => {
|
106
|
+
cy.log('Navigating to fill in the gaps over image - text question type');
|
107
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
108
|
+
cy.barsPreLoaderWait();
|
109
|
+
});
|
110
|
+
|
111
|
+
uploadImageSectionComponent.tests.verifyUploadImageSourceURLTitle();
|
112
|
+
|
113
|
+
uploadImageSectionComponent.tests.verifyUploadImageSourceURLDefaultLabelAndInputField();
|
114
|
+
|
115
|
+
uploadImageSectionComponent.tests.uploadImagePopupContents(650, 684);
|
116
|
+
});
|
117
|
+
}
|
118
|
+
|
119
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
120
|
+
describe('Upload image \'Source URL\' popup contents functionality', () => {
|
121
|
+
abortEarlySetup();
|
122
|
+
before(() => {
|
123
|
+
cy.log('Navigating to fill in the gaps over image - text question type');
|
124
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
125
|
+
cy.barsPreLoaderWait();
|
126
|
+
uploadImageSectionComponent.steps.clickOnSourceURL();
|
127
|
+
uploadImageSectionComponent.steps.uploadImageUsingSourceURL(constants.flowerImage);
|
128
|
+
});
|
129
|
+
|
130
|
+
uploadImageSectionComponent.tests.uploadImageHeightWidthAspectRatioAndResetDimensionsFunctionality(650, 684);
|
131
|
+
|
132
|
+
it('When user selects the \'Cancel\' button the image should not be uploaded', () => {
|
133
|
+
uploadImageSectionComponent.steps.clickOnImagePopupCancelButton();
|
134
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.imageSectionImage(), 'notExist');
|
135
|
+
});
|
136
|
+
|
137
|
+
it('When user uploads an image and selects \'Ok\' button the image should be displayed in the image section', () => {
|
138
|
+
uploadImageSectionComponent.steps.clickOnSourceURL();
|
139
|
+
uploadImageSectionComponent.steps.uploadImageUsingSourceURL(constants.flowerImage);
|
140
|
+
uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
|
141
|
+
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
142
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.imageSectionImage(), 'visible');
|
143
|
+
});
|
144
|
+
});
|
145
|
+
}
|
146
|
+
});
|
@@ -2,7 +2,9 @@ import { fillInTheGapsOverImageTextPage, itemPreviewPage, studentViewPage } from
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
4
|
const css = Cypress.env('css');
|
5
|
-
const views =
|
5
|
+
const views = Cypress.env('views');
|
6
|
+
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
7
|
+
previewContentViews = previewContentViews.filter(view => views.includes(view));
|
6
8
|
var itemReferenceID = "";
|
7
9
|
const correctTabAnswerArray = ['Flower', 'Leaf', 'Stem'];
|
8
10
|
|
@@ -14,8 +16,8 @@ describe('Create item page - Fill in the gaps over image - text: Preview content
|
|
14
16
|
cy.loginAs('admin');
|
15
17
|
});
|
16
18
|
|
17
|
-
|
18
|
-
describe(`Preview tab contents - ${view}`, () => {
|
19
|
+
previewContentViews.forEach((view) => {
|
20
|
+
describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
|
19
21
|
abortEarlySetup();
|
20
22
|
before(() => {
|
21
23
|
switch (view) {
|
@@ -10,7 +10,7 @@ describe('Create item page - Fill in the gaps over image - text: Preview content
|
|
10
10
|
cy.loginAs('admin');
|
11
11
|
});
|
12
12
|
|
13
|
-
describe('Preview tab contents', () => {
|
13
|
+
describe('Preview tab contents', { tags: 'smoke' }, () => {
|
14
14
|
abortEarlySetup();
|
15
15
|
before(() => {
|
16
16
|
cy.log('Navigating to Fill in the gaps over image - text question type');
|
@@ -2,18 +2,20 @@ import { dialogBoxBase, fillInTheGapsOverImageTextPage, itemPreviewPage, student
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
4
|
import { gradingViewPage } from "../../../pages";
|
5
|
-
const views =
|
6
|
-
|
5
|
+
const views = Cypress.env('views');
|
6
|
+
let correctAnswerViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
7
|
+
correctAnswerViews = correctAnswerViews.filter(view => views.includes(view));
|
7
8
|
const correctTabAnswerArray = ['Flower', 'Leaf', 'Stem'];
|
8
9
|
const incorrectAnswerArray = ['Root', 'Branch', 'Seed'];
|
10
|
+
var itemReferenceID = "";
|
9
11
|
|
10
12
|
describe('Create item page - Fill in the gaps over image - text: Show correct answer', () => {
|
11
13
|
before(() => {
|
12
14
|
cy.loginAs('admin');
|
13
15
|
});
|
14
16
|
|
15
|
-
|
16
|
-
describe(`Fill in the gaps over image - text: Show correct answer for all or nothing scoring - ${view}`, () => {
|
17
|
+
correctAnswerViews.forEach((view) => {
|
18
|
+
describe(`Fill in the gaps over image - text: Show correct answer for all or nothing scoring - ${view}`, { tags: 'smoke' }, () => {
|
17
19
|
abortEarlySetup();
|
18
20
|
before(() => {
|
19
21
|
switch (view) {
|