itemengine-cypress-automation 1.0.51 → 1.0.62
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/fillInTheGapsOverImageDropdownAdditionalSettingsBasic.js +222 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAdditionalSettingsResponseAccordions.js +366 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAdditionalSettingsStudentResponseAndLayout.js +206 -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
@@ -0,0 +1,204 @@
|
|
1
|
+
import { highlightPage } from "../../../pages/highlightPage";
|
2
|
+
import utilities from "../../../support/helpers/utilities";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
|
5
|
+
const paragraphTextArray = ['Horses cannot breath through their mouth. Cows can sleep standing up.', 'Dogs have excellent hearing.', 'Deers possess nearly 300 degree field of vision.'];
|
6
|
+
|
7
|
+
describe('Create Item page - Highlight: Set correct answer, Alternate correct answer - Edit tab cases', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Set correct answer section', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
cy.log('Navigating to highlight question type, switch to paragraph text selection');
|
16
|
+
highlightPage.steps.navigateToCreateQuestion('highlight');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
highlightPage.steps.clearQuestionInputField();
|
19
|
+
paragraphTextArray.forEach((paragraphText) => {
|
20
|
+
highlightPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
21
|
+
});
|
22
|
+
highlightPage.steps.addInputToQuestionInputField('{backspace}');
|
23
|
+
highlightPage.steps.switchTextSelectionTypeInTextSelectionDropdown('Paragraph');
|
24
|
+
});
|
25
|
+
|
26
|
+
highlightPage.tests.verifyAutoScoredSetCorrectAnswerHeaderSectionContents('highlight');
|
27
|
+
|
28
|
+
it('When user clicks on add alternate answer button without allotting points in the \'Set correct answer\' then a warning popup should be displayed', () => {
|
29
|
+
highlightPage.steps.clickOnAddAlternateAnswerButton();
|
30
|
+
utilities.verifyElementVisibilityState(highlightPage.dialogBox(), 'exist');
|
31
|
+
});
|
32
|
+
|
33
|
+
it('When user closes the warning popup \'Error: Please enter points\' and \'Error: Please set correct answer\' error message should be displayed', () => {
|
34
|
+
highlightPage.steps.closeWarningPopup();
|
35
|
+
highlightPage.steps.verifyPointsFieldErrorMessage()
|
36
|
+
highlightPage.steps.verifySetCorrectAnswerSectionErrorMessage()
|
37
|
+
highlightPage.steps.verifySetCorrectAnswerErrorIconIsDisplayed();
|
38
|
+
});
|
39
|
+
|
40
|
+
it('When user allots points and sets correct answer then the error messages and error icon should disappear', () => {
|
41
|
+
highlightPage.steps.allotPoints(10);
|
42
|
+
highlightPage.steps.selectOptionInSetCorrectAnswerSection(paragraphTextArray[2]);
|
43
|
+
highlightPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
44
|
+
highlightPage.steps.verifyErrorMessageIsNotDisplayed();
|
45
|
+
cy.log('Post step: Clear points field')
|
46
|
+
highlightPage.steps.clearPointsField();
|
47
|
+
});
|
48
|
+
|
49
|
+
highlightPage.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty('Correct tab');
|
50
|
+
});
|
51
|
+
|
52
|
+
describe('Alternate correct answer', () => {
|
53
|
+
abortEarlySetup();
|
54
|
+
before(() => {
|
55
|
+
cy.log('Navigating to highlight question type, switch to paragraph text selection');
|
56
|
+
highlightPage.steps.navigateToCreateQuestion('highlight');
|
57
|
+
cy.barsPreLoaderWait();
|
58
|
+
highlightPage.steps.clearQuestionInputField();
|
59
|
+
paragraphTextArray.forEach((paragraphText) => {
|
60
|
+
highlightPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
61
|
+
});
|
62
|
+
highlightPage.steps.addInputToQuestionInputField('{backspace}');
|
63
|
+
highlightPage.steps.switchTextSelectionTypeInTextSelectionDropdown('Paragraph');
|
64
|
+
});
|
65
|
+
|
66
|
+
highlightPage.tests.verifyAutoScoredAlternateAnswer('highlight');
|
67
|
+
|
68
|
+
it('When the user allots points to the \'Correct tab\' and selects correct answer option in the \'Set correct answer\' section then on clicking the \'Alternate tab\' button an alternate tab should be added', () => {
|
69
|
+
highlightPage.steps.allotPoints(10);
|
70
|
+
highlightPage.steps.selectOptionInSetCorrectAnswerSection(paragraphTextArray[2]);
|
71
|
+
highlightPage.steps.verifyErrorMessageIsNotDisplayed();
|
72
|
+
highlightPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
73
|
+
highlightPage.steps.addAlternateTab(1);
|
74
|
+
});
|
75
|
+
|
76
|
+
it('When the user adds an alternate tab then the options should be displayed in the set correct answer section', () => {
|
77
|
+
highlightPage.steps.verifyOptionsInSetCorrectAnswerSection(paragraphTextArray);
|
78
|
+
});
|
79
|
+
|
80
|
+
it('CSS of Alternate correct answer tab', { tags: 'css' }, () => {
|
81
|
+
utilities.verifyCSS(highlightPage.alternateAnswerTab(1), {
|
82
|
+
'color': css.color.secondaryBtnActive,
|
83
|
+
'font-size': css.fontSize.default,
|
84
|
+
'font-weight': css.fontWeight.bold
|
85
|
+
});
|
86
|
+
cy.log('CSS of inactive Correct answer tab')
|
87
|
+
utilities.verifyCSS(highlightPage.correctTab(), {
|
88
|
+
'color': css.color.labels,
|
89
|
+
'font-size': css.fontSize.default,
|
90
|
+
'font-weight': css.fontWeight.bold
|
91
|
+
});
|
92
|
+
});
|
93
|
+
|
94
|
+
it('Accessibility of alternate correct answer tab', { tags: 'a11y' }, () => {
|
95
|
+
cy.checkAccessibility(highlightPage.correctTab().parents('[class*="AlternatePointsComponentstyles__AnswerTabWrapper"]'));
|
96
|
+
});
|
97
|
+
|
98
|
+
it('User should be able set correct answer in the \'Alternate tab\'s', () => {
|
99
|
+
highlightPage.steps.allotPoints(5)
|
100
|
+
highlightPage.steps.selectOptionInSetCorrectAnswerSection(paragraphTextArray[1]);
|
101
|
+
});
|
102
|
+
|
103
|
+
it('When user switches to the \'Correct tab\' from the \'Alternate tab\' the selected options in the \'Correct tab\' should remain the same', () => {
|
104
|
+
highlightPage.steps.navigateToCorrectTab();
|
105
|
+
highlightPage.steps.verifyOptionIsNotSelectedInSetCorrectAnswerSection(paragraphTextArray[0]);
|
106
|
+
highlightPage.steps.verifyOptionIsNotSelectedInSetCorrectAnswerSection(paragraphTextArray[1]);
|
107
|
+
highlightPage.steps.verifyOptionIsSelectedInSetCorrectAnswerSection(paragraphTextArray[2]);
|
108
|
+
});
|
109
|
+
|
110
|
+
it('When user clicks on \'Add Alternate Answer\' button a new tab should be added with the name \'Alternate 2\' and appropriate options should be displayed in the set correct answer section', () => {
|
111
|
+
highlightPage.steps.addAlternateTab(2);
|
112
|
+
highlightPage.steps.verifyOptionsInSetCorrectAnswerSection(paragraphTextArray);
|
113
|
+
});
|
114
|
+
|
115
|
+
highlightPage.tests.verifyWarningPopupAndTabNavigationWhenNoPointsAddedInAlternateTab();
|
116
|
+
|
117
|
+
it('When the user clicks on the \'Close\' button alongside alternate answer tab, alternate answer tab should get removed and the name of the alternate answer tabs should get updated and correct answers should be displayed accordingly', () => {
|
118
|
+
cy.log('Set correct answer and points in alternate 2 tab, then switch to Alternate 1 tab and click delete icon button');
|
119
|
+
highlightPage.steps.allotPoints(2);
|
120
|
+
highlightPage.steps.selectOptionInSetCorrectAnswerSection(paragraphTextArray[0]);
|
121
|
+
highlightPage.steps.navigateToAlternateTab(1);
|
122
|
+
highlightPage.steps.deleteAlternateTab();
|
123
|
+
utilities.verifyElementVisibilityState(highlightPage.alternateAnswerTab(2), 'notExist');
|
124
|
+
utilities.verifyInnerText(highlightPage.alternateAnswerTab(1), 'Alternate 1')
|
125
|
+
highlightPage.steps.verifyOptionIsSelectedInSetCorrectAnswerSection(paragraphTextArray[0]);
|
126
|
+
});
|
127
|
+
|
128
|
+
it('When user deletes/edits a selected correct option in the question field, then \'Reset\' Popup should be displayed with the text \'Are you sure you want to edit the question? This action will reset any existing highlight options, including valid responses and alternate response values.\', Cancel and Confirm button', () => {
|
129
|
+
highlightPage.steps.addInputToQuestionInputField('{backspace}{backspace}{backspace}');
|
130
|
+
utilities.verifyElementVisibilityState(highlightPage.dialogBox(), 'visible');
|
131
|
+
utilities.verifyInnerText(highlightPage.dialogBoxTitle(), 'Reset');
|
132
|
+
utilities.verifyInnerText(highlightPage.dialogBoxContent(), 'Are you sure you want to edit the question? This action will reset any existing highlight options, including valid responses and alternate response values.');
|
133
|
+
utilities.verifyInnerText(highlightPage.buttonReject(), 'Cancel');
|
134
|
+
utilities.verifyInnerText(highlightPage.buttonAccept(), 'Confirm');
|
135
|
+
});
|
136
|
+
|
137
|
+
it('CSS of Reset popup', { tags: 'css' }, () => {
|
138
|
+
utilities.verifyCSS(highlightPage.dialogBoxTitle().find('span'), {
|
139
|
+
'color': css.color.flyoutTitle,
|
140
|
+
'font-size': css.fontSize.default,
|
141
|
+
'font-weight': css.fontWeight.bold
|
142
|
+
});
|
143
|
+
utilities.verifyCSS(highlightPage.dialogBoxContent(), {
|
144
|
+
'color': css.color.labels,
|
145
|
+
'font-size': css.fontSize.default,
|
146
|
+
'font-weight': css.fontWeight.regular
|
147
|
+
});
|
148
|
+
utilities.verifyCSS(highlightPage.buttonAccept(), {
|
149
|
+
'color': css.color.primaryBtn,
|
150
|
+
'font-size': css.fontSize.default,
|
151
|
+
'font-weight': css.fontWeight.regular,
|
152
|
+
'background-color': css.color.primaryBtnBg
|
153
|
+
});
|
154
|
+
utilities.verifyCSS(highlightPage.buttonReject(), {
|
155
|
+
'color': css.color.secondaryBtn,
|
156
|
+
'font-size': css.fontSize.default,
|
157
|
+
'font-weight': css.fontWeight.regular,
|
158
|
+
'background-color': css.color.secondaryBtnBg
|
159
|
+
});
|
160
|
+
});
|
161
|
+
|
162
|
+
it('Accessibility of Reset popup', { tags: 'a11y' }, () => {
|
163
|
+
cy.checkAccessibility(highlightPage.dialogBox());
|
164
|
+
});
|
165
|
+
|
166
|
+
it('When user clicks on \'Cancel\' button of the Reset popup, then the popup should be closed, the text in the question field should not be changed, the previously selected options in the set correct answer section for both correct and alternate tab should persist and no error message and error icon should be displayed', () => {
|
167
|
+
highlightPage.steps.clickOnRejectButtonInDialogBox();
|
168
|
+
utilities.verifyElementVisibilityState(highlightPage.dialogBox(), 'notExist');
|
169
|
+
utilities.verifyInnerText(highlightPage.questionInputField(), 'Horses cannot breath through their mouth. Cows can sleep standing up.\n\nDogs have excellent hearing.\n\nDeers possess nearly 300 degree field of vision.');
|
170
|
+
cy.log('For alternate answer tab');
|
171
|
+
highlightPage.steps.verifyOptionIsSelectedInSetCorrectAnswerSection(paragraphTextArray[0]);
|
172
|
+
utilities.verifyElementVisibilityState(highlightPage.errorMessage(), 'notExist');
|
173
|
+
utilities.verifyElementVisibilityState(highlightPage.setCorrectAnswerErrorIcon(), 'notExist');
|
174
|
+
cy.log('For correct answer tab');
|
175
|
+
highlightPage.steps.navigateToCorrectTab();
|
176
|
+
highlightPage.steps.verifyOptionIsSelectedInSetCorrectAnswerSection(paragraphTextArray[2]);
|
177
|
+
utilities.verifyElementVisibilityState(highlightPage.errorMessage(), 'notExist');
|
178
|
+
utilities.verifyElementVisibilityState(highlightPage.setCorrectAnswerErrorIcon(), 'notExist');
|
179
|
+
});
|
180
|
+
|
181
|
+
it('When user clicks on \'Confirm\' button of the Reset popup, then the popup should be closed, the text in the question field should be changed, the previously selected options in the set correct answer section should not persist i.e. all options should be deselected in both correct and alternate tab and error message \'Error: Please set a correct answer\' and error icon over the correct/alternate tab should be displayed', () => {
|
182
|
+
cy.log('Pre-step: Editing the text in question input field to again open the reset popup');
|
183
|
+
highlightPage.steps.addInputToQuestionInputField('{backspace}{backspace}{backspace}');
|
184
|
+
utilities.verifyElementVisibilityState(highlightPage.dialogBox(), 'visible');
|
185
|
+
highlightPage.steps.clickOnAcceptButtonInDialogBox();
|
186
|
+
utilities.verifyElementVisibilityState(highlightPage.dialogBox(), 'notExist');
|
187
|
+
utilities.verifyInnerText(highlightPage.questionInputField(), 'Horses cannot breath through their mouth. Cows can sleep standing up.\n\nDogs have excellent hearing.\n\nDeers possess nearly 300 degree field of visi');
|
188
|
+
cy.log('For correct answer tab');
|
189
|
+
paragraphTextArray.forEach((paragraphText) => {
|
190
|
+
highlightPage.steps.verifyOptionIsNotSelectedInSetCorrectAnswerSection(paragraphText);
|
191
|
+
});
|
192
|
+
utilities.verifyInnerText(highlightPage.errorMessage(), 'Error: Please set a correct answer.');
|
193
|
+
utilities.verifyElementVisibilityState(highlightPage.setCorrectAnswerErrorIcon(), 'visible');
|
194
|
+
cy.log('Pre-step: Selecting an option in correct tab to navigate to alternate answer tab');
|
195
|
+
highlightPage.steps.selectOptionInSetCorrectAnswerSection(paragraphTextArray[2]);
|
196
|
+
highlightPage.steps.navigateToAlternateTab(1);
|
197
|
+
paragraphTextArray.forEach((paragraphText) => {
|
198
|
+
highlightPage.steps.verifyOptionIsNotSelectedInSetCorrectAnswerSection(paragraphText);
|
199
|
+
});
|
200
|
+
utilities.verifyInnerText(highlightPage.errorMessage(), 'Error: Please set a correct answer.');
|
201
|
+
utilities.verifyElementVisibilityState(highlightPage.setCorrectAnswerErrorIcon(), 'visible');
|
202
|
+
});
|
203
|
+
});
|
204
|
+
});
|
@@ -0,0 +1,175 @@
|
|
1
|
+
import { highlightPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create Item page - Highlight: Text selection label and dropdown and Highlight Options section', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Text selection label and dropdown', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigating to Highlight question type');
|
15
|
+
highlightPage.steps.navigateToCreateQuestion('highlight');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
});
|
18
|
+
|
19
|
+
it('\'Text selection\' label should be displayed and dropdown should be displayed and in \'Text selection\' dropdown \'Any\' option should be selected by default', () => {
|
20
|
+
utilities.verifyInnerText(highlightPage.textSelectionLabel(), 'Text selection');
|
21
|
+
utilities.verifyInnerText(highlightPage.textSelectionDropdown(), 'Any');
|
22
|
+
});
|
23
|
+
|
24
|
+
it('Clicking on Text selection dropdown should open a list of selection types - Any, Paragraph, Sentence, Word and on clicking outside the dropdown, the dropdown menu should close', () => {
|
25
|
+
highlightPage.steps.expandTextSelectionDropdown();
|
26
|
+
highlightPage.steps.verifyTextSelectionDropdownList();
|
27
|
+
highlightPage.steps.closeTextSelectionDropdown();
|
28
|
+
});
|
29
|
+
|
30
|
+
it('CSS of Text selection label and dropdown in Active state', { tags: 'css' }, () => {
|
31
|
+
cy.log('Pre step: Clicking on Text selection dropdown')
|
32
|
+
highlightPage.steps.expandTextSelectionDropdown();
|
33
|
+
utilities.verifyCSS(highlightPage.textSelectionLabel(), {
|
34
|
+
'color': css.color.sectionHeading,
|
35
|
+
'font-size': css.fontSize.normal,
|
36
|
+
'font-weight': css.fontWeight.semibold
|
37
|
+
});
|
38
|
+
utilities.verifyCSS(highlightPage.textSelectionDropdownListOptions().eq(0), {
|
39
|
+
'color': css.color.liText,
|
40
|
+
'font-size': css.fontSize.default,
|
41
|
+
'font-weight': css.fontWeight.regular,
|
42
|
+
'background-color': css.color.liTextSelectedBg
|
43
|
+
});
|
44
|
+
utilities.verifyCSS(highlightPage.textSelectionDropdownListOptions().eq(1), {
|
45
|
+
'background-color': css.color.transparent
|
46
|
+
});
|
47
|
+
cy.log('Post step: Closing the Text selection dropdown')
|
48
|
+
highlightPage.steps.closeTextSelectionDropdown();
|
49
|
+
});
|
50
|
+
|
51
|
+
it('Accessibility of Text selection dropdown in active state', { tags: 'a11y' }, () => {
|
52
|
+
cy.log('Pre step: Clicking on Text selection dropdown')
|
53
|
+
highlightPage.steps.expandTextSelectionDropdown();
|
54
|
+
cy.checkAccessibility(highlightPage.textSelectionDropdownList());
|
55
|
+
cy.log('Post step: Closing the Text selection dropdown')
|
56
|
+
highlightPage.steps.closeTextSelectionDropdown();
|
57
|
+
});
|
58
|
+
|
59
|
+
//Reset confirmation popup for changing text selection type
|
60
|
+
it('When user switches to \'Paragraph\' in text selection dropdown, then Reset popup should be displayed with the text \'Applying Paragraph text selection will reset any existing highlight options, including valid responses and alternate response values.\', Cancel and Confirm button', () => {
|
61
|
+
highlightPage.steps.expandTextSelectionDropdown();
|
62
|
+
highlightPage.steps.selectDropdownOptionInTextSelectionDropdown('Paragraph');
|
63
|
+
highlightPage.steps.verifyResetPopupForSwitchingTextSelectionType('Paragraph');
|
64
|
+
});
|
65
|
+
|
66
|
+
it('CSS of Reset popup', { tags: 'css' }, () => {
|
67
|
+
utilities.verifyCSS(highlightPage.dialogBoxTitle().find('span'), {
|
68
|
+
'color': css.color.flyoutTitle,
|
69
|
+
'font-size': css.fontSize.default,
|
70
|
+
'font-weight': css.fontWeight.bold
|
71
|
+
});
|
72
|
+
utilities.verifyCSS(highlightPage.dialogBoxContent(), {
|
73
|
+
'color': css.color.labels,
|
74
|
+
'font-size': css.fontSize.default,
|
75
|
+
'font-weight': css.fontWeight.regular
|
76
|
+
});
|
77
|
+
utilities.verifyCSS(highlightPage.dialogBoxContent().find('span'), {
|
78
|
+
'color': css.color.labels,
|
79
|
+
'font-size': css.fontSize.default,
|
80
|
+
'font-weight': css.fontWeight.bold
|
81
|
+
});
|
82
|
+
utilities.verifyCSS(highlightPage.buttonAccept(), {
|
83
|
+
'color': css.color.primaryBtn,
|
84
|
+
'font-size': css.fontSize.default,
|
85
|
+
'font-weight': css.fontWeight.regular,
|
86
|
+
'background-color': css.color.primaryBtnBg
|
87
|
+
});
|
88
|
+
utilities.verifyCSS(highlightPage.buttonReject(), {
|
89
|
+
'color': css.color.secondaryBtn,
|
90
|
+
'font-size': css.fontSize.default,
|
91
|
+
'font-weight': css.fontWeight.regular,
|
92
|
+
'background-color': css.color.secondaryBtnBg
|
93
|
+
});
|
94
|
+
});
|
95
|
+
|
96
|
+
it('Accessibility of Reset popup', { tags: 'a11y' }, () => {
|
97
|
+
cy.checkAccessibility(highlightPage.dialogBox());
|
98
|
+
});
|
99
|
+
|
100
|
+
it('When user clicks on \'Cancel\' button of the Reset popup, then the popup should be closed and the text selection \'Any\' should persist in the text selection dropdown', () => {
|
101
|
+
highlightPage.steps.clickOnRejectButtonInDialogBox();
|
102
|
+
utilities.verifyElementVisibilityState(highlightPage.dialogBox(), 'notExist');
|
103
|
+
utilities.verifyInnerText(highlightPage.textSelectionDropdown(), 'Any');
|
104
|
+
});
|
105
|
+
|
106
|
+
|
107
|
+
it('When user clicks on \'Confirm\' button of the Reset popup, then the popup should be closed and \'Paragraph\' should be displayed in text selection dropdown', () => {
|
108
|
+
cy.log('Pre-step: Switching text selection type to open Reset popup');
|
109
|
+
highlightPage.steps.expandTextSelectionDropdown();
|
110
|
+
highlightPage.steps.selectDropdownOptionInTextSelectionDropdown('Paragraph');
|
111
|
+
highlightPage.steps.clickOnAcceptButtonInDialogBox();
|
112
|
+
utilities.verifyElementVisibilityState(highlightPage.dialogBox(), 'notExist');
|
113
|
+
utilities.verifyInnerText(highlightPage.textSelectionDropdown(), 'Paragraph');
|
114
|
+
});
|
115
|
+
});
|
116
|
+
|
117
|
+
describe('Highlight Options section', () => {
|
118
|
+
abortEarlySetup();
|
119
|
+
before(() => {
|
120
|
+
highlightPage.steps.navigateToCreateQuestion('highlight');
|
121
|
+
cy.barsPreLoaderWait();
|
122
|
+
});
|
123
|
+
|
124
|
+
it('\'Highlight options\' label and field with Highlight counter, \'Colour library\' and \'Clear\' buttons should be displayed and by default in the \'Highlight options\' field, sample \'Lorem Ipsum\' text should be present and the Highlight counter should be 0', () => {
|
125
|
+
utilities.verifyInnerText(highlightPage.highlightOptionsLabel(), 'Highlight options');
|
126
|
+
utilities.verifyInnerText(highlightPage.highlightOptionsSectionTextWrapper(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n \n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n \n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
|
127
|
+
highlightPage.steps.verifyHighlightCounterTextAndValue(0);
|
128
|
+
});
|
129
|
+
|
130
|
+
it('\'Colour library\' and \'Clear\' buttons should be displayed', () => {
|
131
|
+
highlightPage.steps.verifyColorLibraryButton();
|
132
|
+
highlightPage.steps.verifyClearHighlightButton();
|
133
|
+
});
|
134
|
+
|
135
|
+
it('CSS of Highlight Options section, Colour library button and Clear Button', { tags: 'css' }, () => {
|
136
|
+
utilities.verifyCSS(highlightPage.highlightOptionsLabel(), {
|
137
|
+
'color': css.color.sectionHeading,
|
138
|
+
'font-size': css.fontSize.normal,
|
139
|
+
'font-weight': css.fontWeight.semibold
|
140
|
+
});
|
141
|
+
utilities.verifyCSS(highlightPage.colorLibraryButton(), {
|
142
|
+
'color': css.color.activeButtons,
|
143
|
+
'font-size': css.fontSize.default,
|
144
|
+
'font-weight': css.fontWeight.medium
|
145
|
+
});
|
146
|
+
utilities.verifyCSS(highlightPage.colorLibraryButton().find('svg'), {
|
147
|
+
'fill': css.color.activeButtons
|
148
|
+
});
|
149
|
+
utilities.verifyCSS(highlightPage.clearHighlightButton(), {
|
150
|
+
'color': css.color.activeButtons,
|
151
|
+
'font-size': css.fontSize.default,
|
152
|
+
'font-weight': css.fontWeight.medium
|
153
|
+
});
|
154
|
+
utilities.verifyCSS(highlightPage.clearHighlightButton().find('svg'), {
|
155
|
+
'fill': css.color.activeButtons
|
156
|
+
});
|
157
|
+
utilities.verifyCSS(highlightPage.highlightOptionsTextFieldWrapper(), {
|
158
|
+
'border': `1px solid ${css.color.figDefaultComponentBorder}`
|
159
|
+
});
|
160
|
+
utilities.verifyCSS(highlightPage.highlightOptionsHighlightCounter(), {
|
161
|
+
'color': css.color.labels,
|
162
|
+
'font-size': css.fontSize.small,
|
163
|
+
'font-weight': css.fontWeight.regular,
|
164
|
+
'background-color': `${css.color.figActiveComponentBg}`,
|
165
|
+
'border-top': `1px solid ${css.color.figDefaultComponentBorder}`,
|
166
|
+
'border-left': `1px solid ${css.color.figDefaultComponentBorder}`
|
167
|
+
});
|
168
|
+
});
|
169
|
+
|
170
|
+
it('Accessibility of Highlight Options section, Colour library button and Clear Button', { tags: 'a11y' }, () => {
|
171
|
+
cy.checkAccessibility(highlightPage.highlightOptionsLabel().parents('.title-button-wrapper'));
|
172
|
+
cy.checkAccessibility(highlightPage.highlightOptionsTextFieldWrapper());
|
173
|
+
});
|
174
|
+
});
|
175
|
+
});
|
@@ -0,0 +1,237 @@
|
|
1
|
+
import { highlightPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const paragraphTextArray = ['Horses cannot breat& through their mouth! Cows can sleep standing up?', 'Dogs have e#cellent \'hearing\'.', 'Deers possess nearly, 300 degree field of vision.'];
|
7
|
+
const sentenceTextArray = ['Horses cannot breat& through their mouth!', 'Cows can sleep standing up?', 'Dogs have e#cellent \'hearing\'.', 'Deers possess nearly, 300 degree field of vision.'];
|
8
|
+
const wordTextArray = ['Horses', 'cannot', 'breat&', 'through', 'their', 'mouth', 'Cows', 'can', 'sleep', 'standing', 'up', 'Dogs', 'have', 'e#cellent', 'hearing', 'Deers', 'possess', 'nearly', '300', 'degree', 'field', 'of', 'vision'];
|
9
|
+
const anySelectionArray = ['Cows can sleep', 'Dogs have e#cellent \'hearing\'', 'nearly, 300 degree field of vision.'];
|
10
|
+
|
11
|
+
|
12
|
+
describe('Create Item page - Highlight: Text selection types in Preview tab', () => {
|
13
|
+
before(() => {
|
14
|
+
cy.loginAs('admin');
|
15
|
+
});
|
16
|
+
|
17
|
+
describe('Preview tab: Any', () => {
|
18
|
+
abortEarlySetup();
|
19
|
+
before(() => {
|
20
|
+
cy.log('Navigating to Highlight question type');
|
21
|
+
highlightPage.steps.navigateToCreateQuestion('highlight');
|
22
|
+
cy.barsPreLoaderWait();
|
23
|
+
highlightPage.steps.clearQuestionInputField();
|
24
|
+
paragraphTextArray.forEach((paragraphText) => {
|
25
|
+
highlightPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
26
|
+
});
|
27
|
+
highlightPage.steps.addInputToQuestionInputField('{backspace}');
|
28
|
+
highlightPage.steps.selectOptionInHighlightOptionsSection('Any', anySelectionArray[0]);
|
29
|
+
highlightPage.steps.selectOptionInHighlightOptionsSection('Any', anySelectionArray[1]);
|
30
|
+
highlightPage.steps.selectOptionInHighlightOptionsSection('Any', anySelectionArray[2]);
|
31
|
+
highlightPage.steps.switchToPreviewTab();
|
32
|
+
});
|
33
|
+
|
34
|
+
it('When \'Any\' text selection type is selected, then in preview tab options should be provided as defined in highlight options section', () => {
|
35
|
+
utilities.verifyElementCount(highlightPage.previewTabParagraphs(), 3);
|
36
|
+
highlightPage.steps.verifyOptionInPreviewTab(anySelectionArray);
|
37
|
+
});
|
38
|
+
|
39
|
+
it('When the user hovers over the provided option in preview tab, then that option should be displayed in hover state', () => {
|
40
|
+
highlightPage.steps.verifyHoverStateOfOptionInPreviewTab(anySelectionArray[0]);
|
41
|
+
});
|
42
|
+
|
43
|
+
it('When user clicks on the provided option in preview tab, then the option should be selected ', () => {
|
44
|
+
highlightPage.steps.selectOptionInPreviewTab(anySelectionArray[0]);
|
45
|
+
});
|
46
|
+
|
47
|
+
it('CSS of the option in selected and deselected state in preview tab', { tags: 'css' }, () => {
|
48
|
+
utilities.verifyCSS(highlightPage.previewTabOption().contains(anySelectionArray[0]), {
|
49
|
+
'color': css.color.text,
|
50
|
+
'font-size': css.fontSize.default,
|
51
|
+
'font-weight': css.fontWeight.regular,
|
52
|
+
'background-color': css.color.figActiveComponentBg,
|
53
|
+
'border': `1px solid ${css.color.activeComponentBorder}`
|
54
|
+
});
|
55
|
+
utilities.verifyCSS(highlightPage.previewTabOption().contains(anySelectionArray[1]), {
|
56
|
+
'color': css.color.text,
|
57
|
+
'font-size': css.fontSize.default,
|
58
|
+
'font-weight': css.fontWeight.regular,
|
59
|
+
'background-color': css.color.transparent
|
60
|
+
});
|
61
|
+
});
|
62
|
+
|
63
|
+
it('Accessibility of options in preview tab', { tags: 'a11y' }, () => {
|
64
|
+
cy.checkAccessibility(highlightPage.previewTabOption().parents('.highlight-preview-wrapper'));
|
65
|
+
});
|
66
|
+
|
67
|
+
it('When user clicks on the selected option in preview tab, the option should then be deselected', () => {
|
68
|
+
highlightPage.steps.deselectOptionInPreviewTab(anySelectionArray[0]);
|
69
|
+
});
|
70
|
+
});
|
71
|
+
|
72
|
+
describe('Preview tab: Paragraph', () => {
|
73
|
+
abortEarlySetup();
|
74
|
+
before(() => {
|
75
|
+
cy.log('Navigating to Highlight question type');
|
76
|
+
highlightPage.steps.navigateToCreateQuestion('highlight');
|
77
|
+
cy.barsPreLoaderWait();
|
78
|
+
highlightPage.steps.clearQuestionInputField();
|
79
|
+
paragraphTextArray.forEach((paragraphText) => {
|
80
|
+
highlightPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
81
|
+
});
|
82
|
+
highlightPage.steps.addInputToQuestionInputField('{backspace}');
|
83
|
+
highlightPage.steps.switchTextSelectionTypeInTextSelectionDropdown('Paragraph');
|
84
|
+
highlightPage.steps.deselectOptionInHighlightOptionsSection('Paragraph', paragraphTextArray[2]);
|
85
|
+
highlightPage.steps.switchToPreviewTab();
|
86
|
+
});
|
87
|
+
|
88
|
+
it('When \'Paragraph\' text selection type is selected, then in preview tab options should be provided as defined in highlight options section', () => {
|
89
|
+
utilities.verifyElementCount(highlightPage.previewTabParagraphs(), 3);
|
90
|
+
utilities.verifyElementCount(highlightPage.previewTabSpans(), 3);
|
91
|
+
highlightPage.steps.verifyOptionInPreviewTab([paragraphTextArray[0], paragraphTextArray[1]]);
|
92
|
+
});
|
93
|
+
|
94
|
+
it('When the user hovers over the provided option in preview tab, then that option should be displayed in hover state', () => {
|
95
|
+
highlightPage.steps.verifyHoverStateOfOptionInPreviewTab(paragraphTextArray[0]);
|
96
|
+
});
|
97
|
+
|
98
|
+
it('When user clicks on the provided option in preview tab, then the option should be selected ', () => {
|
99
|
+
highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
|
100
|
+
});
|
101
|
+
|
102
|
+
it('CSS of the option in selected and deselected state in preview tab', { tags: 'css' }, () => {
|
103
|
+
utilities.verifyCSS(highlightPage.previewTabOption().contains(paragraphTextArray[0]), {
|
104
|
+
'color': css.color.text,
|
105
|
+
'font-size': css.fontSize.default,
|
106
|
+
'font-weight': css.fontWeight.regular,
|
107
|
+
'background-color': css.color.figActiveComponentBg,
|
108
|
+
'border': `1px solid ${css.color.activeComponentBorder}`
|
109
|
+
});
|
110
|
+
utilities.verifyCSS(highlightPage.previewTabOption().contains(paragraphTextArray[1]), {
|
111
|
+
'color': css.color.text,
|
112
|
+
'font-size': css.fontSize.default,
|
113
|
+
'font-weight': css.fontWeight.regular,
|
114
|
+
'background-color': css.color.transparent
|
115
|
+
});
|
116
|
+
});
|
117
|
+
|
118
|
+
it('Accessibility of response options in preview tab', { tags: 'a11y' }, () => {
|
119
|
+
cy.checkAccessibility(highlightPage.previewTabOption().parents('.highlight-preview-wrapper'));
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When user clicks on the selected option in preview tab, the option should then be deselected', () => {
|
123
|
+
highlightPage.steps.deselectOptionInPreviewTab(paragraphTextArray[0]);
|
124
|
+
});
|
125
|
+
});
|
126
|
+
|
127
|
+
describe('Preview tab: Sentence', () => {
|
128
|
+
abortEarlySetup();
|
129
|
+
before(() => {
|
130
|
+
cy.log('Navigating to Highlight question type');
|
131
|
+
highlightPage.steps.navigateToCreateQuestion('highlight');
|
132
|
+
cy.barsPreLoaderWait();
|
133
|
+
highlightPage.steps.clearQuestionInputField();
|
134
|
+
paragraphTextArray.forEach((paragraphText) => {
|
135
|
+
highlightPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
136
|
+
});
|
137
|
+
highlightPage.steps.addInputToQuestionInputField('{backspace}');
|
138
|
+
highlightPage.steps.switchTextSelectionTypeInTextSelectionDropdown('Sentence');
|
139
|
+
highlightPage.steps.deselectOptionInHighlightOptionsSection('Sentence', sentenceTextArray[0]);
|
140
|
+
highlightPage.steps.switchToPreviewTab();
|
141
|
+
});
|
142
|
+
|
143
|
+
it('When \'Sentence\' text selection type is selected, then in preview tab options should be provided as defined in highlight options section', () => {
|
144
|
+
utilities.verifyElementCount(highlightPage.previewTabParagraphs(), 3);
|
145
|
+
utilities.verifyElementCount(highlightPage.previewTabOption(), 3);
|
146
|
+
highlightPage.steps.verifyOptionInPreviewTab([sentenceTextArray[1], sentenceTextArray[2], sentenceTextArray[3]]);
|
147
|
+
});
|
148
|
+
|
149
|
+
it('When the user hovers over the provided option in preview tab, then that option should be displayed in hover state', () => {
|
150
|
+
highlightPage.steps.verifyHoverStateOfOptionInPreviewTab(sentenceTextArray[1]);
|
151
|
+
});
|
152
|
+
|
153
|
+
it('When user clicks on the provided option in preview tab, then the option should be selected ', () => {
|
154
|
+
highlightPage.steps.selectOptionInPreviewTab(sentenceTextArray[1]);
|
155
|
+
});
|
156
|
+
|
157
|
+
it('CSS of the option in selected and deselected state in preview tab', { tags: 'css' }, () => {
|
158
|
+
utilities.verifyCSS(highlightPage.previewTabOption().contains(sentenceTextArray[1]), {
|
159
|
+
'color': css.color.text,
|
160
|
+
'font-size': css.fontSize.default,
|
161
|
+
'font-weight': css.fontWeight.regular,
|
162
|
+
'background-color': css.color.figActiveComponentBg,
|
163
|
+
'border': `1px solid ${css.color.activeComponentBorder}`
|
164
|
+
});
|
165
|
+
utilities.verifyCSS(highlightPage.previewTabOption().contains(sentenceTextArray[2]), {
|
166
|
+
'color': css.color.text,
|
167
|
+
'font-size': css.fontSize.default,
|
168
|
+
'font-weight': css.fontWeight.regular,
|
169
|
+
'background-color': css.color.transparent
|
170
|
+
});
|
171
|
+
});
|
172
|
+
|
173
|
+
it('Accessibility of response options in preview tab', { tags: 'a11y' }, () => {
|
174
|
+
cy.checkAccessibility(highlightPage.previewTabOption().parents('.highlight-preview-wrapper'));
|
175
|
+
});
|
176
|
+
|
177
|
+
it('When user clicks on the selected option in preview tab, the option should then be deselected', () => {
|
178
|
+
highlightPage.steps.deselectOptionInPreviewTab(sentenceTextArray[1]);
|
179
|
+
});
|
180
|
+
});
|
181
|
+
|
182
|
+
describe('Preview tab: Word', () => {
|
183
|
+
abortEarlySetup();
|
184
|
+
before(() => {
|
185
|
+
cy.log('Navigating to Highlight question type');
|
186
|
+
highlightPage.steps.navigateToCreateQuestion('highlight');
|
187
|
+
cy.barsPreLoaderWait();
|
188
|
+
highlightPage.steps.clearQuestionInputField();
|
189
|
+
paragraphTextArray.forEach((paragraphText) => {
|
190
|
+
highlightPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
191
|
+
});
|
192
|
+
highlightPage.steps.addInputToQuestionInputField('{backspace}');
|
193
|
+
highlightPage.steps.switchTextSelectionTypeInTextSelectionDropdown('Word');
|
194
|
+
highlightPage.steps.deselectOptionInHighlightOptionsSection('Word', wordTextArray[0]);
|
195
|
+
highlightPage.steps.switchToPreviewTab();
|
196
|
+
});
|
197
|
+
|
198
|
+
it('When \'Word\' text selection type is selected, then in preview tab options should be provided as per selection defined in preview tab', () => {
|
199
|
+
utilities.verifyElementCount(highlightPage.previewTabParagraphs(), 3);
|
200
|
+
utilities.verifyElementCount(highlightPage.previewTabSpans(), 23);
|
201
|
+
let setCorrectAnswerOptionArray = wordTextArray.slice(1);
|
202
|
+
highlightPage.steps.verifyOptionInPreviewTab(setCorrectAnswerOptionArray);
|
203
|
+
});
|
204
|
+
|
205
|
+
it('When the user hovers over the provided option in preview tab, then that option should be displayed in hover state', () => {
|
206
|
+
highlightPage.steps.verifyHoverStateOfOptionInPreviewTab(wordTextArray[1]);
|
207
|
+
});
|
208
|
+
|
209
|
+
it('When user clicks on the provided option in preview tab, then the option should be selected ', () => {
|
210
|
+
highlightPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
|
211
|
+
});
|
212
|
+
|
213
|
+
it('CSS of the option in selected and deselected state in preview tab', { tags: 'css' }, () => {
|
214
|
+
utilities.verifyCSS(highlightPage.previewTabOption().contains(wordTextArray[1]), {
|
215
|
+
'color': css.color.text,
|
216
|
+
'font-size': css.fontSize.default,
|
217
|
+
'font-weight': css.fontWeight.regular,
|
218
|
+
'background-color': css.color.figActiveComponentBg,
|
219
|
+
'border': `1px solid ${css.color.activeComponentBorder}`
|
220
|
+
});
|
221
|
+
utilities.verifyCSS(highlightPage.previewTabOption().contains(wordTextArray[11]), {
|
222
|
+
'color': css.color.text,
|
223
|
+
'font-size': css.fontSize.default,
|
224
|
+
'font-weight': css.fontWeight.regular,
|
225
|
+
'background-color': css.color.transparent
|
226
|
+
});
|
227
|
+
});
|
228
|
+
|
229
|
+
it('Accessibility of response options in preview tab', { tags: 'a11y' }, () => {
|
230
|
+
cy.checkAccessibility(highlightPage.previewTabOption().parents('.highlight-preview-wrapper'));
|
231
|
+
});
|
232
|
+
|
233
|
+
it('When user clicks on the selected option in preview tab, the option should then be deselected', () => {
|
234
|
+
highlightPage.steps.deselectOptionInPreviewTab(wordTextArray[1]);
|
235
|
+
});
|
236
|
+
});
|
237
|
+
});
|