itemengine-cypress-automation 1.0.336 → 1.0.338-12thMarchRegressionFixes-1cd5906.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/editQuestion.smoke.js +94 -0
- package/cypress/e2e/ILC/ChartsBar/editQuestion.smoke.js +93 -0
- package/cypress/e2e/ILC/ChartsDotsPlot/editQuestion.smoke.js +92 -0
- package/cypress/e2e/ILC/ChartsLine/editQuestion.smoke.js +84 -0
- package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/CkEditorEquationEditor/selectModeEditorBasic.js +1 -1
- package/cypress/e2e/ILC/CkEditorInsertImage/insertImageBasicFile.js +1 -1
- package/cypress/e2e/ILC/CkEditorInsertImage/upload.js +1 -1
- package/cypress/e2e/ILC/CkEditorInsertTable/insertTableEditorBasicFile.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +12 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationLayoutProperties.js +2 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +63 -1
- package/cypress/e2e/ILC/EssayResponse/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponseBasic/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponseMath/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/checkScoringLableBannerAndCorrectAnswer.js +84 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/checkAddAlternativeButton.js +33 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +2 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +2 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +32 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +39 -6
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViewInIncompleteAuthoring.smoke.js +119 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +91 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/checkAddAlternativeButton.js +37 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editQuestion.smoke.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +36 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +36 -6
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViewsInIncompleteAuthoring.smoke.js +103 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +96 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAddAlternativeButton.js +38 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editQuestion.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +39 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +39 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViewsInIncompleteuthoring.smoke.js +106 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/supportedFileTypes.js +2 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +38 -5
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +88 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/checkAddAlternative.js +35 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editQuestion.smoke.js +33 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViewsInIncompleteAuthoring.js +97 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +3 -4
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +79 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/checkAddAlternativeButton.js +32 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +30 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +35 -4
- package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViewsInIncompleteAuthoring.smoke.js +99 -0
- package/cypress/e2e/ILC/GridFill/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +109 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternatePoints.js +45 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/checkScoringLableBannerAndCorrectAnswer.js +96 -0
- package/cypress/e2e/ILC/ImageHighlight/checkAddAlternativeButton.js +39 -0
- package/cypress/e2e/ILC/ImageHighlight/editQuestion.smoke.js +76 -0
- package/cypress/e2e/ILC/ImageHighlight/editTabBasicSection.js +46 -0
- package/cypress/e2e/ILC/ImageHighlight/headerSection.js +35 -5
- package/cypress/e2e/ILC/ImageHighlight/previewContentForAllViewInIncompleteAuthoring.js +118 -0
- package/cypress/e2e/ILC/ListOrderingNew/editQuestion.smoke.js +3 -0
- package/cypress/e2e/ILC/Matching/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationLayoutProperties.js +3 -3
- package/cypress/e2e/ILC/NumberLine/editQuestion.smoke.js +79 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +5 -5
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/editQuestion.smoke.js +72 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +1 -0
- package/cypress/e2e/ILC/NumberLineLabel/editQuestion.smoke.js +80 -0
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/editQuestion.smoke.js +81 -0
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +2 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/editQuestion.smoke.js +56 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/previewContentsForAllViews.smoke.js +5 -6
- package/cypress/e2e/ILC/SingleSelection/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/SingleSelection/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/editQuestion.smoke.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/editQuestion.smoke.js +76 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/editQuestion.smoke.js +92 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/TextSelection/editQuestion.smoke.js +0 -3
- package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +9 -9
- package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +2 -2
- package/cypress/e2e/ILC/chartsDotsPlot/numberLineAxisSettings.js +1 -0
- package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/fixtures/uploadResponseFileType.js +1 -1
- package/cypress/pages/chartsBarPage.js +3 -0
- package/cypress/pages/chartsDotPlotPage.js +2 -0
- package/cypress/pages/chartsLinePage.js +38 -2
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +2 -0
- package/cypress/pages/components/browseItemsPage.js +4 -4
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +22 -1
- package/cypress/pages/components/layoutSectionComponent.js +1 -1
- package/cypress/pages/components/optionsWrapperComponent.js +1 -0
- package/cypress/pages/components/scoringSectionBaseEditTab.js +2 -1
- package/cypress/pages/createItemPage.js +7 -0
- package/cypress/pages/drawingResponsePage.js +73 -2
- package/cypress/pages/feedbackScalePage.js +2 -0
- package/cypress/pages/fillInTheGapsDropdownPage.js +21 -0
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -2
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +22 -0
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +22 -0
- package/cypress/pages/fillInTheGapsTextPage.js +24 -2
- package/cypress/pages/imageHighlightPage.js +37 -2
- package/cypress/pages/listOrderingPage.js +4 -2
- package/cypress/pages/menuBarPage.js +65 -65
- package/cypress/pages/numberLineLabelPage.js +4 -1
- package/cypress/pages/numberLinePage.js +2 -0
- package/cypress/pages/shortTextResponsePage.js +2 -0
- package/cypress/pages/textEntryMathPage.js +7 -3
- package/cypress/pages/textEntryMathWithImagePage.js +3 -0
- package/package.json +2 -2
@@ -0,0 +1,56 @@
|
|
1
|
+
import { shortTextResponsePage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Edit item - Short text response', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Edit short text response question', { tags: 'smoke' }, () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
13
|
+
cy.barsPreLoaderWait();
|
14
|
+
shortTextResponsePage.steps.addTextInQuestionInstructionsInputField('Short text response');
|
15
|
+
shortTextResponsePage.steps.allotPoints(20);
|
16
|
+
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Buildings');
|
17
|
+
shortTextResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
18
|
+
});
|
19
|
+
|
20
|
+
it('User should be able to edit question instruction and save the question', () => {
|
21
|
+
shortTextResponsePage.steps.editItem();
|
22
|
+
shortTextResponsePage.steps.clearQuestionInstructionsInputField();
|
23
|
+
shortTextResponsePage.steps.addTextInQuestionInstructionsInputField('Short text response question instruction Updated');
|
24
|
+
shortTextResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
25
|
+
shortTextResponsePage.steps.verifyQuestionInstructionsTextPreviewTab('Short text response question instruction Updated');
|
26
|
+
});
|
27
|
+
|
28
|
+
it('User should be able to edit correct answer and save the question', () => {
|
29
|
+
shortTextResponsePage.steps.editItem();
|
30
|
+
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Buildings and mankind');
|
31
|
+
shortTextResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
32
|
+
});
|
33
|
+
|
34
|
+
it('User should be able to edit points and save the question', () => {
|
35
|
+
shortTextResponsePage.steps.editItem();
|
36
|
+
shortTextResponsePage.steps.allotPoints(30);
|
37
|
+
shortTextResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
38
|
+
shortTextResponsePage.steps.verifyPointInQuestionPreview(30);
|
39
|
+
});
|
40
|
+
|
41
|
+
it('User should be able to change scoring type to manually scored and save the question', () => {
|
42
|
+
shortTextResponsePage.steps.editItem();
|
43
|
+
shortTextResponsePage.steps.expandScoringTypeDropdown();
|
44
|
+
shortTextResponsePage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
45
|
+
shortTextResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
46
|
+
});
|
47
|
+
|
48
|
+
it('User should be able to change scoring type to non scored and save the question', () => {
|
49
|
+
shortTextResponsePage.steps.editItem();
|
50
|
+
shortTextResponsePage.steps.expandScoringTypeDropdown();
|
51
|
+
shortTextResponsePage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
52
|
+
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Buildings');
|
53
|
+
shortTextResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
54
|
+
});
|
55
|
+
});
|
56
|
+
});
|
@@ -57,23 +57,22 @@ describe('Create item page - Short text response : Preview contents', () => {
|
|
57
57
|
}
|
58
58
|
});
|
59
59
|
|
60
|
-
it(
|
60
|
+
it(`Question instructions should be visible`, () => {
|
61
61
|
utilities.verifyInnerText(shortTextResponsePage.questionInstructionsText(), 'Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
62
62
|
utilities.verifyElementVisibilityState(shortTextResponsePage.questionInstructionsText(), 'visible');
|
63
63
|
});
|
64
64
|
|
65
65
|
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
66
|
-
it(
|
66
|
+
it(`Answer input field should be visible and by default it should be empty`, () => {
|
67
67
|
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('');
|
68
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabResponseField(), 'visible')
|
68
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabResponseField(), 'visible');
|
69
69
|
});
|
70
70
|
|
71
|
-
it(
|
71
|
+
it(`User should be able to enter text in answer input field`, () => {
|
72
72
|
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('The quick brown fox');
|
73
73
|
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('The quick brown fox');
|
74
74
|
});
|
75
|
-
}
|
76
|
-
else {
|
75
|
+
} else {
|
77
76
|
it(`The response field should be displayed filled with correct answer`, () => {
|
78
77
|
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('The quick brown fox');
|
79
78
|
utilities.verifyElementDisabled(shortTextResponsePage.previewTabResponseField());
|
@@ -54,7 +54,7 @@ describe('Edit item - Single Selection', () => {
|
|
54
54
|
singleSelectionPage.steps.verifyPointInQuestionPreview(30);
|
55
55
|
});
|
56
56
|
|
57
|
-
it('User should be able to change scoring type to manually and save the question', () => {
|
57
|
+
it('User should be able to change scoring type to manually scored and save the question', () => {
|
58
58
|
singleSelectionPage.steps.editItem();
|
59
59
|
singleSelectionPage.steps.expandScoringTypeDropdown();
|
60
60
|
singleSelectionPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
@@ -172,7 +172,7 @@ describe('Create item page - Single selection: Question instructions, Options se
|
|
172
172
|
singleSelectionPage.steps.saveAQuestionWithIncompleteAuthoring();
|
173
173
|
singleSelectionPage.steps.editItem();
|
174
174
|
});
|
175
|
-
|
175
|
+
|
176
176
|
it('Warning icons should be displayed on the required input fields', () => {
|
177
177
|
singleSelectionPage.steps.verifyWarningIconOnRequiredFields(['Please enter all option values', 'Please set points']);
|
178
178
|
});
|
@@ -56,7 +56,7 @@ describe('Edit item - single selection grid', () => {
|
|
56
56
|
singleSelectionGridPage.steps.verifyPointInQuestionPreview(30);
|
57
57
|
});
|
58
58
|
|
59
|
-
it('User should be able to change scoring type to manually and save the question', () => {
|
59
|
+
it('User should be able to change scoring type to manually scored and save the question', () => {
|
60
60
|
singleSelectionGridPage.steps.editItem();
|
61
61
|
singleSelectionGridPage.steps.expandScoringTypeDropdown();
|
62
62
|
singleSelectionGridPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import { textEntryMathPage } from "../../../pages";
|
2
|
+
import { equationEditorFlyout } from "../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
|
5
|
+
describe('Edit item - Text entry math', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Edit text entry math question', { tags: 'smoke' }, () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
14
|
+
cy.barsPreLoaderWait();
|
15
|
+
textEntryMathWithImagePage.steps.addTextInQuestionInstructionsInputField('Text entry math question instruction');
|
16
|
+
textEntryMathPage.steps.addResponseArea();
|
17
|
+
textEntryMathPage.steps.addResponseArea();
|
18
|
+
textEntryMathPage.steps.allotPoints(20);
|
19
|
+
textEntryMathPage.steps.expandAndFocusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
20
|
+
equationEditorFlyout.steps.clearAll();
|
21
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
22
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
23
|
+
textEntryMathPage.steps.expandAndFocusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
24
|
+
equationEditorFlyout.steps.clearAll();
|
25
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct2');
|
26
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
27
|
+
textEntryMathPage.steps.saveAQuestionAndVerifySnackbar();
|
28
|
+
});
|
29
|
+
|
30
|
+
it('User should be able to edit question instruction and save the question', () => {
|
31
|
+
textEntryMathPage.steps.editItem();
|
32
|
+
textEntryMathPage.steps.clearQuestionInstructionsInputField();
|
33
|
+
textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Text entry math question instruction Updated');
|
34
|
+
textEntryMathPage.steps.saveAQuestionAndVerifySnackbar();
|
35
|
+
textEntryMathPage.steps.verifyQuestionInstructionsTextPreviewTab('Text entry math question instruction Updated');
|
36
|
+
});
|
37
|
+
|
38
|
+
it('User should be able to edit correct answer and save the question', () => {
|
39
|
+
textEntryMathPage.steps.editItem();
|
40
|
+
textEntryMathPage.steps.expandAndFocusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
41
|
+
equationEditorFlyout.steps.clearAll();
|
42
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('EditedCorrectAnswer1');
|
43
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
44
|
+
textEntryMathPage.steps.saveAQuestionAndVerifySnackbar();
|
45
|
+
});
|
46
|
+
|
47
|
+
it('User should be able to edit points and save the question', () => {
|
48
|
+
textEntryMathPage.steps.editItem();
|
49
|
+
textEntryMathPage.steps.allotPoints(30);
|
50
|
+
textEntryMathPage.steps.saveAQuestionAndVerifySnackbar();
|
51
|
+
textEntryMathPage.steps.verifyPointInQuestionPreview(30);
|
52
|
+
});
|
53
|
+
|
54
|
+
it('User should be able to change scoring type to manually scored and save the question', () => {
|
55
|
+
textEntryMathPage.steps.editItem();
|
56
|
+
textEntryMathPage.steps.expandScoringTypeDropdown();
|
57
|
+
textEntryMathPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
58
|
+
textEntryMathPage.steps.saveAQuestionAndVerifySnackbar();
|
59
|
+
});
|
60
|
+
|
61
|
+
it('User should be able to change scoring type to non scored and save the question', () => {
|
62
|
+
textEntryMathPage.steps.editItem();
|
63
|
+
textEntryMathPage.steps.expandScoringTypeDropdown();
|
64
|
+
textEntryMathPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
65
|
+
textEntryMathPage.steps.expandAndFocusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
66
|
+
equationEditorFlyout.steps.clearAll();
|
67
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('NonScoredCorrectAnswer1');
|
68
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
69
|
+
textEntryMathPage.steps.expandAndFocusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
70
|
+
equationEditorFlyout.steps.clearAll();
|
71
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('NonScoredCorrectAnswer2');
|
72
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
73
|
+
textEntryMathPage.steps.saveAQuestionAndVerifySnackbar();
|
74
|
+
});
|
75
|
+
});
|
76
|
+
});
|
@@ -0,0 +1,92 @@
|
|
1
|
+
import { textEntryMathWithImagePage } from "../../../pages";
|
2
|
+
import { equationEditorFlyout } from "../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
|
5
|
+
describe('Edit item - Text entry math with image', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Edit text entry math with image question', { tags: 'smoke' }, () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
textEntryMathWithImagePage.steps.navigateToCreateQuestion('Text Entry Math');
|
14
|
+
cy.barsPreLoaderWait();
|
15
|
+
textEntryMathWithImagePage.steps.addBackground();
|
16
|
+
textEntryMathWithImagePage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
|
17
|
+
textEntryMathWithImagePage.steps.uploadFile('highlightImage.jpg');
|
18
|
+
textEntryMathWithImagePage.steps.verifyImageIsUploaded();
|
19
|
+
textEntryMathWithImagePage.steps.allotPoints(20);
|
20
|
+
textEntryMathWithImagePage.steps.insertResponseArea(10);
|
21
|
+
textEntryMathWithImagePage.steps.insertResponseArea(40);
|
22
|
+
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
23
|
+
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
24
|
+
equationEditorFlyout.steps.clearAll();
|
25
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
26
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
27
|
+
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
28
|
+
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
29
|
+
equationEditorFlyout.steps.clearAll();
|
30
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct2');
|
31
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
32
|
+
textEntryMathWithImagePage.steps.saveAQuestionAndVerifySnackbar();
|
33
|
+
});
|
34
|
+
|
35
|
+
it('User should be able to edit question instruction and save the question', () => {
|
36
|
+
textEntryMathWithImagePage.steps.editItem();
|
37
|
+
textEntryMathWithImagePage.steps.clearQuestionInstructionsInputField();
|
38
|
+
textEntryMathWithImagePage.steps.addTextInQuestionInstructionsInputField('Text entry math question instruction Updated');
|
39
|
+
textEntryMathWithImagePage.steps.saveAQuestionAndVerifySnackbar();
|
40
|
+
textEntryMathWithImagePage.steps.verifyQuestionInstructionsTextPreviewTab('Text entry math question instruction Updated');
|
41
|
+
});
|
42
|
+
|
43
|
+
it('User should be able to edit correct answer and save the question', () => {
|
44
|
+
textEntryMathWithImagePage.steps.editItem();
|
45
|
+
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
46
|
+
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
47
|
+
equationEditorFlyout.steps.clearAll();
|
48
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('EditedCorrectAnswer1');
|
49
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
50
|
+
textEntryMathWithImagePage.steps.saveAQuestionAndVerifySnackbar();
|
51
|
+
});
|
52
|
+
|
53
|
+
it('User should be able to edit points and save the question', () => {
|
54
|
+
textEntryMathWithImagePage.steps.editItem();
|
55
|
+
textEntryMathWithImagePage.steps.allotPoints(30);
|
56
|
+
textEntryMathWithImagePage.steps.saveAQuestionAndVerifySnackbar();
|
57
|
+
textEntryMathWithImagePage.steps.verifyPointInQuestionPreview(30);
|
58
|
+
});
|
59
|
+
|
60
|
+
it('User should be able to change scoring type to manually scored and save the question', () => {
|
61
|
+
textEntryMathWithImagePage.steps.editItem();
|
62
|
+
textEntryMathWithImagePage.steps.expandScoringTypeDropdown();
|
63
|
+
textEntryMathWithImagePage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
64
|
+
textEntryMathWithImagePage.steps.saveAQuestionAndVerifySnackbar();
|
65
|
+
});
|
66
|
+
|
67
|
+
it('User should be able to change scoring type to non scored and save the question', () => {
|
68
|
+
textEntryMathWithImagePage.steps.editItem();
|
69
|
+
textEntryMathWithImagePage.steps.expandScoringTypeDropdown();
|
70
|
+
textEntryMathWithImagePage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
71
|
+
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
72
|
+
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
73
|
+
equationEditorFlyout.steps.clearAll();
|
74
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('NonScoredCorrectAnswer1');
|
75
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
76
|
+
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
77
|
+
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
78
|
+
equationEditorFlyout.steps.clearAll();
|
79
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('NonScoredCorrectAnswer2');
|
80
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
81
|
+
textEntryMathWithImagePage.steps.saveAQuestionAndVerifySnackbar();
|
82
|
+
});
|
83
|
+
|
84
|
+
it('User should be able to updated the uploaded image for the question and save the question', () => {
|
85
|
+
textEntryMathWithImagePage.steps.editItem();
|
86
|
+
textEntryMathWithImagePage.steps.uploadFile('image.png');
|
87
|
+
textEntryMathWithImagePage.steps.verifyImageIsUploaded();
|
88
|
+
textEntryMathWithImagePage.steps.verifyFileNameLabel('image.png');
|
89
|
+
textEntryMathWithImagePage.steps.saveAQuestionAndVerifySnackbar();
|
90
|
+
});
|
91
|
+
});
|
92
|
+
});
|
@@ -27,9 +27,9 @@ describe('Create item page - Text entry math: Preview contents', () => {
|
|
27
27
|
switch (view) {
|
28
28
|
case 'Question preview':
|
29
29
|
textEntryMathWithImagePage.steps.navigateToCreateQuestion('Text Entry Math');
|
30
|
-
cy.barsPreLoaderWait();
|
31
30
|
cy.log('Waiting for question instuctions to be displayed')
|
32
31
|
cy.wait(5000);
|
32
|
+
cy.barsPreLoaderWait();
|
33
33
|
textEntryMathWithImagePage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
|
34
34
|
textEntryMathWithImagePage.steps.addBackground();
|
35
35
|
textEntryMathWithImagePage.steps.allotPoints(10);
|
@@ -74,9 +74,6 @@ describe('Edit item - Text selection', () => {
|
|
74
74
|
textSelectionPage.steps.editItem();
|
75
75
|
textSelectionPage.steps.expandScoringTypeDropdown();
|
76
76
|
textSelectionPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
77
|
-
textSelectionPage.steps.switchToPreviewTab();
|
78
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray1[1]);
|
79
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray1[2]);
|
80
77
|
textSelectionPage.steps.saveAQuestionAndVerifySnackbar();
|
81
78
|
});
|
82
79
|
|
@@ -21,7 +21,7 @@ describe('Tool settings content for all views', () => {
|
|
21
21
|
before(() => {
|
22
22
|
switch (view) {
|
23
23
|
case 'Question preview':
|
24
|
-
cy.log('Navigating to
|
24
|
+
cy.log('Navigating to multiple selection response question type');
|
25
25
|
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
26
26
|
cy.barsPreLoaderWait();
|
27
27
|
multipleSelectionPage.steps.addTextInQuestionInstructionsInputField('Text');
|
@@ -74,7 +74,7 @@ describe('Tool settings content for all views', () => {
|
|
74
74
|
rulerPage.steps.verifyRulerNotVisible();
|
75
75
|
});
|
76
76
|
|
77
|
-
it(
|
77
|
+
it(`When user clicks on 'Show ruler' button in ${view}, then ruler should be displayed and its button should change to 'Hide ruler'`, () => {
|
78
78
|
rulerPage.steps.clickOnRulerVisibilityButton();
|
79
79
|
rulerPage.steps.verifyRulerVisible();
|
80
80
|
rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Hide');
|
@@ -177,7 +177,7 @@ describe('Tool settings content for all views', () => {
|
|
177
177
|
protractorPage.steps.verifyPreviewTabProtractorVisibilityButtonLabel('Hide');
|
178
178
|
});
|
179
179
|
|
180
|
-
it(
|
180
|
+
it(`When user has clicked visibility buttons for both the ruler and protractor tools in ${view}, both tools should be displayed simultaneously in the preview tab`, () => {
|
181
181
|
rulerPage.steps.verifyRulerVisible();
|
182
182
|
protractorPage.steps.verifyProtractorVisibleInPreviewTab();
|
183
183
|
});
|
@@ -44,7 +44,7 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
|
|
44
44
|
};
|
45
45
|
|
46
46
|
views.forEach((view) => {
|
47
|
-
describe(`
|
47
|
+
describe(`Charts - Dot: All or nothing scoring - ${view}`, { tags: 'smoke' }, () => {
|
48
48
|
abortEarlySetup();
|
49
49
|
before(() => {
|
50
50
|
switch (view) {
|
@@ -116,7 +116,7 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
|
|
116
116
|
};
|
117
117
|
|
118
118
|
//Note: Remove comment after https://redmine.zeuslearning.com/issues/570904 is resolved
|
119
|
-
it.skip(
|
119
|
+
it.skip(`${view} - Charts Dot - When the user selects \'Grading\' view without attempting the question, then by default correct dot column should have correct icons, incorrect dot column should have incorrect icons, the correct answer should be displayed in the correct answer section number line axis and correct/incorrect status message should not be displayed`, () => {
|
120
120
|
if (view === 'Grading view') {
|
121
121
|
studentViewPage.steps.submitResponse();
|
122
122
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
@@ -141,7 +141,7 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
|
|
141
141
|
chartsDotPlotPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
142
142
|
});
|
143
143
|
|
144
|
-
it(
|
144
|
+
it(`${view} - Charts Dot - When the user attempts the question incorrectly then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted dot column should be displayed incorrect and the correct answer should be displayed in the correct answer section number line axis`, () => {
|
145
145
|
chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 4, min: 1, interval: 1 });
|
146
146
|
chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
|
147
147
|
if (view === 'Grading view') {
|
@@ -170,7 +170,7 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
|
|
170
170
|
chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
171
171
|
});
|
172
172
|
|
173
|
-
it(
|
173
|
+
it(`${view} - Charts Dot - When the user attempts the question by adding more dots than required in the dot columns having dots by default, then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted dot column should be displayed incorrect and the correct answer should be displayed in the correct answer section number line axis`, () => {
|
174
174
|
if (view === 'Grading view') {
|
175
175
|
studentViewPage.steps.clearResponses();
|
176
176
|
};
|
@@ -201,7 +201,7 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
|
|
201
201
|
chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
202
202
|
});
|
203
203
|
|
204
|
-
it(
|
204
|
+
it(`${view} - Charts Dot - When the user attempts the question by setting fewer dots than required in the dot columns having dots by default, then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted dot column should be displayed incorrect and the correct answer should be displayed in the correct answer section number line axis`, () => {
|
205
205
|
if (view === 'Grading view') {
|
206
206
|
studentViewPage.steps.clearResponses();
|
207
207
|
};
|
@@ -233,7 +233,7 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
|
|
233
233
|
chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
234
234
|
});
|
235
235
|
|
236
|
-
it(
|
236
|
+
it(`${view} - Charts Dot - When the user attempts the question by removing all the dots to dot column that is not supposed to be empty, then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted dot column should be displayed incorrect and the correct answer should be displayed in the correct answer section number line axis`, () => {
|
237
237
|
if (view === 'Grading view') {
|
238
238
|
studentViewPage.steps.clearResponses();
|
239
239
|
};
|
@@ -265,7 +265,7 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
|
|
265
265
|
chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
266
266
|
});
|
267
267
|
|
268
|
-
it(
|
268
|
+
it(`${view} - Charts Dot - When the user attempts the question by adding dots to the dot columns that is supposed to be empty, then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the attempted dot column should be displayed incorrect and the correct answer should be displayed in the correct answer section number line axis`, () => {
|
269
269
|
if (view === 'Grading view') {
|
270
270
|
studentViewPage.steps.clearResponses();
|
271
271
|
};
|
@@ -297,7 +297,7 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
|
|
297
297
|
chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
298
298
|
});
|
299
299
|
|
300
|
-
it(
|
300
|
+
it(`${view} - Charts Dot - When the user attempts the question by changing number of dots in the dot columns which have the correct number of dots by default and setting a dot column correctly, then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should be displayed and the incorrectly attempted dot column should be displayed incorrect, correctly attempted dot column should be displayed correct, and the correct answer should be displayed in the correct answer section number line axis`, () => {
|
301
301
|
if (view === 'Grading view') {
|
302
302
|
studentViewPage.steps.clearResponses();
|
303
303
|
};
|
@@ -330,7 +330,7 @@ describe('Create Item page - Charts - Dot: All or nothing ', () => {
|
|
330
330
|
chartsDotPlotPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
331
331
|
});
|
332
332
|
|
333
|
-
it(
|
333
|
+
it(`${view} - Charts Dot - When the user attempts the question correctly, the user should be awarded with full points and on switching to grading view, \'Your answer is correct\' should be displayed and correct answer section should not be displayed`, () => {
|
334
334
|
if (view === 'Grading view') {
|
335
335
|
studentViewPage.steps.clearResponses();
|
336
336
|
};
|
@@ -88,7 +88,7 @@ describe('Create item page - Dot plot charts : Grading view, Correct answer view
|
|
88
88
|
chartsDotPlotPage.steps.verifyDotCountCorrectAnswerSection(2, { point: 1, min: 1, interval: 0.25 });
|
89
89
|
});
|
90
90
|
|
91
|
-
it('Correct answer section along with dot plot attempted by the user should be displayed', () => {
|
91
|
+
it('Charts Dot - Correct answer section along with dot plot attempted by the user should be displayed', () => {
|
92
92
|
chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 3, min: 1, interval: 0.25 });
|
93
93
|
chartsDotPlotPage.steps.verifyCorrectDotPreviewTab({ point: 3, min: 1, interval: 0.25 });
|
94
94
|
chartsDotPlotPage.steps.verifyIncorrectDotColumnPreviewTab({ point: 2, min: 1, interval: 0.25 });
|
@@ -181,7 +181,7 @@ describe('Create item page - Dot plot charts : Grading view, Correct answer view
|
|
181
181
|
chartsDotPlotPage.steps.verifyCorrectDotPreviewTab({ point: 3, min: 1, interval: 0.25 });
|
182
182
|
});
|
183
183
|
|
184
|
-
it('The points alloted to the question should be displayed', () => {
|
184
|
+
it('Charts Dot - The points alloted to the question should be displayed', () => {
|
185
185
|
correctAnswerViewPage.steps.verifyAvailablePoints(10);
|
186
186
|
});
|
187
187
|
|
@@ -188,6 +188,7 @@ describe('Select chart type section', () => {
|
|
188
188
|
it(`When user selects ${option} in line settings section, then number displayed on number line should be ${option} in select chart type and specify correct answer section`, () => {
|
189
189
|
chartsDotPlotPage.steps.selectLineSettingsToggleButton(option);
|
190
190
|
chartsDotPlotPage.steps.verifyLineSettingsToggleButtonSelected(option);
|
191
|
+
cy.wait(2000); // Wait for the number line to render
|
191
192
|
chartsDotPlotPage.steps.verifyLabelOnNumberLineAxisSpecifyCorrectAnswer([{ value: numbers[index], index: 5 }]);
|
192
193
|
chartsDotPlotPage.steps.verifyLabelOnNumberLineAxisSelectChartType([{ value: numbers[index], index: 5 }]);
|
193
194
|
});
|
@@ -370,7 +370,7 @@ describe('Create item page: Charts - Dot - Preview contents in all views', () =>
|
|
370
370
|
utilities.verifyElementNotDisabled(chartsDotPlotPage.controlOptionsPreviewTab(controlOptions[0]));
|
371
371
|
});
|
372
372
|
|
373
|
-
it(
|
373
|
+
it(`${view} - Charts Dot - 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 and control options should be in disabled state`, () => {
|
374
374
|
chartsDotPlotPage.steps.selectControlOptionPreviewTab(controlOptions[2]);
|
375
375
|
chartsDotPlotPage.steps.confirmReset();
|
376
376
|
chartsDotPlotPage.steps.verifyDotColumnIsLockedInPreviewTab({ point: 1, min: 1, interval: 0.25 });
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export const supportedFileType = {
|
2
2
|
fileTypeCategoryLabels: ['Document', 'Engineering and programming', 'Image', 'Video/Audio', 'Presentation', 'Miscellaneous'],
|
3
3
|
fileTypeList: ['Word', 'RTF', 'PUB', 'PDF', 'OOo', 'XLS', 'CSV', 'TXT', 'vlg', 'V', 'qsf', 'MATLab', 'LabVIEW', 'C++', 'C', 'asm', 'S', 'H', 'JSON', 'XML', 'PNG', 'JPG', 'GIF', 'HEIF', 'HEIC', 'MP4', 'HEVC', 'MP3', 'PPT', 'ZIP', 'XPS'],
|
4
|
-
defaultSelectedFileTypeList: ['Word', 'RTF', 'PUB', 'PDF', 'OOo', 'XLS', 'CSV', 'TXT', 'PNG', 'JPG', 'GIF', 'PPT', 'ZIP', 'XPS']
|
4
|
+
defaultSelectedFileTypeList: ['Word', 'RTF', 'PUB', 'PDF', 'OOo', 'XLS', 'CSV', 'TXT', 'PNG', 'JPG', 'GIF', 'PPT', 'ZIP', 'XPS']
|
5
5
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import utilities from "../support/helpers/utilities"
|
2
2
|
import { barAndLineChartComponent, chartsCommonComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, studentViewSettingsLabelComponent, layoutSectionComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent } from "./components";
|
3
3
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
4
|
+
import { createItemPage } from "./createItemPage";
|
4
5
|
import { dialogBoxBase } from "./dialogBoxBase";
|
5
6
|
const css = Cypress.env('css');
|
6
7
|
|
@@ -91,6 +92,8 @@ const steps = {
|
|
91
92
|
...additionalSettingsPanel.steps,
|
92
93
|
...selectQuestionResourceToolPage.steps,
|
93
94
|
...commonComponents.steps,
|
95
|
+
...createItemPage.steps,
|
96
|
+
|
94
97
|
/**
|
95
98
|
* @description set the bar height/value in the select chart type section chart
|
96
99
|
* @param {Object} barProperties - The properties and changes to be done on the bar
|
@@ -2,6 +2,7 @@ import utilities from "../support/helpers/utilities"
|
|
2
2
|
import { createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, chartsCommonComponent, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, layoutSectionComponent, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, studentViewSettingsLabelComponent } from "./components";
|
3
3
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
4
4
|
import { dialogBoxBase } from "./dialogBoxBase";
|
5
|
+
import { createItemPage } from "./createItemPage";
|
5
6
|
const css = Cypress.env('css');
|
6
7
|
|
7
8
|
const selectors = {
|
@@ -113,6 +114,7 @@ const steps = {
|
|
113
114
|
...selectQuestionResourceToolPage.steps,
|
114
115
|
...dialogBoxBase.steps,
|
115
116
|
...commonComponents.steps,
|
117
|
+
...createItemPage.steps,
|
116
118
|
|
117
119
|
//select chart type
|
118
120
|
selectDotPlot: () => {
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import utilities from "../support/helpers/utilities";
|
2
|
-
import { additionalSettingsAccessibilitySectionComponent, additionalSettingsPanel, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, barAndLineChartComponent, chartsCommonComponent, commonComponents, correctIncorrectAnswerLabelComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab } from "./components";
|
2
|
+
import { additionalSettingsAccessibilitySectionComponent, additionalSettingsPanel, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, barAndLineChartComponent, chartsCommonComponent, commonComponents, correctIncorrectAnswerLabelComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, layoutSectionComponent } from "./components";
|
3
3
|
import { dialogBoxBase } from "./dialogBoxBase";
|
4
4
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
5
|
+
import { createItemPage } from "./createItemPage";
|
5
6
|
const css = Cypress.env('css');
|
6
7
|
|
7
8
|
const selectors = {
|
@@ -20,6 +21,7 @@ const selectors = {
|
|
20
21
|
pointLockIcon: () => cy.get('[class*="ChartGridstyle__LineLockIconWrapper"]'),
|
21
22
|
lineChartDragIcon: () => cy.get('.line-chart-drag-icon'),
|
22
23
|
selectChartTypePointLabel: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartGridstyle__NameDiv-"]'),
|
24
|
+
newPointLabelInputField: () => cy.get('.label-options-wrapper .text-field'),
|
23
25
|
|
24
26
|
//specify correct answer section
|
25
27
|
specifyCorrectAnswerPoint: () => cy.get('.ngie-accordion .ngie-chart-point'),
|
@@ -49,7 +51,9 @@ const steps = {
|
|
49
51
|
...autoScoredSpecifyCorrectAnswerSection.steps,
|
50
52
|
...correctIncorrectAnswerLabelComponent.steps,
|
51
53
|
...commonComponents.steps,
|
52
|
-
|
54
|
+
...createItemPage.steps,
|
55
|
+
...layoutSectionComponent.steps,
|
56
|
+
|
53
57
|
/**
|
54
58
|
* @description set the point height/value in the select chart type section chart
|
55
59
|
* @param {Object} pointProperties - The properties and changes to be done on the point
|
@@ -115,6 +119,25 @@ const steps = {
|
|
115
119
|
utilities.hoverAwayFromElement();
|
116
120
|
},
|
117
121
|
|
122
|
+
/**
|
123
|
+
* @description Unlock the point in select chart type section chart
|
124
|
+
* @param {number} pointIndex Index of the bar to be unlocked
|
125
|
+
*/
|
126
|
+
unlockPoint: (pointIndex) => {
|
127
|
+
utilities.triggerMouseover(utilities.getNthElement(chartsLinePage.selectChartTypePoint(), pointIndex))
|
128
|
+
chartsLinePage.barAndPointTooltipLockUnlockButton()
|
129
|
+
.click();
|
130
|
+
chartsLinePage.barAndPointTooltipLockUnlockButton()
|
131
|
+
.should('have.attr', 'aria-label', 'unlocked bar');
|
132
|
+
utilities.triggerMouseout(utilities.getNthElement(chartsLinePage.selectChartTypePoint(), pointIndex));
|
133
|
+
cy.wait(500); // Add a small delay to ensure the tooltip is hidden
|
134
|
+
utilities.getNthElement(chartsLinePage.selectChartTypePoint(), pointIndex)
|
135
|
+
.within(() => {
|
136
|
+
utilities.verifyElementVisibilityState(chartsLinePage.pointLockIcon(), 'notExist');
|
137
|
+
});
|
138
|
+
utilities.hoverAwayFromElement();
|
139
|
+
},
|
140
|
+
|
118
141
|
/**
|
119
142
|
* @description set the point height/value in the specify correct answer section
|
120
143
|
* @param {Object} pointProperties - The properties and changes to be done on the point
|
@@ -484,6 +507,7 @@ const steps = {
|
|
484
507
|
chartsLinePage.steps.addInputToChartLabelPopupInputField(pointLabel);
|
485
508
|
chartsLinePage.steps.saveGraphLabelPopup();
|
486
509
|
utilities.triggerMouseout(utilities.getNthElement(chartsLinePage.specifyCorrectAnswerPoint(), pointIndex));
|
510
|
+
cy.wait(500); // Add a small delay to ensure the tooltip is hidden
|
487
511
|
cy.log('Need the following click to remove focus from the above element');
|
488
512
|
chartsLinePage.specifyCorrectAnswerLabelPoints().click();
|
489
513
|
utilities.verifyInnerText(utilities.getNthElement(chartsLinePage.specifyCorrectAnswerPointLabel(), pointIndex), pointLabel);
|
@@ -510,6 +534,17 @@ const steps = {
|
|
510
534
|
let pointHeight = pointValue / range;
|
511
535
|
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
512
536
|
.should('have.attr', 'height', pointHeight);
|
537
|
+
},
|
538
|
+
|
539
|
+
/**
|
540
|
+
* Updates the value of the input field for new point labels.
|
541
|
+
* @param {string} text - The text to be entered into the input field.
|
542
|
+
*/
|
543
|
+
updateNewPointLabelInputFieldValue: (text) => {
|
544
|
+
chartsLinePage.newPointLabelInputField()
|
545
|
+
.clear()
|
546
|
+
.type(text)
|
547
|
+
.should('have.value', text);
|
513
548
|
}
|
514
549
|
}
|
515
550
|
|
@@ -600,6 +635,7 @@ const tests = {
|
|
600
635
|
|
601
636
|
it(`User should be able to delete point in ${accordionName} accordion and labels for other points should not change`, () => {
|
602
637
|
utilities.triggerMouseout(utilities.getNthElement(chartsLinePage.selectChartTypePoint(), 0));
|
638
|
+
cy.wait(500); // Add a small delay to ensure the tooltip is hidden
|
603
639
|
cy.log('Need the following click to remove focus from the above element');
|
604
640
|
chartsLinePage.specifyCorrectAnswerLabelPoints()
|
605
641
|
.click();
|
@@ -77,6 +77,8 @@ const steps = {
|
|
77
77
|
expandPenaltyScoringDropdown: () => {
|
78
78
|
autoScoredScoringSectionMultiResponseType.penaltyScoringDropdown()
|
79
79
|
.click();
|
80
|
+
cy.wait(500);
|
81
|
+
utilities.verifyElementVisibilityState(autoScoredScoringSectionMultiResponseType.penaltyScoringDropdownListOptions(), 'visible');
|
80
82
|
},
|
81
83
|
|
82
84
|
/**
|
@@ -53,16 +53,16 @@ const steps = {
|
|
53
53
|
},
|
54
54
|
|
55
55
|
/**
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
* This function navigates to the question using the referenceId
|
57
|
+
* @param {string} referenceId The referenceId of the item that needs to be navigated to
|
58
|
+
*/
|
59
59
|
navigateToQuestionUsingReferenceId: (referenceId) => {
|
60
60
|
browseItemsPage.browseItemsItem()
|
61
61
|
.contains(referenceId)
|
62
62
|
.click();
|
63
63
|
},
|
64
64
|
|
65
|
-
|
65
|
+
/*
|
66
66
|
* This function verifies the warning icon in browse item save as you go
|
67
67
|
* @param {string} referenceID reference id of the saved question
|
68
68
|
*/
|