itemengine-cypress-automation 1.0.51 → 1.0.63
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayer/audioPlayerEditTab.js +342 -0
- package/cypress/e2e/ILC/AudioPlayer/audioPlayerEditTabAddFeatureRadioButton.js +218 -0
- package/cypress/e2e/ILC/AudioPlayer/audioPlayerEditTabTitleDescriptionAndTranscript.js +187 -0
- package/cypress/e2e/ILC/AudioPlayer/audioPlayerHeaderSection.js +73 -0
- package/cypress/e2e/ILC/AudioPlayer/audioPlayerPreviewTab.js +302 -0
- package/cypress/e2e/ILC/AudioPlayer/audioPlayerPreviewTabPlaybackPlayer.js +245 -0
- package/cypress/e2e/ILC/AudioPlayer/audioPlayerPreviewTabSupportedFileTypes.js +78 -0
- package/cypress/e2e/ILC/AudioPlayer/audioPlayerPreviewTabTitleDescriptionAndTranscript.js +248 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAdditionalSettingsAnswerNumeration.js +206 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAdditionalSettingsBasic.js +222 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAdditionalSettingsResponseAccordions.js +366 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingWithAlternateAnswer.js +624 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPartialDifferentWeightsWithAlternateAnswer.js +865 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPartialEqualWeightsWithAlternateAnswer.js +763 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownSupportedFileTypes.js +86 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +213 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +215 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +215 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingScoring.js +187 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/manualAndNonScored.js +162 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialDifferentWeightsAlternatePointsMoreThanCorrectPoints.js +316 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialDifferentWeightsCorrectEqualToAlternatePoints.js +385 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialDifferentWeightsCorrectPointsMoreThanAlternatePoints.js +316 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialDifferentWeightsScoring.js +245 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsAlternatePointsMoreThanCorrectPoints.js +250 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsCorrectPointEqualToAlternatePoints.js +266 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsCorrectPointsMoreThanAlternatePoints.js +250 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsScoring.js +226 -0
- package/cypress/e2e/ILC/Highlight/highlightAdditionalSettingsBasic.js +221 -0
- package/cypress/e2e/ILC/Highlight/highlightAdditionalSettingsMaximumNumberOfAnswers.js +137 -0
- package/cypress/e2e/ILC/Highlight/highlightBasicScoringForTextSelectionTypes.js +457 -0
- package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.js +143 -0
- package/cypress/e2e/ILC/Highlight/highlightEditTabScoringSection.js +361 -0
- package/cypress/e2e/ILC/Highlight/highlightHeaderSection.js +91 -0
- package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.js +178 -0
- package/cypress/e2e/ILC/Highlight/highlightScoringSectionBasic.js +21 -0
- package/cypress/e2e/ILC/Highlight/highlightSetCorrectAnswerSection.js +204 -0
- package/cypress/e2e/ILC/Highlight/highlightTextSelectionDropdownAndHighlightOptionsSection.js +175 -0
- package/cypress/e2e/ILC/Highlight/highlightTextSelectionTypeInPreviewTab.js +237 -0
- package/cypress/e2e/ILC/Highlight/highlightTextSelectionTypeInSetCorrectAnswerSection.js +341 -0
- package/cypress/e2e/ILC/Highlight/highlightTextSelectionTypesInHighlightOptionsSection.js +375 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAdditionalSettingsBasic.js +11 -5
- package/cypress/e2e/ILC/MultipleSelectionGrid/{multipleSelectionGridQuestionStemAdditionalSettings.js → multipleSelectionGridAdditionalSettingsQuestionStem.js} +0 -11
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +263 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAllOrNothingCorrectPointsEqualToAlternatePoints.js +263 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAllOrNothingCorrectPointsGreaterThanAlternatePoints.js +261 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeightsAlternatePointsGreaterThanCorrectPoints.js +340 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeightsCorrectPointsEqualToAlternatePoints.js +310 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeightsCorrectPointsGreaterThanAlternatePoints.js +341 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeightsAlternatePointsGreaterThanCorrectPoints.js +313 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeightsCorrectPointsEqualToAlternatePoints.js +285 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeightsCorrectPointsGreaterThanAlternatePoints.js +316 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +185 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +55 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +257 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +173 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridAllOrNothingCorrectPointsEqualToAlternatePoints.js +179 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridAllOrNothingCorrectPointsGreaterThanAlternatePoints.js +174 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialDifferentWeightsAlternatePointsGreaterThanCorrectPoints.js +247 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialDifferentWeightsCorrectPointsEqualToAlternatePoints.js +219 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialDifferentWeightsCorrectPointsGreaterThanAlternatePoints.js +246 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialEqualWeightsAlternatePointsGreaterThanCorrectPoints.js +225 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialEqualWeightsCorrectPointsEqualToAlternatePoints.js +197 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialEqualWeightsCorrectPointsGreaterThanAlternatePoints.js +226 -0
- package/cypress/e2e/ILC/VideoResponse/videoResponseAdditionalSettings.js +135 -0
- package/cypress/e2e/ILC/VideoResponse/videoResponseAdditionalSettingsBasic.js +88 -0
- package/cypress/e2e/ILC/VideoResponse/videoResponseEditTabBasic.js +78 -0
- package/cypress/e2e/ILC/VideoResponse/videoResponseHeaderSection.js +74 -0
- package/cypress/e2e/ILC/VideoResponse/videoResponsePreviewTab.js +627 -0
- package/cypress/e2e/ILC/VideoResponse/videoResponseScoringSection.js +76 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.js +230 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAdditionalSettings.js +247 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.js +352 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownConditionalCheckboxes.js +258 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.js +134 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditTabBasicSection.js +132 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditTabScoringSection.js +237 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownHeaderSection.js +113 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.js +156 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownManualAndNonScoredScoring.js +165 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownOptionsForResponse.js +303 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPartialDifferentWeightsScoring.js +372 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPartialEqualWeightsScoring.js +371 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.js +77 -0
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownSetCorrectAnswerSection.js +117 -0
- package/cypress/pages/dragAndDropIntoCategoriesAllOrNothingScoring.js +1 -1
- package/package.json +1 -1
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAllOrNothingWithAlternateAnswer.js +0 -731
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeightsWithAlternateAnswer.js +0 -942
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeightsWithAlternateAnswer.js +0 -864
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridAllOrNothingWithAlternateAnswer.js +0 -472
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialDifferentWeightsWithAlternateAnswer.js +0 -662
- package/cypress/e2e/ILC/SingleSelectionGrid/singleSelectionGridPartialEqualWeightsWIthAlternateAnswer.js +0 -595
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsAllOrNothing.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsAllOrNothingCorrectPointsEqualToAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsAllOrNothingCorrectPointsGreaterThanAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachCell.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachCellAlternatePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachCellCorrectPointsEqualToAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachCellCorrectPointsGreaterThanAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachResponse.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachResponseAlternatePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachResponseCorrectPointsEqualToAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsPartialScoreForEachResponseCorrectPointsGreaterThanAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenCell.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenCellsAlternatePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenCellsCorrectPointsEqualToAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenCellsCorrectPointsGreaterThanAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenResponses.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenResponsesAlternatePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenResponsesCorrectPointsEqualToAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/groupedOptionsTotalScoreDividedBetweenResponsesCorrectPointsGreaterThanAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardAllOrNothing.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardAllOrNothingCorrectPointsEqualToAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardAllOrNothingCorrectPointsGreaterThanAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachCell.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachCellAlternatePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachCellCorrectPointsEqualToAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachCellCorrectPointsGreaterThanAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachResponse.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachResponseAlternatePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachResponseCorrectPointsEqualToAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardPartialScoreForEachResponseCorrectPointsGreaterThanAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenCell.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenCellAlternatePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenCellCorrectPointsEqualToAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenCellCorrectPointsGreaterThanAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenResponse.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenResponseAlternatePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenResponseCorrectPointsEqualToAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesScoringFiles → dragAndDropIntoCategoriesScoring}/standardTotalScoreDividedBetweenResponseCorrectPointsGreaterThanAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/MultipleSelectionGrid/{multipleSelectionGridOptionsAdditionalSettings.js → multipleSelectionAdditionalSettingsGridOptions.js} +0 -0
@@ -0,0 +1,156 @@
|
|
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
|
+
|
8
|
+
describe('Create item page - fill in the gaps over image - dropdown: 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 - dropdown question type');
|
17
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
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
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyWidthInputFieldValue(500);
|
36
|
+
fillInTheGapsOverImageDropdownPage.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
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyWidthInputFieldValue(225);
|
46
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyHeightInputFieldValue(225);
|
47
|
+
});
|
48
|
+
});
|
49
|
+
|
50
|
+
describe('Edit image pop up content - source URL', () => {
|
51
|
+
abortEarlySetup();
|
52
|
+
before(() => {
|
53
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
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 - dropdown question type');
|
73
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
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(fillInTheGapsOverImageDropdownPage.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(fillInTheGapsOverImageDropdownPage.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 - dropdown question type');
|
98
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
99
|
+
cy.barsPreLoaderWait();
|
100
|
+
});
|
101
|
+
|
102
|
+
fillInTheGapsOverImageDropdownPage.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 - dropdown question type');
|
109
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
110
|
+
cy.barsPreLoaderWait();
|
111
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
112
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
113
|
+
});
|
114
|
+
|
115
|
+
fillInTheGapsOverImageDropdownPage.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 - dropdown question type');
|
122
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
123
|
+
cy.barsPreLoaderWait();
|
124
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
125
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
126
|
+
});
|
127
|
+
|
128
|
+
fillInTheGapsOverImageDropdownPage.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 - dropdown question type');
|
135
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
136
|
+
cy.barsPreLoaderWait();
|
137
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
138
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
139
|
+
});
|
140
|
+
|
141
|
+
fillInTheGapsOverImageDropdownPage.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 - dropdown question type');
|
148
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
149
|
+
cy.barsPreLoaderWait();
|
150
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
151
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
152
|
+
});
|
153
|
+
|
154
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyImagePropertiesHeightAndWidthInputFieldInPreviewTab();
|
155
|
+
});
|
156
|
+
});
|
@@ -0,0 +1,165 @@
|
|
1
|
+
import { fillInTheGapsOverImageDropdownPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
|
5
|
+
const optionsForResponse1 = ['Flower', 'Petal', 'Stem', 'Branch'];
|
6
|
+
const optionsForResponse2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
|
7
|
+
const correctTabAnswerArray = ['Flower', 'Leaf'];
|
8
|
+
const incorrectAnswerArray = ['Branch', 'Seed'];
|
9
|
+
|
10
|
+
describe('Create item page - Fill in the gaps over image - dropdown: Manually and Non-scored', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
describe('Question preview: Manually scored', () => {
|
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.barsPreLoaderWait();
|
21
|
+
fillInTheGapsOverImageDropdownPage.steps.addQuestionInstructions();
|
22
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
23
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
24
|
+
fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
|
25
|
+
fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
|
26
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
|
27
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(1, optionsForResponse2);
|
28
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, correctTabAnswerArray[0]);
|
29
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, correctTabAnswerArray[1]);
|
30
|
+
fillInTheGapsOverImageDropdownPage.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored');
|
31
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
32
|
+
});
|
33
|
+
|
34
|
+
it('When user switches to the Preview tab, the question instruction and the response dropdowns should be displayed in the preview tab', () => {
|
35
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionInstructionsText();
|
36
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.responseDropdownPreviewTab(), 2);
|
37
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.responseDropdownPreviewTab(), 'visible');
|
38
|
+
});
|
39
|
+
|
40
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab();
|
41
|
+
});
|
42
|
+
|
43
|
+
describe('Question Preview: Non scored', () => {
|
44
|
+
abortEarlySetup();
|
45
|
+
before(() => {
|
46
|
+
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
47
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
48
|
+
cy.barsPreLoaderWait();
|
49
|
+
fillInTheGapsOverImageDropdownPage.steps.addQuestionInstructions();
|
50
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
51
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
52
|
+
fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
|
53
|
+
fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
|
54
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
|
55
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(1, optionsForResponse2);
|
56
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, correctTabAnswerArray[0]);
|
57
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, correctTabAnswerArray[1]);
|
58
|
+
fillInTheGapsOverImageDropdownPage.steps.selectAScoringTypeFromScoringTypeDropdown('Non scored');
|
59
|
+
fillInTheGapsOverImageDropdownPage.steps.expandAdditonalSettings();
|
60
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
61
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
62
|
+
});
|
63
|
+
|
64
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyShowCorrectAnswerLabelAndCheckboxExistAndPreviewScoreNotExistInPreviewTab();
|
65
|
+
|
66
|
+
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', () => {
|
67
|
+
fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
|
68
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.previewTabCorrectAnswerLabel(), 'Correct answers:');
|
69
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconsDoesNotExist();
|
70
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
71
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectBorderNotExists();
|
72
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[0], correctTabAnswerArray[1]], ['1', '2']);
|
73
|
+
fillInTheGapsOverImageDropdownPage.steps.uncheckShowCorrectAnswerCheckbox();
|
74
|
+
});
|
75
|
+
|
76
|
+
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', () => {
|
77
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
78
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectBorderNotExists();
|
79
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconsDoesNotExist();
|
80
|
+
});
|
81
|
+
|
82
|
+
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 dropdowns, 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', () => {
|
83
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, incorrectAnswerArray[0]);
|
84
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(1, incorrectAnswerArray[1]);
|
85
|
+
fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
|
86
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
87
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
88
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
89
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
|
90
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[0], correctTabAnswerArray[1]], ['1', '2']);
|
91
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
92
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
93
|
+
|
94
|
+
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')
|
95
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
96
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
97
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
98
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
99
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
|
100
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
101
|
+
});
|
102
|
+
|
103
|
+
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 a label \'Incorrect answer\' and incorrect answer border should be displayed below the question preview', () => {
|
104
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
105
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, correctTabAnswerArray[0]);
|
106
|
+
fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
|
107
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
108
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCheckmarkOrCrossmarkNotVisible(1);
|
109
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
110
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
|
111
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[1]], ['2']);
|
112
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
113
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
114
|
+
|
115
|
+
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');
|
116
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
117
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
118
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCheckmarkOrCrossmarkNotVisible(1);
|
119
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
120
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
|
121
|
+
});
|
122
|
+
|
123
|
+
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 a label \'Incorrect answer\' and incorrect answer border should be displayed below the question preview', () => {
|
124
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
125
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, correctTabAnswerArray[0]);
|
126
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(1, incorrectAnswerArray[1]);
|
127
|
+
fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
|
128
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
129
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
130
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
131
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
|
132
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[1]], ['2']);
|
133
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
134
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
135
|
+
|
136
|
+
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')
|
137
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
138
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
139
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
140
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
141
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectAttemptBorder();
|
142
|
+
});
|
143
|
+
|
144
|
+
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, a label \'Correct answer\' and correct answer border should be displayed below the question preview and label and correct answer container should not be displayed', () => {
|
145
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
146
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(0, correctTabAnswerArray[0]);
|
147
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab(1, correctTabAnswerArray[1]);
|
148
|
+
fillInTheGapsOverImageDropdownPage.steps.checkShowCorrectAnswerCheckbox();
|
149
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
150
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
151
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
152
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAttemptBorder();
|
153
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
154
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
155
|
+
|
156
|
+
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')
|
157
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
158
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
159
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
160
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
161
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAttemptBorder();
|
162
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
163
|
+
});
|
164
|
+
});
|
165
|
+
});
|
@@ -0,0 +1,303 @@
|
|
1
|
+
import { fillInTheGapsOverImageDropdownPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
let optionsForResponse = ['Flower', 'Leaf', 'Stem', 'Branch'];
|
7
|
+
|
8
|
+
|
9
|
+
describe('Create item page - Fill in the gaps over image - dropdown: Options for response section contents and cases for set correct answer section and preview tab', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
describe('Options for response section contents', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
cy.log('Navigating to Fill in the gaps over image - dropdown question type');
|
18
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
19
|
+
cy.barsPreLoaderWait();
|
20
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
21
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
22
|
+
fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
|
23
|
+
});
|
24
|
+
|
25
|
+
it('\'Options for response 1\' label should be displayed', () => {
|
26
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.optionsForResponseLabel(), 'Options for response 1');
|
27
|
+
});
|
28
|
+
|
29
|
+
it('By default, 4 \'Options\' input fields should be displayed with placeholder text and drag handle and delete option icon buttons should be displayed besides each input field', () => {
|
30
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyOptionsForResponseContents(0);
|
31
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.optionsForResponseInputField(), 4);
|
32
|
+
});
|
33
|
+
|
34
|
+
it('On hovering over the drag handle of the option, \'Drag to reorder\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the drag handle', () => {
|
35
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyDragHandleButtonTooltip();
|
36
|
+
});
|
37
|
+
|
38
|
+
it('When the user hovers over the enabled \'Delete\' icon buttons then, \'Delete option\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the \'Delete\' icon button', () => {
|
39
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyOptionsForResponseInputFieldDeleteButtonTooltip()
|
40
|
+
});
|
41
|
+
|
42
|
+
it('When user clicks on the \'Delete\' option button then the respective options input field should get deleted, option numeration should change accordingly', () => {
|
43
|
+
fillInTheGapsOverImageDropdownPage.steps.deleteOption(2);
|
44
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyDeleteButtonEnabled();
|
45
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyOptionsForResponseContents(0);
|
46
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.optionsForResponseInputField(), 3)
|
47
|
+
});
|
48
|
+
|
49
|
+
it('When number of options are less than 3, the delete option icon buttons should be displayed in disabled state', () => {
|
50
|
+
fillInTheGapsOverImageDropdownPage.steps.deleteOption(0);
|
51
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyDeleteButtonDisabled();
|
52
|
+
});
|
53
|
+
|
54
|
+
it('When the user hovers over the disabled \'Delete\' icon buttons then, \'Minimum two options are required\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the \'Delete\' icon button', () => {
|
55
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyOptionsForResponseInputFieldDisabledDeleteButtonTooltip();
|
56
|
+
});
|
57
|
+
|
58
|
+
it('CSS of disabled delete button', { tags: 'css' }, () => {
|
59
|
+
fillInTheGapsOverImageDropdownPage.deleteButton()
|
60
|
+
.eq(0)
|
61
|
+
.verifyPseudoClassBeforeProperty('color', css.color.deleteIcon)
|
62
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.deleteButton().eq(1), {
|
63
|
+
'opacity': '0.5'
|
64
|
+
});
|
65
|
+
});
|
66
|
+
|
67
|
+
it('Accessbility of disabled delete button', { tags: 'a11y' }, () => {
|
68
|
+
cy.checkAccessibility(fillInTheGapsOverImageDropdownPage.deleteButton())
|
69
|
+
});
|
70
|
+
|
71
|
+
it('\'Add option\' button should be present', () => {
|
72
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAddOptionButton();
|
73
|
+
});
|
74
|
+
|
75
|
+
it('When user adds a option using the \'Add option\' button then added option should be displayed with drag handle, placeholder text, option numeration and delete button', () => {
|
76
|
+
fillInTheGapsOverImageDropdownPage.steps.addOption();
|
77
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyDeleteButtonEnabled();
|
78
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyOptionsForResponseContents(0);
|
79
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.optionsForResponseInputField(), 3)
|
80
|
+
});
|
81
|
+
|
82
|
+
it('When user focus in and out of any of the \'Option\' input field without typing anything, an error message should be thrown', () => {
|
83
|
+
fillInTheGapsOverImageDropdownPage.steps.focusInAndFocusOutOfOptionsForResponseInputField(0);
|
84
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyOptionsForResponseInputFieldErrorMessage(0);
|
85
|
+
});
|
86
|
+
|
87
|
+
it('CSS of error message', { tags: 'css' }, () => {
|
88
|
+
fillInTheGapsOverImageDropdownPage.optionWrapper()
|
89
|
+
.eq(0)
|
90
|
+
.within(() => {
|
91
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.optionIsRequiredErrorMessage(), {
|
92
|
+
'color': css.color.errorText,
|
93
|
+
'font-size': css.fontSize.small,
|
94
|
+
'font-weight': css.fontWeight.regular
|
95
|
+
});
|
96
|
+
});
|
97
|
+
});
|
98
|
+
|
99
|
+
it('Accessibility of error message', { tags: 'a11y' }, () => {
|
100
|
+
cy.checkAccessibility(fillInTheGapsOverImageDropdownPage.optionIsRequiredErrorMessage())
|
101
|
+
});
|
102
|
+
|
103
|
+
it('When user enters text in Option input field the \'Error: Option is required.\' error message should disappear.', () => {
|
104
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, [optionsForResponse[0]]);
|
105
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyOptionsInputFieldErrorMessageDoesNotExist(0);
|
106
|
+
});
|
107
|
+
|
108
|
+
it('CSS of Options section', { tags: 'css' }, () => {
|
109
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.optionsLabel(), {
|
110
|
+
'color': css.color.sectionHeading,
|
111
|
+
'font-size': css.fontSize.normal,
|
112
|
+
'font-weight': css.fontWeight.semibold
|
113
|
+
});
|
114
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.dragHandleButton(), {
|
115
|
+
'color': css.color.secondaryBtnActive,
|
116
|
+
'font-size': css.fontSize.normal,
|
117
|
+
'font-weight': css.fontWeight.regular
|
118
|
+
});
|
119
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.deleteButton(), {
|
120
|
+
'opacity': '1'
|
121
|
+
});
|
122
|
+
fillInTheGapsOverImageDropdownPage.deleteButton()
|
123
|
+
.verifyPseudoClassBeforeProperty('color', css.color.deleteIcon);
|
124
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.optionsForResponseInputField(), {
|
125
|
+
'color': css.color.text,
|
126
|
+
'font-size': css.fontSize.default,
|
127
|
+
'font-weight': css.fontWeight.regular
|
128
|
+
});
|
129
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.optionNumeration(), {
|
130
|
+
'color': css.color.labels,
|
131
|
+
'font-size': css.fontSize.default,
|
132
|
+
'font-weight': css.fontWeight.semibold
|
133
|
+
});
|
134
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.addOptionButton().find('span'), {
|
135
|
+
'color': css.color.secondaryBtnActive,
|
136
|
+
'font-size': css.fontSize.default,
|
137
|
+
'font-weight': css.fontWeight.regular
|
138
|
+
});
|
139
|
+
});
|
140
|
+
});
|
141
|
+
|
142
|
+
describe('Options cases in Set correct answer section', () => {
|
143
|
+
abortEarlySetup();
|
144
|
+
before(() => {
|
145
|
+
cy.log('Navigating to Fill in the gaps over image - dropdown question type');
|
146
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
147
|
+
cy.barsPreLoaderWait();
|
148
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
149
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
150
|
+
fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
|
151
|
+
});
|
152
|
+
|
153
|
+
it('When user has not entered text in the options input field then the dropdown should be disabled and the user should not be able to expand the dropdown in the \'Set Correct Answer\'', () => {
|
154
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyDisabledResponseDropdownInSetCorrectAnswerSection();
|
155
|
+
});
|
156
|
+
|
157
|
+
it('When the user has not added any options, on hovering over the dropdown, a tooltip \'Please add options\' should be displayed and on focusing away from the dropdown, the tooltip should disappear', () => {
|
158
|
+
fillInTheGapsOverImageDropdownPage.responseDropdownSetCorrectAnswerSection()
|
159
|
+
.verifyTooltip('Please add options');
|
160
|
+
});
|
161
|
+
|
162
|
+
it('CSS of set correct answer section disabled response dropdown', { tags: 'css' }, () => {
|
163
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.responseDropdownSetCorrectAnswerSection(), {
|
164
|
+
'opacity': '1',
|
165
|
+
'border': `1px solid ${css.color.figDefaultComponentBorder}`,
|
166
|
+
'color': css.color.secondaryBtn
|
167
|
+
});
|
168
|
+
});
|
169
|
+
|
170
|
+
it('Accessibility of set correct answer section disabled response dropdown', { tags: 'a11y' }, () => {
|
171
|
+
cy.checkAccessibility(fillInTheGapsOverImageDropdownPage.responseDropdownSetCorrectAnswerSection());
|
172
|
+
});
|
173
|
+
|
174
|
+
it('When user enters a text in options input field then the entered options should be displayed in response dropdown of \'Set Correct Answer\' section', () => {
|
175
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse);
|
176
|
+
fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInSetCorrectAnswerSection(0);
|
177
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownOptions(optionsForResponse);
|
178
|
+
});
|
179
|
+
|
180
|
+
it('CSS of set correct answer section response dropdown in active state', { tags: 'css' }, () => {
|
181
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.responseDropdownOptions(), {
|
182
|
+
'color': css.color.liText,
|
183
|
+
'font-size': css.fontSize.default,
|
184
|
+
'font-weight': css.fontWeight.regular,
|
185
|
+
'background-color': css.color.transparent
|
186
|
+
});
|
187
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.responseDropdownSetCorrectAnswerSection(), {
|
188
|
+
'border': `1px solid ${css.color.activeComponentBorder}`,
|
189
|
+
});
|
190
|
+
});
|
191
|
+
|
192
|
+
it('Accessibility of set correct answer section response dropdown in active state', { tags: 'a11y' }, () => {
|
193
|
+
cy.checkAccessibility(fillInTheGapsOverImageDropdownPage.dropdownList());
|
194
|
+
});
|
195
|
+
|
196
|
+
it('When user deletes an option then the deleted option should not be displayed in response dropdown in \'Set Correct Answer\' section', () => {
|
197
|
+
fillInTheGapsOverImageDropdownPage.steps.deleteOptionInputField(3);
|
198
|
+
cy.log('Checking the deleted option should not exist in the dropdown')
|
199
|
+
fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInSetCorrectAnswerSection(0);
|
200
|
+
let optionsForResponse1 = optionsForResponse.slice(1);
|
201
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownOptions(optionsForResponse1);
|
202
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.responseDropdownOptions(), 3);
|
203
|
+
});
|
204
|
+
|
205
|
+
it('When user adds an option using \'Add Option\' button then the added option should be displayed in response dropdown in \'Set Correct Answer\' section', () => {
|
206
|
+
fillInTheGapsOverImageDropdownPage.steps.addOption();
|
207
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionInputField(3, `${optionsForResponse[3]}`);
|
208
|
+
fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInSetCorrectAnswerSection(0);
|
209
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownOptions(optionsForResponse);
|
210
|
+
});
|
211
|
+
|
212
|
+
it('When the user has added two same options in the options section, only one occurrence of that option should be listed in the dropdown', () => {
|
213
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionInputField(0, `${optionsForResponse[1]}`);
|
214
|
+
fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInSetCorrectAnswerSection(0);
|
215
|
+
let optionsForResponse1 = optionsForResponse.slice(1);
|
216
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownOptions(optionsForResponse1);
|
217
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.responseDropdownOptions(), 3);
|
218
|
+
});
|
219
|
+
});
|
220
|
+
|
221
|
+
describe('Options cases in Preview tab', () => {
|
222
|
+
abortEarlySetup();
|
223
|
+
before(() => {
|
224
|
+
cy.log('Navigating to Fill in the gaps over image - dropdown question type');
|
225
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
226
|
+
cy.barsPreLoaderWait();
|
227
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
228
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
229
|
+
fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
|
230
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
231
|
+
});
|
232
|
+
|
233
|
+
it('When user has not entered text in the options input field then the dropdown should be disabled and the user should not be able to expand the dropdown in the \'preview tab\'', () => {
|
234
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyDisabledResponseDropdownInPreviewTab();
|
235
|
+
});
|
236
|
+
|
237
|
+
it('CSS of preview tab disabled response dropdown', { tags: 'css' }, () => {
|
238
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.responseDropdownPreviewTab(), {
|
239
|
+
'opacity': '1',
|
240
|
+
'border': `1px solid ${css.color.figDefaultComponentBorder}`,
|
241
|
+
'color': css.color.secondaryBtn
|
242
|
+
});
|
243
|
+
});
|
244
|
+
|
245
|
+
it('Accessibility of preview tab disabled response dropdown', { tags: 'a11y' }, () => {
|
246
|
+
cy.checkAccessibility(fillInTheGapsOverImageDropdownPage.responseDropdownPreviewTab());
|
247
|
+
});
|
248
|
+
|
249
|
+
it('When user enters a text in options input field then the entered options should be displayed in response dropdown of \'preview tab\'', () => {
|
250
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
|
251
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse);
|
252
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
253
|
+
fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInPreviewTab(0);
|
254
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownOptions(optionsForResponse);
|
255
|
+
});
|
256
|
+
|
257
|
+
it('CSS of preview tab response dropdown in active state', { tags: 'css' }, () => {
|
258
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.responseDropdownOptions(), {
|
259
|
+
'color': css.color.liText,
|
260
|
+
'font-size': css.fontSize.default,
|
261
|
+
'font-weight': css.fontWeight.regular,
|
262
|
+
'background-color': css.color.transparent
|
263
|
+
});
|
264
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.responseDropdownPreviewTab(), {
|
265
|
+
'border': `1px solid ${css.color.activeComponentBorder}`,
|
266
|
+
});
|
267
|
+
});
|
268
|
+
|
269
|
+
it('Accessibility of preview tab response dropdown in active state', { tags: 'a11y' }, () => {
|
270
|
+
cy.checkAccessibility(fillInTheGapsOverImageDropdownPage.dropdownList());
|
271
|
+
});
|
272
|
+
|
273
|
+
it('When user deletes an option then the deleted option should not be displayed in response dropdown in \'preview tab\'', () => {
|
274
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
|
275
|
+
fillInTheGapsOverImageDropdownPage.steps.deleteOptionInputField(3);
|
276
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
277
|
+
cy.log('Checking the deleted option should not exist in the dropdown')
|
278
|
+
fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInPreviewTab(0);
|
279
|
+
let optionsForResponse1 = optionsForResponse.slice(1);
|
280
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownOptions(optionsForResponse1);
|
281
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.responseDropdownOptions(), 3);
|
282
|
+
});
|
283
|
+
|
284
|
+
it('When user adds an option using \'Add Option\' button then the added option should be displayed in response dropdown in \'preview tab\'', () => {
|
285
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
|
286
|
+
fillInTheGapsOverImageDropdownPage.steps.addOption();
|
287
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionInputField(3, `${optionsForResponse[3]}`);
|
288
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
289
|
+
fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInPreviewTab(0);
|
290
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownOptions(optionsForResponse);
|
291
|
+
});
|
292
|
+
|
293
|
+
it('When the user has added two same options in the options, only one occurrence of that option should be listed in the dropdown', () => {
|
294
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
|
295
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToResponseOptionInputField(0, `${optionsForResponse[1]}`);
|
296
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
297
|
+
fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInPreviewTab(0);
|
298
|
+
let optionsForResponse1 = optionsForResponse.slice(1);
|
299
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownOptions(optionsForResponse1);
|
300
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.responseDropdownOptions(), 3);
|
301
|
+
});
|
302
|
+
});
|
303
|
+
});
|