itemengine-cypress-automation 1.0.223-minorFix-f2741aa.0 → 1.0.224-31stJulyFixes-fae0339.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/customizePlaybackControls.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +12 -5
- package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/allOrNothingScoringForAllViews.smoke.js +370 -0
- package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/gradingViewAndCorrectAnswerView.smoke.js +285 -0
- package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/previewContentsForAllViews.smoke.js +629 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/addAndDeleteBarAllOrNothingScoring.js +4 -2
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +5 -4
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +2 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +2 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/manuallyAndNonScored.js +2 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightBasic.js +2 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +11 -10
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +2 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightBasic.js +2 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +2 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +2 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/toleranceThresholdScoring.js +2 -1
- package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/ChartsBar/gridSettings.js +8 -5
- package/cypress/e2e/ILC/ChartsBar/selectChartTypeSection.js +12 -12
- package/cypress/e2e/ILC/ChartsLine/editTabScoringSection.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +0 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +3 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionBasic.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettings.js +4 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettingsBasic.js +2 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/draggableOptions.js +0 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/pagination.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDraggableOptionsPanel.js +6 -3
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +7 -6
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +4 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +17 -11
- package/cypress/e2e/ILC/FeedbackScaleNew/additionalSettings.js +11 -11
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +8 -8
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +3 -4
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownSettings.js +3 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialDifferentWeightsBasic.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownAndDropdownMenuSection.js +2 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
- package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +53 -44
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +4 -6
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +2 -2
- package/cypress/e2e/ILC/ImageHighlight/Scoring/manuallyAndNonScored.js +2 -1
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/ImageHighlight/Scoring/singleSelectionPreviewScoring.js +9 -9
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +3 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/minimumScoringPenaltyPointsAndRoundingDropdown.js +3 -3
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +6 -6
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/Matching/additionalSettings.js +1 -0
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +8 -56
- package/cypress/e2e/ILC/Matching/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -4
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +2 -1
- package/cypress/e2e/ILC/Matching/toolSettings.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/editTabScoringSection.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -4
- package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsBasic.js +6 -6
- package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +1 -0
- package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +12 -12
- package/cypress/e2e/ILC/MultipleSelection/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +48 -48
- package/cypress/e2e/ILC/MultipleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
- package/cypress/e2e/ILC/NumberLine/LayoutSection.js +22 -25
- package/cypress/e2e/ILC/NumberLine/additionalSettings.js +23 -3
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +96 -7
- package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +12 -2
- package/cypress/e2e/ILC/NumberLine/numberLineSection.js +4 -6
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +1 -2
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +3 -2
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +3 -5
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +12 -3
- package/cypress/e2e/ILC/NumberLineLabel/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/NumberLineLabel/toolSettings.js +1 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +9 -9
- package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +2 -0
- package/cypress/e2e/ILC/SingleSelection/previewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +3 -3
- package/cypress/e2e/ILC/SingleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +20 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +214 -0
- package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +2 -1
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +1 -6
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +1 -2
- package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/audioOverviewAndTranscript.js +3 -2
- package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/customizePlayerLayoutSettings.js +2 -2
- package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/standardAudioPlayerStyle.js +3 -3
- package/cypress/e2e/ILC/VideoResponseNew/studentViewSettingsCompactRecorderStyle.js +3 -1
- package/cypress/e2e/ILC/chartsDotsPlot/additionalSettings.js +6 -6
- package/cypress/e2e/ILC/chartsDotsPlot/editTabScoring.js +4 -4
- package/cypress/e2e/ILC/chartsDotsPlot/minimumScoringPenaltyPointsAndRoundingDropdown.js +5 -5
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +3 -1
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +4 -2
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -1
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/manualAndNonScoredScoring.js +9 -7
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsBasic.js +62 -60
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +29 -27
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +45 -45
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +28 -28
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsBasic.js +48 -34
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +41 -38
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +26 -26
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +41 -38
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/toleranceThresholdScoring.js +7 -5
- package/cypress/pages/audioPlayerPage.js +2 -2
- package/cypress/pages/audioResponsePage.js +1 -0
- package/cypress/pages/chartsBarPage.js +177 -76
- package/cypress/pages/chartsDotPlotPage.js +28 -43
- package/cypress/pages/components/additionalSettingsPanel.js +5 -2
- package/cypress/pages/components/barAndLineChartComponent.js +1 -1
- package/cypress/pages/components/chartsCommonComponent.js +28 -0
- package/cypress/pages/components/colorPopupComponent.js +2 -0
- package/cypress/pages/components/createQuestionBasePage.js +1 -0
- package/cypress/pages/components/draggableOptionsSectionComponent.js +1 -0
- package/cypress/pages/components/editCategoryFlyout.js +6 -4
- package/cypress/pages/components/essayResponseCommonComponents.js +1 -1
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +3 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +2 -4
- package/cypress/pages/components/imageCanvasComponent.js +7 -5
- package/cypress/pages/components/layoutSectionComponent.js +4 -3
- package/cypress/pages/components/numberLineCommonComponent.js +38 -21
- package/cypress/pages/components/opacityComponent.js +1 -0
- package/cypress/pages/components/optionsWrapperComponent.js +1 -0
- package/cypress/pages/components/questionInstructionsComponent.js +1 -1
- package/cypress/pages/components/responseAreaSettingsPopupComponent.js +8 -0
- package/cypress/pages/components/scoringSectionBaseEditTab.js +5 -2
- package/cypress/pages/components/toolSettingsComponent.js +1 -0
- package/cypress/pages/contentBlocksPage.js +1 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +9 -2
- package/cypress/pages/fillInTheGapsDropdownPage.js +16 -1
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +16 -1
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +20 -1
- package/cypress/pages/graphingPage.js +43 -10
- package/cypress/pages/gridFillPage.js +11 -3
- package/cypress/pages/matchingPage.js +2 -0
- package/cypress/pages/numberLineLabelPage.js +1 -1
- package/cypress/pages/numberLinePage.js +25 -24
- package/cypress/pages/readingRulerPage.js +6 -2
- package/cypress/pages/rulerPage.js +1 -0
- package/cypress/pages/shortTextResponsePage.js +3 -1
- package/cypress/pages/singleSelectionPage.js +25 -2
- package/cypress/pages/textSelectionPage.js +1 -1
- package/cypress/pages/videoResponsePage.js +7 -2
- package/package.json +1 -1
- /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/allSupportedFileTypes.js +0 -0
- /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/barAudioPlayerStyle.js +0 -0
- /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/compactAudioPlayerStyle.js +0 -0
- /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/headerSection.js +0 -0
- /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/previewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/studentViewSettings.js +0 -0
- /package/cypress/e2e/ILC/{AudioPlayerNew → ToolAudioPlayerNew}/uploadAndAddAudioFile.js +0 -0
- /package/cypress/fixtures/uploads/{sample10Sec.mp3 → sampleAudio.mp3} +0 -0
package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/previewContentsForAllViews.smoke.js
ADDED
@@ -0,0 +1,629 @@
|
|
1
|
+
import { chartsBarPage, itemPreviewPage } 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 previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view'];
|
7
|
+
const views = utilities.getViews(previewContentViews);
|
8
|
+
var itemReferenceID = "";
|
9
|
+
const barBackgroundColor = ['rgb(46, 169, 89)', 'rgb(6, 117, 244)', 'rgb(219, 124, 0)', 'rgb(156, 105, 39)', 'rgb(219, 60, 0)'];
|
10
|
+
|
11
|
+
describe('Create item page: Charts - Bar horizontal orientation- Preview contents in all views', () => {
|
12
|
+
before(() => {
|
13
|
+
cy.loginAs('admin');
|
14
|
+
});
|
15
|
+
|
16
|
+
views.forEach((view) => {
|
17
|
+
describe(`Preview tab contents - Edit bar graphs, graph labels, locked graph ${view}`, { tags: 'smoke' }, () => {
|
18
|
+
abortEarlySetup();
|
19
|
+
before(() => {
|
20
|
+
switch (view) {
|
21
|
+
case 'Question preview':
|
22
|
+
chartsBarPage.steps.navigateToCreateQuestion('charts');
|
23
|
+
cy.barsPreLoaderWait();
|
24
|
+
chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
|
25
|
+
chartsBarPage.steps.selectAddBarOrPointToolbarOption();
|
26
|
+
chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
27
|
+
chartsBarPage.steps.setGraphTitle('Graph of profits');
|
28
|
+
chartsBarPage.steps.selectHorizontalDirectionRadioButton();
|
29
|
+
chartsBarPage.steps.setXAxisLabel('Profit');
|
30
|
+
chartsBarPage.steps.setYAxisLabel('Year');
|
31
|
+
chartsBarPage.steps.setMaxYValue(20);
|
32
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 1, range: 20 }, 'horizontal');
|
33
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 20 }, 'horizontal');
|
34
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 2, value: 3, range: 20 }, 'horizontal');
|
35
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 4, range: 20 }, 'horizontal');
|
36
|
+
chartsBarPage.steps.lockBar(1);
|
37
|
+
chartsBarPage.steps.allotPoints(10);
|
38
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 2, range: 20 }, 'horizontal');
|
39
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 5, range: 20 }, 'horizontal');
|
40
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 1, range: 20 }, 'horizontal');
|
41
|
+
chartsBarPage.steps.addBarOrPointInChartInSpecifyCorrectAnswerSection();
|
42
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 4, value: 8, range: 20 }, 'horizontal');
|
43
|
+
chartsBarPage.steps.switchToPreviewTab();
|
44
|
+
break;
|
45
|
+
case 'Item view':
|
46
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
47
|
+
break;
|
48
|
+
case 'Item preview':
|
49
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
50
|
+
chartsBarPage.steps.switchToPreviewTab();
|
51
|
+
break;
|
52
|
+
case 'Student view':
|
53
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
54
|
+
break;
|
55
|
+
default:
|
56
|
+
throw new Error('Invalid view');
|
57
|
+
}
|
58
|
+
});
|
59
|
+
|
60
|
+
after(() => {
|
61
|
+
if (view === 'Question preview') {
|
62
|
+
chartsBarPage.steps.clickOnSaveQuestionButton();
|
63
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
64
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
65
|
+
}
|
66
|
+
});
|
67
|
+
|
68
|
+
it('Question instructions should be visible', () => {
|
69
|
+
utilities.verifyInnerText(chartsBarPage.questionInstructionsText(), 'Set the bar on the chart for the profits of the years');
|
70
|
+
utilities.verifyElementVisibilityState(chartsBarPage.questionInstructionsText(), 'visible');
|
71
|
+
});
|
72
|
+
|
73
|
+
it('The toolbar options - Add bar, Undo, Redo and Reset should be displayed in the preview tab and only Add bar button should be enabled', () => {
|
74
|
+
utilities.verifyElementVisibilityState(chartsBarPage.previewTabToolsAddBarOrPointButton(), 'visible');
|
75
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsAddBarOrPointButton());
|
76
|
+
utilities.verifyElementVisibilityState(chartsBarPage.previewTabToolsUndoButton(), 'visible');
|
77
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsUndoButton());
|
78
|
+
utilities.verifyElementVisibilityState(chartsBarPage.previewTabToolsRedoButton(), 'visible');
|
79
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsRedoButton());
|
80
|
+
utilities.verifyElementVisibilityState(chartsBarPage.previewTabToolsResetButton(), 'visible');
|
81
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsResetButton());
|
82
|
+
});
|
83
|
+
|
84
|
+
it('The graph title, Y axis label, X axis label and bar labels should be displayed', () => {
|
85
|
+
utilities.verifyInnerText(chartsBarPage.previewTabGraphTitle(), 'Graph of profits');
|
86
|
+
utilities.verifyElementVisibilityState(chartsBarPage.previewTabGraphTitle(), 'visible');
|
87
|
+
utilities.verifyInnerText(chartsBarPage.previewTabXAxisLabelButton(), 'Profit');
|
88
|
+
utilities.verifyElementVisibilityState(chartsBarPage.previewTabXAxisLabelButton(), 'visible');
|
89
|
+
utilities.verifyInnerText(chartsBarPage.previewTabYAxisLabelButton(), 'Year');
|
90
|
+
utilities.verifyElementVisibilityState(chartsBarPage.previewTabYAxisLabelButton(), 'visible');
|
91
|
+
chartsBarPage.steps.verifyBarLabelHorizontalPreviewTab([[0, 'Bar 1'], [1, 'Bar 2'], [2, 'Bar 3'], [3, 'Bar 4']]);
|
92
|
+
});
|
93
|
+
|
94
|
+
it('The graph max value should be as set in the Max X input field and it should affect the chart division', () => {
|
95
|
+
utilities.verifyTextContent(utilities.getNthElement(chartsBarPage.xAxisCoordinatePreviewTab(), 20), 20);
|
96
|
+
chartsBarPage.steps.verifyLabelsInHorizontalPreviewTab(0, 1);
|
97
|
+
});
|
98
|
+
|
99
|
+
it('User should be able to edit the Y axis and X axis labels in preview tab', () => {
|
100
|
+
chartsBarPage.steps.editYAxisLabelInPreviewTab('Years');
|
101
|
+
utilities.verifyInnerText(chartsBarPage.previewTabYAxisLabelButton(), 'Years');
|
102
|
+
chartsBarPage.steps.editXAxisLabelInPreviewTab('Profit in rupees');
|
103
|
+
utilities.verifyInnerText(chartsBarPage.previewTabXAxisLabelButton(), 'Profit in rupees');
|
104
|
+
});
|
105
|
+
|
106
|
+
it('The charts and graphs should be visible as set by the user in select chart type section', () => {
|
107
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 1, range: 20 });
|
108
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 1, barValue: 2, range: 20 });
|
109
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 3, range: 20 });
|
110
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 3, barValue: 4, range: 20 });
|
111
|
+
});
|
112
|
+
|
113
|
+
it('The locked bar should be displayed in the locked state in preview tab and it should not have a drag handle', () => {
|
114
|
+
chartsBarPage.steps.verifyBarIsLockedInPreviewTab(1);
|
115
|
+
});
|
116
|
+
|
117
|
+
it('User should not be able to edit the locked bar height', () => {
|
118
|
+
chartsBarPage.steps.verifyLockedBarIsUneditableInPreviewTab(1);
|
119
|
+
});
|
120
|
+
|
121
|
+
it('User should be able to increase the bar height in preview tab', () => {
|
122
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 20, range: 20 }, 'horizontal');
|
123
|
+
});
|
124
|
+
|
125
|
+
it('User should be able to decrease the height of the bar in preview tab', () => {
|
126
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 0, range: 20 }, 'horizontal');
|
127
|
+
});
|
128
|
+
|
129
|
+
it('When bar is at the topmost value and the user still tries to increase its value, then the bar value should not increase', () => {
|
130
|
+
chartsBarPage.steps.increaseBarValueUsingUpArrowInPreviewTab(0, 'horizontal');
|
131
|
+
chartsBarPage.steps.increaseBarValueUsingUpArrowInPreviewTab(0, 'horizontal');
|
132
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 20, range: 20 });
|
133
|
+
});
|
134
|
+
|
135
|
+
it('When bar is at the bottommost value and the user still tries to decrease its value, then the bar value should not decrease', () => {
|
136
|
+
chartsBarPage.steps.decreaseBarValueUsingDownArrowInPreviewTab(2, 'horizontal');
|
137
|
+
chartsBarPage.steps.decreaseBarValueUsingDownArrowInPreviewTab(2, 'horizontal');
|
138
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 0, range: 20 });
|
139
|
+
});
|
140
|
+
|
141
|
+
chartsBarPage.tests.verifyBarTooltipContentsCSSAndA11yInPreviewTab('0', barBackgroundColor[0], 'Bar 1');
|
142
|
+
|
143
|
+
chartsBarPage.tests.verifyBarTooltipContentsCSSAndA11yInPreviewTab('3', barBackgroundColor[3], 'Bar 4');
|
144
|
+
|
145
|
+
it('User should be able to edit the label a bar', () => {
|
146
|
+
chartsBarPage.steps.editBarLabelHorizontalInPreviewTab(0, '2000');
|
147
|
+
chartsBarPage.steps.editBarLabelHorizontalInPreviewTab(3, '2004');
|
148
|
+
});
|
149
|
+
|
150
|
+
it('CSS of preview tab contents', { tags: 'css' }, () => {
|
151
|
+
utilities.verifyCSS(chartsBarPage.previewTabToolsAddBarOrPointButton(), {
|
152
|
+
'background-color': css.color.activeButtons
|
153
|
+
});
|
154
|
+
utilities.verifyCSS(chartsBarPage.previewTabGraphTitle(), {
|
155
|
+
'color': css.color.text,
|
156
|
+
'font-size': css.fontSize.default,
|
157
|
+
'font-weight': css.fontWeight.bold
|
158
|
+
});
|
159
|
+
utilities.verifyCSS(chartsBarPage.previewTabYAxisLabelButton(), {
|
160
|
+
'color': css.color.activeButtons,
|
161
|
+
'font-size': css.fontSize.default,
|
162
|
+
'font-weight': css.fontWeight.bold
|
163
|
+
});
|
164
|
+
utilities.verifyCSS(chartsBarPage.previewTabXAxisLabelButton(), {
|
165
|
+
'color': css.color.activeButtons,
|
166
|
+
'font-size': css.fontSize.default,
|
167
|
+
'font-weight': css.fontWeight.bold
|
168
|
+
});
|
169
|
+
utilities.verifyCSS(chartsBarPage.barLabelHorizontalPreviewTab(), {
|
170
|
+
'color': css.color.text,
|
171
|
+
'font-size': css.fontSize.default,
|
172
|
+
'font-weight': css.fontWeight.semibold
|
173
|
+
});
|
174
|
+
utilities.verifyCSS(chartsBarPage.previewTabYAxisCoordinate(), {
|
175
|
+
'color': css.color.text,
|
176
|
+
'font-size': css.fontSize.normal,
|
177
|
+
'font-weight': css.fontWeight.semibold
|
178
|
+
});
|
179
|
+
utilities.verifyCSS(chartsBarPage.previewTabBarDragHandle().find('svg'), {
|
180
|
+
'background-color': css.color.defaultBackground
|
181
|
+
});
|
182
|
+
utilities.verifyCSS(chartsBarPage.previewTabBarDragHandle().find('path').eq(1), {
|
183
|
+
'fill': css.color.secondaryBtn
|
184
|
+
});
|
185
|
+
utilities.verifyCSS(chartsBarPage.previewTabBar().eq(0), {
|
186
|
+
'background-color': barBackgroundColor[0]
|
187
|
+
});
|
188
|
+
utilities.verifyCSS(chartsBarPage.previewTabBar().eq(1), {
|
189
|
+
'background-color': barBackgroundColor[1]
|
190
|
+
});
|
191
|
+
utilities.verifyCSS(chartsBarPage.previewTabBar().eq(2), {
|
192
|
+
'background-color': barBackgroundColor[2]
|
193
|
+
});
|
194
|
+
utilities.verifyCSS(chartsBarPage.previewTabBar().eq(3), {
|
195
|
+
'background-color': barBackgroundColor[3]
|
196
|
+
});
|
197
|
+
utilities.verifyCSS(chartsBarPage.barLockIcon(), {
|
198
|
+
'background-color': css.color.defaultBackground,
|
199
|
+
});
|
200
|
+
});
|
201
|
+
|
202
|
+
it('Accessibility of preview tab contents', { tags: 'a11y' }, () => {
|
203
|
+
cy.checkAccessibility(chartsBarPage.previewTabGraphTitle().parents('[class*="ChartsPreviewstyles__PreviewWrapper"]'));
|
204
|
+
});
|
205
|
+
});
|
206
|
+
});
|
207
|
+
|
208
|
+
views.forEach((view) => {
|
209
|
+
describe(`Preview tab contents - Add and delete bar ${view}`, { tags: 'smoke' }, () => {
|
210
|
+
abortEarlySetup();
|
211
|
+
before(() => {
|
212
|
+
switch (view) {
|
213
|
+
case 'Question preview':
|
214
|
+
chartsBarPage.steps.navigateToCreateQuestion('charts');
|
215
|
+
cy.barsPreLoaderWait();
|
216
|
+
chartsBarPage.steps.selectHorizontalDirectionRadioButton();
|
217
|
+
chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
|
218
|
+
chartsBarPage.steps.selectAddBarOrPointToolbarOption();
|
219
|
+
chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
220
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 1, range: 10 }, 'horizontal');
|
221
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 }, 'horizontal');
|
222
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 2, value: 3, range: 10 }, 'horizontal');
|
223
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 4, range: 10 }, 'horizontal');
|
224
|
+
chartsBarPage.steps.allotPoints(10);
|
225
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 2, range: 10 }, 'horizontal');
|
226
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 1, value: 4, range: 10 }, 'horizontal');
|
227
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 5, range: 10 }, 'horizontal');
|
228
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 1, range: 10 }, 'horizontal');
|
229
|
+
chartsBarPage.steps.switchToPreviewTab();
|
230
|
+
break;
|
231
|
+
case 'Item view':
|
232
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
233
|
+
break;
|
234
|
+
case 'Item preview':
|
235
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
236
|
+
chartsBarPage.steps.switchToPreviewTab();
|
237
|
+
break;
|
238
|
+
case 'Student view':
|
239
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
240
|
+
utilities.verifyElementVisibilityState(chartsBarPage.previewTabBar(), 'visible');
|
241
|
+
break;
|
242
|
+
default:
|
243
|
+
throw new Error('Invalid view');
|
244
|
+
}
|
245
|
+
});
|
246
|
+
|
247
|
+
after(() => {
|
248
|
+
if (view === 'Question preview') {
|
249
|
+
chartsBarPage.steps.clickOnSaveQuestionButton();
|
250
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
251
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
252
|
+
}
|
253
|
+
});
|
254
|
+
|
255
|
+
it('When user hovers on the enabled add bar button, then tooltip \'Add bar\' should be displayed', () => {
|
256
|
+
chartsBarPage.previewTabToolsAddBarOrPointButton()
|
257
|
+
.verifyTooltip('Add bar');
|
258
|
+
});
|
259
|
+
|
260
|
+
it('CSS of the tooltip text', { tags: 'css' }, () => {
|
261
|
+
utilities.triggerMouseover(chartsBarPage.previewTabToolsAddBarOrPointButton());
|
262
|
+
utilities.verifyCSS(chartsBarPage.tooltipText(), {
|
263
|
+
'color': css.color.whiteText,
|
264
|
+
'font-size': css.fontSize.small,
|
265
|
+
'font-weight': css.fontWeight.regular,
|
266
|
+
'background-color': css.color.tooltipBg
|
267
|
+
});
|
268
|
+
utilities.triggerMouseout(chartsBarPage.previewTabToolsAddBarOrPointButton());
|
269
|
+
});
|
270
|
+
|
271
|
+
it('Accessibility of the tooltip text', { tags: 'a11y' }, () => {
|
272
|
+
utilities.triggerMouseover(chartsBarPage.previewTabToolsAddBarOrPointButton());
|
273
|
+
utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'visible');
|
274
|
+
cy.checkAccessibility(chartsBarPage.tooltipText().parents('[role="tooltip"]'));
|
275
|
+
utilities.triggerMouseout(chartsBarPage.previewTabToolsAddBarOrPointButton());
|
276
|
+
utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'notExist');
|
277
|
+
});
|
278
|
+
|
279
|
+
it('User should be able to add a bar in chart and the added bar should be displayed at 0 height with the label \'Bar 5\'', () => {
|
280
|
+
chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
|
281
|
+
utilities.verifyElementCount(chartsBarPage.previewTabBar(), 5);
|
282
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 4, barValue: 0, range: 20 });
|
283
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.barLabelHorizontalPreviewTab(), 4), 'Bar 5');
|
284
|
+
});
|
285
|
+
|
286
|
+
it('CSS of newly added bar in preview tab', { tags: 'css' }, () => {
|
287
|
+
utilities.verifyCSS(chartsBarPage.previewTabBar().eq(4), {
|
288
|
+
'background-color': barBackgroundColor[4]
|
289
|
+
});
|
290
|
+
});
|
291
|
+
|
292
|
+
it('Accessibility of newly added bar in preview tab', { tags: 'a11y' }, () => {
|
293
|
+
cy.checkAccessibility(chartsBarPage.previewTabGraphTitle().parents('[class*="ChartsPreviewstyles__PreviewWrapper"]'));
|
294
|
+
});
|
295
|
+
|
296
|
+
it('When add bar limit is set to 1 and user has added a bar, then the add bar toolbar button should be disabled', () => {
|
297
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsAddBarOrPointButton());
|
298
|
+
});
|
299
|
+
|
300
|
+
it('When user deletes a bar, then that bar should be deleted and the add bar button should be enabled again', () => {
|
301
|
+
chartsBarPage.steps.deleteBarInPreviewTab(3);
|
302
|
+
utilities.verifyElementCount(chartsBarPage.previewTabBar(), 4);
|
303
|
+
utilities.verifyElementVisibilityState(utilities.getNthElement(chartsBarPage.barLabelHorizontalPreviewTab(), 4), 'notExist');
|
304
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsAddBarOrPointButton());
|
305
|
+
});
|
306
|
+
|
307
|
+
it('When user has deleted 2 bars and adds a bar, then the add bar button should still be enabled', () => {
|
308
|
+
chartsBarPage.steps.deleteBarInPreviewTab(2);
|
309
|
+
chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
|
310
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsAddBarOrPointButton());
|
311
|
+
});
|
312
|
+
|
313
|
+
it('When user adds a bar again and the number of extra bars reaches the maximum set value i.e. 1, then the add bar button should be disabled', () => {
|
314
|
+
chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
|
315
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsAddBarOrPointButton());
|
316
|
+
});
|
317
|
+
});
|
318
|
+
});
|
319
|
+
|
320
|
+
views.forEach((view) => {
|
321
|
+
describe(`Preview tab contents - Undo, Redo and Reset buttons ${view}`, { tags: 'smoke' }, () => {
|
322
|
+
abortEarlySetup();
|
323
|
+
before(() => {
|
324
|
+
switch (view) {
|
325
|
+
case 'Question preview':
|
326
|
+
chartsBarPage.steps.navigateToCreateQuestion('charts');
|
327
|
+
cy.barsPreLoaderWait();
|
328
|
+
chartsBarPage.steps.selectHorizontalDirectionRadioButton();
|
329
|
+
chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
|
330
|
+
chartsBarPage.steps.selectAddBarOrPointToolbarOption();
|
331
|
+
chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
332
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 1, range: 10 }, 'horizontal');
|
333
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 }, 'horizontal');
|
334
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 2, value: 3, range: 10 }, 'horizontal');
|
335
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 4, range: 10 }, 'horizontal');
|
336
|
+
chartsBarPage.steps.setMaxBarCountValue(2);
|
337
|
+
chartsBarPage.steps.allotPoints(10);
|
338
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 2, range: 10 }, 'horizontal');
|
339
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 1, value: 4, range: 10 }, 'horizontal');
|
340
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 5, range: 10 }, 'horizontal');
|
341
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 1, range: 10 }, 'horizontal');
|
342
|
+
chartsBarPage.steps.switchToPreviewTab();
|
343
|
+
break;
|
344
|
+
case 'Item view':
|
345
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
346
|
+
break;
|
347
|
+
case 'Item preview':
|
348
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
349
|
+
chartsBarPage.steps.switchToPreviewTab();
|
350
|
+
break;
|
351
|
+
case 'Student view':
|
352
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
353
|
+
break;
|
354
|
+
default:
|
355
|
+
throw new Error('Invalid view');
|
356
|
+
}
|
357
|
+
});
|
358
|
+
|
359
|
+
after(() => {
|
360
|
+
if (view === 'Question preview') {
|
361
|
+
chartsBarPage.steps.clickOnSaveQuestionButton();
|
362
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
363
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
364
|
+
}
|
365
|
+
});
|
366
|
+
|
367
|
+
//Bar labels
|
368
|
+
it('When user updates a bar label, then the undo and reset button should be displayed in enabled state', () => {
|
369
|
+
chartsBarPage.steps.editBarLabelHorizontalInPreviewTab(0, 'Edited bar 1');
|
370
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
|
371
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsResetButton());
|
372
|
+
});
|
373
|
+
|
374
|
+
it('When user hovers on the enabled undo and reset button, then tooltips \'Undo\' and \'Reset\' should be displayed', () => {
|
375
|
+
chartsBarPage.previewTabToolsUndoButton()
|
376
|
+
.verifyTooltip('Undo');
|
377
|
+
chartsBarPage.previewTabToolsResetButton()
|
378
|
+
.verifyTooltip('Reset');
|
379
|
+
});
|
380
|
+
|
381
|
+
it('CSS of the tooltip text', { tags: 'css' }, () => {
|
382
|
+
utilities.triggerMouseover(chartsBarPage.previewTabToolsUndoButton());
|
383
|
+
utilities.verifyCSS(chartsBarPage.tooltipText(), {
|
384
|
+
'color': css.color.whiteText,
|
385
|
+
'font-size': css.fontSize.small,
|
386
|
+
'font-weight': css.fontWeight.regular,
|
387
|
+
'background-color': css.color.tooltipBg
|
388
|
+
});
|
389
|
+
utilities.triggerMouseout(chartsBarPage.previewTabToolsUndoButton());
|
390
|
+
utilities.triggerMouseover(chartsBarPage.previewTabToolsResetButton());
|
391
|
+
utilities.verifyCSS(chartsBarPage.tooltipText(), {
|
392
|
+
'color': css.color.whiteText,
|
393
|
+
'font-size': css.fontSize.small,
|
394
|
+
'font-weight': css.fontWeight.regular,
|
395
|
+
'background-color': css.color.tooltipBg
|
396
|
+
});
|
397
|
+
utilities.triggerMouseout(chartsBarPage.previewTabToolsResetButton());
|
398
|
+
});
|
399
|
+
|
400
|
+
it('Accessibility of the tooltip text', { tags: 'a11y' }, () => {
|
401
|
+
utilities.triggerMouseover(chartsBarPage.previewTabToolsUndoButton());
|
402
|
+
utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'visible');
|
403
|
+
cy.checkAccessibility(chartsBarPage.tooltipText().parents('[role="tooltip"]'));
|
404
|
+
utilities.triggerMouseout(chartsBarPage.previewTabToolsUndoButton());
|
405
|
+
utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'notExist');
|
406
|
+
utilities.triggerMouseover(chartsBarPage.previewTabToolsResetButton());
|
407
|
+
utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'visible');
|
408
|
+
cy.checkAccessibility(chartsBarPage.tooltipText().parents('[role="tooltip"]'));
|
409
|
+
utilities.triggerMouseout(chartsBarPage.previewTabToolsResetButton());
|
410
|
+
utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'notExist');
|
411
|
+
});
|
412
|
+
|
413
|
+
it('When user clicks on a undo button, then the previously performed action should be reverted', () => {
|
414
|
+
chartsBarPage.steps.clickOnUndoButtonPreviewTab();
|
415
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.barLabelHorizontalPreviewTab(), 0), 'Bar 1');
|
416
|
+
});
|
417
|
+
|
418
|
+
it('When user has clicked on undo button, then the redo button should be enabled', () => {
|
419
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsRedoButton());
|
420
|
+
});
|
421
|
+
|
422
|
+
it('When user hovers on the enabled redo button, then tooltip \'Redo\' should be displayed', () => {
|
423
|
+
chartsBarPage.previewTabToolsRedoButton()
|
424
|
+
.verifyTooltip('Redo');
|
425
|
+
});
|
426
|
+
|
427
|
+
it('CSS of the tooltip text', { tags: 'css' }, () => {
|
428
|
+
utilities.triggerMouseover(chartsBarPage.previewTabToolsRedoButton());
|
429
|
+
utilities.verifyCSS(chartsBarPage.tooltipText(), {
|
430
|
+
'color': css.color.whiteText,
|
431
|
+
'font-size': css.fontSize.small,
|
432
|
+
'font-weight': css.fontWeight.regular,
|
433
|
+
'background-color': css.color.tooltipBg
|
434
|
+
});
|
435
|
+
utilities.triggerMouseout(chartsBarPage.previewTabToolsRedoButton());
|
436
|
+
});
|
437
|
+
|
438
|
+
it('Accessibility of the tooltip text', { tags: 'a11y' }, () => {
|
439
|
+
utilities.triggerMouseover(chartsBarPage.previewTabToolsRedoButton());
|
440
|
+
utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'visible');
|
441
|
+
cy.checkAccessibility(chartsBarPage.tooltipText().parents('[role="tooltip"]'));
|
442
|
+
utilities.triggerMouseout(chartsBarPage.previewTabToolsRedoButton());
|
443
|
+
utilities.verifyElementVisibilityState(chartsBarPage.tooltipText(), 'notExist');
|
444
|
+
});
|
445
|
+
|
446
|
+
it('When the user clicks on redo button, then the last reverted action should be performed again and the button should be disabled and undo button should be enabled', () => {
|
447
|
+
chartsBarPage.steps.clickOnRedoButtonPreviewTab();
|
448
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.barLabelHorizontalPreviewTab(), 0), 'Edited bar 1');
|
449
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsRedoButton());
|
450
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
|
451
|
+
});
|
452
|
+
|
453
|
+
it('When user performs more than 1 actions and then clicks on undo button, then undo button should be enabled', () => {
|
454
|
+
cy.log('Pre-step: Reset the chart');
|
455
|
+
chartsBarPage.steps.clickOnResetButtonPreviewTab();
|
456
|
+
chartsBarPage.steps.confirmReset();
|
457
|
+
chartsBarPage.steps.editBarLabelHorizontalInPreviewTab(0, 'Edited bar 1');
|
458
|
+
chartsBarPage.steps.editBarLabelHorizontalInPreviewTab(1, 'Edited bar 2');
|
459
|
+
chartsBarPage.steps.clickOnUndoButtonPreviewTab();
|
460
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
|
461
|
+
});
|
462
|
+
|
463
|
+
it('When the user clicks on undo button until the graph reaches its initial state, then the undo button should be disabled', () => {
|
464
|
+
chartsBarPage.steps.clickOnUndoButtonPreviewTab();
|
465
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsUndoButton());
|
466
|
+
});
|
467
|
+
|
468
|
+
//Bar value/height
|
469
|
+
it('When user updates a bar value and clicks on undo button, then the previously performed action should be reverted', () => {
|
470
|
+
cy.log('Pre-step: Reset the chart');
|
471
|
+
chartsBarPage.steps.clickOnResetButtonPreviewTab();
|
472
|
+
chartsBarPage.steps.confirmReset();
|
473
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 4, range: 10 }, 'horizontal');
|
474
|
+
chartsBarPage.steps.clickOnUndoButtonPreviewTab();
|
475
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 3, range: 10 });
|
476
|
+
});
|
477
|
+
|
478
|
+
it('When user has clicked on undo button, then the redo button should be enabled', () => {
|
479
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsRedoButton());
|
480
|
+
});
|
481
|
+
|
482
|
+
it('When the user clicks on redo button, then the last reverted action should be performed again and the button should be disabled and undo button should be enabled', () => {
|
483
|
+
chartsBarPage.steps.clickOnRedoButtonPreviewTab();
|
484
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 4, range: 10 });
|
485
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsRedoButton());
|
486
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
|
487
|
+
});
|
488
|
+
|
489
|
+
it('When user performs more than 1 actions and then clicks on undo button, then undo button should be enabled', () => {
|
490
|
+
cy.log('Reset the chart');
|
491
|
+
chartsBarPage.steps.clickOnResetButtonPreviewTab();
|
492
|
+
chartsBarPage.steps.confirmReset();
|
493
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 }, 'horizontal');
|
494
|
+
chartsBarPage.steps.clickOnUndoButtonPreviewTab();
|
495
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
|
496
|
+
});
|
497
|
+
|
498
|
+
it('When the user clicks on undo button until the graph reaches its initial state, then the undo button should be disabled', () => {
|
499
|
+
chartsBarPage.steps.clickOnUndoButtonPreviewTab();
|
500
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsUndoButton());
|
501
|
+
});
|
502
|
+
|
503
|
+
//Add bar
|
504
|
+
it('When user adds a bar and and clicks on undo button, then the previously performed action should be reverted', () => {
|
505
|
+
cy.log('Pre-step: Reset the chart');
|
506
|
+
chartsBarPage.steps.clickOnResetButtonPreviewTab();
|
507
|
+
chartsBarPage.steps.confirmReset();
|
508
|
+
chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
|
509
|
+
chartsBarPage.steps.clickOnUndoButtonPreviewTab();
|
510
|
+
utilities.verifyElementCount(chartsBarPage.previewTabBar(), 4);
|
511
|
+
});
|
512
|
+
|
513
|
+
it('When user has clicked on undo button, then the redo button should be enabled', () => {
|
514
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsRedoButton());
|
515
|
+
});
|
516
|
+
|
517
|
+
it('When the user clicks on redo button, then the last reverted action should be performed again and the button should be disabled and undo button should be enabled', () => {
|
518
|
+
chartsBarPage.steps.clickOnRedoButtonPreviewTab();
|
519
|
+
utilities.verifyElementCount(chartsBarPage.previewTabBar(), 5);
|
520
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsRedoButton());
|
521
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
|
522
|
+
});
|
523
|
+
|
524
|
+
it('When user performs more than 1 actions and then clicks on undo button, then undo button should be enabled', () => {
|
525
|
+
cy.log('Reset the chart');
|
526
|
+
chartsBarPage.steps.clickOnResetButtonPreviewTab();
|
527
|
+
chartsBarPage.steps.confirmReset();
|
528
|
+
chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
|
529
|
+
chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
|
530
|
+
chartsBarPage.steps.clickOnUndoButtonPreviewTab();
|
531
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
|
532
|
+
});
|
533
|
+
|
534
|
+
it('When the user clicks on undo button until the graph reaches its initial state, then the undo button should be disabled', () => {
|
535
|
+
chartsBarPage.steps.clickOnUndoButtonPreviewTab();
|
536
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsUndoButton());
|
537
|
+
});
|
538
|
+
|
539
|
+
//Delete bar
|
540
|
+
it('When user deletes a bar and clicks on a undo button, then the previously performed action should be reverted', () => {
|
541
|
+
cy.log('Pre-step: Reset the chart');
|
542
|
+
chartsBarPage.steps.clickOnResetButtonPreviewTab();
|
543
|
+
chartsBarPage.steps.confirmReset();
|
544
|
+
chartsBarPage.steps.deleteBarInPreviewTab(0);
|
545
|
+
chartsBarPage.steps.clickOnUndoButtonPreviewTab();
|
546
|
+
utilities.verifyElementCount(chartsBarPage.previewTabBar(), 4);
|
547
|
+
});
|
548
|
+
|
549
|
+
it('When user has clicked on undo button, then the redo button should be enabled', () => {
|
550
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsRedoButton());
|
551
|
+
});
|
552
|
+
|
553
|
+
it('When the user clicks on redo button, then the last reverted action should be performed again and the button should be disabled and undo button should be enabled', () => {
|
554
|
+
chartsBarPage.steps.clickOnRedoButtonPreviewTab();
|
555
|
+
utilities.verifyElementCount(chartsBarPage.previewTabBar(), 3);
|
556
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsRedoButton());
|
557
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
|
558
|
+
});
|
559
|
+
|
560
|
+
it('When user performs more than 1 actions and then clicks on undo button, then undo button should be enabled', () => {
|
561
|
+
cy.log('Pre-step: Reset the chart');
|
562
|
+
chartsBarPage.steps.clickOnResetButtonPreviewTab();
|
563
|
+
chartsBarPage.steps.confirmReset();
|
564
|
+
chartsBarPage.steps.deleteBarInPreviewTab(0);
|
565
|
+
chartsBarPage.steps.deleteBarInPreviewTab(0);
|
566
|
+
chartsBarPage.steps.clickOnUndoButtonPreviewTab();
|
567
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsUndoButton());
|
568
|
+
});
|
569
|
+
|
570
|
+
it('When the user clicks on undo button until the graph reaches its initial state, then the undo button should be disabled', () => {
|
571
|
+
chartsBarPage.steps.clickOnUndoButtonPreviewTab();
|
572
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsUndoButton());
|
573
|
+
});
|
574
|
+
|
575
|
+
//Reset button
|
576
|
+
it('When the user clicks on Reset button then reset popup should be displayed', () => {
|
577
|
+
cy.log('Pre-step: Editing the graph');
|
578
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 10, range: 10 }, 'horizontal');
|
579
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, value: 2, range: 10 }, 'horizontal');
|
580
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 0, range: 10 }, 'horizontal');
|
581
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 6, range: 10 }, 'horizontal');
|
582
|
+
chartsBarPage.steps.clickOnResetButtonPreviewTab();
|
583
|
+
utilities.verifyElementVisibilityState(chartsBarPage.dialogBox(), 'visible');
|
584
|
+
});
|
585
|
+
|
586
|
+
chartsBarPage.tests.verifyResetPopupContentWithCSSAndA11y('chart');
|
587
|
+
|
588
|
+
it('When user clicks on cancel button in reset popup, then reset popup should close and chart should not be reset', () => {
|
589
|
+
chartsBarPage.steps.cancelReset();
|
590
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 10, range: 10 });
|
591
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 1, barValue: 2, range: 10 });
|
592
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 0, range: 10 });
|
593
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 3, barValue: 6, range: 10 });
|
594
|
+
});
|
595
|
+
|
596
|
+
it('When the user clicks on Reset button and confirms reset, then all the chart actions should be reverted and chart should be reverted to default state', () => {
|
597
|
+
chartsBarPage.steps.clickOnResetButtonPreviewTab();
|
598
|
+
chartsBarPage.steps.confirmReset();
|
599
|
+
utilities.verifyElementNotDisabled(chartsBarPage.previewTabToolsAddBarOrPointButton());
|
600
|
+
utilities.verifyElementVisibilityState(chartsBarPage.previewTabToolsUndoButton(), 'visible');
|
601
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsUndoButton());
|
602
|
+
utilities.verifyElementVisibilityState(chartsBarPage.previewTabToolsRedoButton(), 'visible');
|
603
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsRedoButton());
|
604
|
+
utilities.verifyElementVisibilityState(chartsBarPage.previewTabToolsResetButton(), 'visible');
|
605
|
+
utilities.verifyElementDisabled(chartsBarPage.previewTabToolsResetButton());
|
606
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.barLabelHorizontalPreviewTab(), 0), 'Bar 1');
|
607
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.barLabelHorizontalPreviewTab(), 1), 'Bar 2');
|
608
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.barLabelHorizontalPreviewTab(), 2), 'Bar 3');
|
609
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsBarPage.barLabelHorizontalPreviewTab(), 3), 'Bar 4');
|
610
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 1, range: 10 });
|
611
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 1, barValue: 2, range: 10 });
|
612
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 3, range: 10 });
|
613
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 3, barValue: 4, range: 10 });
|
614
|
+
});
|
615
|
+
|
616
|
+
it('CSS of preview tab contents', { tags: 'css' }, () => {
|
617
|
+
utilities.verifyCSS(chartsBarPage.previewTabToolsUndoButton().find('svg'), {
|
618
|
+
'fill': css.color.secondaryBtnDisabled
|
619
|
+
});
|
620
|
+
utilities.verifyCSS(chartsBarPage.previewTabToolsRedoButton().find('svg'), {
|
621
|
+
'fill': css.color.secondaryBtnDisabled
|
622
|
+
});
|
623
|
+
utilities.verifyCSS(chartsBarPage.previewTabToolsUndoButton().find('svg'), {
|
624
|
+
'fill': css.color.secondaryBtnDisabled
|
625
|
+
});
|
626
|
+
});
|
627
|
+
});
|
628
|
+
});
|
629
|
+
});
|
@@ -25,7 +25,8 @@ describe('Create item page - Charts - Bar: Add and Delete bar All or nothing sco
|
|
25
25
|
chartsBarPage.steps.switchToPreviewTab();
|
26
26
|
});
|
27
27
|
|
28
|
-
|
28
|
+
//Need to remove skip once https://redmine.zeuslearning.com/issues/577535, https://redmine.zeuslearning.com/issues/577716 is resolved
|
29
|
+
it.skip('When the user selects \'Grading\' view without attempting the question, then user should be provided with 0 points, correct/incorrect icons should not be displayed on bars, the correct answer should be displayed in the correct answer section graph and correct/incorrect status message should not be displayed', () => {
|
29
30
|
chartsBarPage.steps.switchToGradingView();
|
30
31
|
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
31
32
|
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(0);
|
@@ -195,7 +196,8 @@ describe('Create item page - Charts - Bar: Add and Delete bar All or nothing sco
|
|
195
196
|
chartsBarPage.steps.switchToPreviewTab();
|
196
197
|
});
|
197
198
|
|
198
|
-
|
199
|
+
//Need to remove skip once https://redmine.zeuslearning.com/issues/577535, https://redmine.zeuslearning.com/issues/577716 is resolved
|
200
|
+
it.skip('When the user selects \'Grading\' view without attempting the question, then user should be provided with 0 points, correct/incorrect icon should not be displayed for any bar, the correct answer should be displayed in the correct answer section graph and correct/incorrect status message should not be displayed', () => {
|
199
201
|
chartsBarPage.steps.switchToGradingView();
|
200
202
|
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
201
203
|
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(0);
|