itemengine-cypress-automation 1.0.167-repoUpdate10April-1465c8c.0 → 1.0.169-uploadResponseMigration-83ab996.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +11 -22
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +7 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +6 -11
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +36 -2
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +34 -22
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +24 -8
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +25 -5
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +114 -68
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +111 -67
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +123 -71
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +63 -41
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +25 -21
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +85 -50
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -68
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +98 -54
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +120 -72
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
- package/cypress/fixtures/theme/ilc.json +26 -14
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +0 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +2 -2
- package/cypress/pages/components/gridQuestionCommonComponent.js +2 -629
- package/cypress/pages/components/index.js +0 -3
- package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
- package/cypress/pages/components/measuringToolComponent.js +2 -2
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +4 -6
- package/cypress/pages/components/specifyRowsAndColumnsComponent.js +3 -60
- package/cypress/pages/components/toolSettingsComponent.js +12 -80
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +8 -0
- package/cypress/pages/feedbackScalePage.js +449 -591
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +1 -3
- package/cypress/pages/graphingPage.js +145 -9
- package/cypress/pages/gridFillPage.js +120 -135
- package/cypress/pages/highlightPage.js +394 -0
- package/cypress/pages/index.js +2 -5
- package/cypress/pages/matchingPage.js +20 -78
- package/cypress/pages/multipleSelectionGridPage.js +1 -88
- package/cypress/pages/singleSelectionGridPage.js +0 -86
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +38 -1
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
- package/cypress/support/migrationHelpers/migrationScript.js +4 -0
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +34 -2
- package/package.json +1 -1
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +0 -83
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +0 -200
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +0 -56
- package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -95
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +0 -71
- package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +0 -72
- package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +0 -71
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
- package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +0 -308
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +0 -216
- package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +0 -336
- package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +0 -570
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +0 -214
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -355
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +0 -309
- package/cypress/e2e/ILC/Matching/toolSettings.js +0 -72
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +0 -1033
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +0 -236
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -239
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -278
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +0 -178
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +0 -407
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +0 -273
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +0 -278
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +0 -228
- package/cypress/e2e/ILC/NumberLine/additionalSettings.js +0 -120
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +0 -659
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +0 -149
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +0 -151
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -171
- package/cypress/e2e/ILC/NumberLine/headerSection.js +0 -76
- package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -54
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +0 -200
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +0 -67
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +0 -135
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +0 -73
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +0 -372
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +0 -1014
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -235
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -235
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -235
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -457
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -342
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -342
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -342
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -155
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -314
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -275
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -314
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -290
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -142
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +0 -137
- package/cypress/pages/brainingCampManipulativePage.js +0 -122
- package/cypress/pages/components/defaultToolDropdown.js +0 -77
- package/cypress/pages/components/resetPopupComponent.js +0 -74
- package/cypress/pages/components/toolsAndControlsComponent.js +0 -69
- package/cypress/pages/feedbackScalePage copy.js +0 -716
- package/cypress/pages/numberLinePage.js +0 -723
- package/cypress/pages/textSelectionPage.js +0 -582
@@ -1,142 +0,0 @@
|
|
1
|
-
import { textSelectionPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
-
import utilities from "../../../support/helpers/utilities";
|
4
|
-
var itemReferenceID = "";
|
5
|
-
const checkAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
6
|
-
const views = utilities.getViews(checkAnswerViews);
|
7
|
-
const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.'];
|
8
|
-
|
9
|
-
describe('Create item page - Matching - Check answer functionality', () => {
|
10
|
-
before(() => {
|
11
|
-
cy.loginAs('admin');
|
12
|
-
});
|
13
|
-
|
14
|
-
views.forEach((view) => {
|
15
|
-
//Note: Remove after https://redmine.zeuslearning.com/issues/549542 is fixed
|
16
|
-
const checkAnswer = (view) => {
|
17
|
-
switch (view) {
|
18
|
-
case 'Question preview':
|
19
|
-
case 'Item preview':
|
20
|
-
textSelectionPage.steps.checkAnswer();
|
21
|
-
break;
|
22
|
-
case 'Student view':
|
23
|
-
studentViewPage.steps.checkAnswer();
|
24
|
-
break;
|
25
|
-
default:
|
26
|
-
throw new Error(`Unsupported page identifier: ${view}`);
|
27
|
-
}
|
28
|
-
};
|
29
|
-
|
30
|
-
describe(`${view} - Check answer functionality`, { tags: 'smoke' }, () => {
|
31
|
-
abortEarlySetup();
|
32
|
-
before(() => {
|
33
|
-
switch (view) {
|
34
|
-
case 'Question preview':
|
35
|
-
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
36
|
-
cy.barsPreLoaderWait();
|
37
|
-
textSelectionPage.steps.addTextInQuestionInstructionsInputField('Highlight the correct statements.');
|
38
|
-
textSelectionPage.steps.clearQuestionInputField();
|
39
|
-
paragraphTextArray.forEach((paragraphText) => {
|
40
|
-
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
41
|
-
});
|
42
|
-
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
43
|
-
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
44
|
-
textSelectionPage.steps.clickOnOptionInHighlightOptionsSection(paragraphTextArray[0]);
|
45
|
-
textSelectionPage.steps.clickOnOptionInHighlightOptionsSection(paragraphTextArray[1]);
|
46
|
-
textSelectionPage.steps.clickOnOptionInHighlightOptionsSection(paragraphTextArray[2]);
|
47
|
-
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
48
|
-
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
|
49
|
-
textSelectionPage.steps.allotPoints(20);
|
50
|
-
textSelectionPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
51
|
-
textSelectionPage.steps.switchToPreviewTab();
|
52
|
-
break;
|
53
|
-
case 'Item preview':
|
54
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
55
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
56
|
-
break;
|
57
|
-
case 'Student view':
|
58
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
59
|
-
break;
|
60
|
-
}
|
61
|
-
});
|
62
|
-
|
63
|
-
beforeEach(() => {
|
64
|
-
switch (view) {
|
65
|
-
case 'Question preview':
|
66
|
-
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
67
|
-
textSelectionPage.steps.resetQuestionPreview();
|
68
|
-
break;
|
69
|
-
case 'Item preview':
|
70
|
-
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
71
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
72
|
-
break;
|
73
|
-
case 'Student view':
|
74
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
75
|
-
break;
|
76
|
-
}
|
77
|
-
});
|
78
|
-
|
79
|
-
if (view === 'Question preview') {
|
80
|
-
after(() => {
|
81
|
-
textSelectionPage.steps.clickOnSaveQuestionButton();
|
82
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
83
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
84
|
-
});
|
85
|
-
};
|
86
|
-
|
87
|
-
it('When the user selects \'Check answer\' button without attempting the question, then correct/incorrect icons, correct/incorrect answer status message and correct answer section should not be displayed', () => {
|
88
|
-
checkAnswer(view);
|
89
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconsNotExist();
|
90
|
-
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
91
|
-
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
92
|
-
});
|
93
|
-
|
94
|
-
it('When the user attempts the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
95
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
|
96
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[3]);
|
97
|
-
checkAnswer(view);
|
98
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
99
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
100
|
-
textSelectionPage.steps.verifyIncorrectIconForOption(paragraphTextArray[2]);
|
101
|
-
textSelectionPage.steps.verifyIncorrectIconForOption(paragraphTextArray[3]);
|
102
|
-
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
103
|
-
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
104
|
-
});
|
105
|
-
|
106
|
-
it('When the user attempts the question partially correct and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, correct icons should be displayed besides correct responses, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
107
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
|
108
|
-
checkAnswer(view);
|
109
|
-
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[0]);
|
110
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
111
|
-
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
|
112
|
-
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
|
113
|
-
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
114
|
-
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
115
|
-
});
|
116
|
-
|
117
|
-
it('When the user attempts the question partially correct with an incorrect response, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
118
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
|
119
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
|
120
|
-
checkAnswer(view);
|
121
|
-
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[0]);
|
122
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
123
|
-
textSelectionPage.steps.verifyIncorrectIconForOption(paragraphTextArray[2]);
|
124
|
-
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
|
125
|
-
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
126
|
-
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
127
|
-
});
|
128
|
-
|
129
|
-
it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
130
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
|
131
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
|
132
|
-
checkAnswer(view);
|
133
|
-
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[0]);
|
134
|
-
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[1]);
|
135
|
-
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
|
136
|
-
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
|
137
|
-
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
138
|
-
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
139
|
-
});
|
140
|
-
});
|
141
|
-
});
|
142
|
-
});
|
@@ -1,137 +0,0 @@
|
|
1
|
-
import { textSelectionPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
-
import utilities from "../../../support/helpers/utilities";
|
4
|
-
const css = Cypress.env('css');
|
5
|
-
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
6
|
-
const views = utilities.getViews(previewContentViews);
|
7
|
-
var itemReferenceID = "";
|
8
|
-
|
9
|
-
const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.'];
|
10
|
-
|
11
|
-
describe('Create item page - Text selection : Preview contents', () => {
|
12
|
-
before(() => {
|
13
|
-
cy.loginAs('admin');
|
14
|
-
});
|
15
|
-
|
16
|
-
views.forEach((view) => {
|
17
|
-
describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
|
18
|
-
abortEarlySetup();
|
19
|
-
before(() => {
|
20
|
-
switch (view) {
|
21
|
-
case 'Question preview':
|
22
|
-
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
23
|
-
cy.barsPreLoaderWait();
|
24
|
-
textSelectionPage.steps.addTextInQuestionInstructionsInputField('Select the correct statements.');
|
25
|
-
textSelectionPage.steps.clearQuestionInputField();
|
26
|
-
paragraphTextArray.forEach((paragraphText) => {
|
27
|
-
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
28
|
-
});
|
29
|
-
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
30
|
-
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
31
|
-
textSelectionPage.steps.clickOnOptionInHighlightOptionsSection(paragraphTextArray[0]);
|
32
|
-
textSelectionPage.steps.clickOnOptionInHighlightOptionsSection(paragraphTextArray[1]);
|
33
|
-
textSelectionPage.steps.clickOnOptionInHighlightOptionsSection(paragraphTextArray[2]);
|
34
|
-
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
35
|
-
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
|
36
|
-
textSelectionPage.steps.allotPoints(20);
|
37
|
-
textSelectionPage.steps.switchToPreviewTab();
|
38
|
-
break;
|
39
|
-
case 'Item view':
|
40
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
41
|
-
break;
|
42
|
-
case 'Item preview':
|
43
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
44
|
-
textSelectionPage.steps.switchToPreviewTab();
|
45
|
-
break;
|
46
|
-
case 'Student view':
|
47
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
48
|
-
break;
|
49
|
-
case 'Grading view':
|
50
|
-
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
51
|
-
break;
|
52
|
-
case 'Correct answer view':
|
53
|
-
cy.visit(`/item-engine/demo/render-item/correct-answer-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
|
-
textSelectionPage.steps.clickOnSaveQuestionButton();
|
63
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
64
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
65
|
-
}
|
66
|
-
if (view === 'Student view') {
|
67
|
-
studentViewPage.steps.submitResponse();
|
68
|
-
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
69
|
-
}
|
70
|
-
});
|
71
|
-
|
72
|
-
it('Question instructions should be visible', () => {
|
73
|
-
utilities.verifyInnerText(textSelectionPage.questionInstructionsText(), 'Highlight the correct statements.');
|
74
|
-
utilities.verifyElementVisibilityState(textSelectionPage.questionInstructionsText(), 'visible');
|
75
|
-
});
|
76
|
-
|
77
|
-
it('The added text in Question input field should be displayed in the preview tab question', () => {
|
78
|
-
paragraphTextArray.forEach((paragraphText, index) => {
|
79
|
-
utilities.verifyInnerText(utilities.getNthElement(textSelectionPage.questionTextPreviewTab(), index), `${paragraphText}`);
|
80
|
-
});
|
81
|
-
});
|
82
|
-
|
83
|
-
it('The text which is not available as option should not be interactive in preview tab', () => {
|
84
|
-
textSelectionPage.steps.verifyNonOptionTextIsNotInteractiveInPreviewTab(paragraphTextArray[3]);
|
85
|
-
});
|
86
|
-
|
87
|
-
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
88
|
-
it('The selected options in specify possible options section should be displayed and by default all options should not be selected', () => {
|
89
|
-
for (let index = 0; index < 3; index++) {
|
90
|
-
utilities.verifyInnerText(utilities.getNthElement(textSelectionPage.optionPreviewTab(), index), paragraphTextArray[index]);
|
91
|
-
utilities.verifyElementVisibilityState(utilities.getNthElement(textSelectionPage.optionPreviewTab(), index), 'visible');
|
92
|
-
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[index]);
|
93
|
-
};
|
94
|
-
utilities.verifyElementCount(textSelectionPage.optionPreviewTab(), 3);
|
95
|
-
});
|
96
|
-
|
97
|
-
it('When user hovers on the available options, then those options should be displayed in hover state highlight', () => {
|
98
|
-
for (let index = 0; index < 3; index++) {
|
99
|
-
textSelectionPage.steps.verifyHoverStateOfOptionInPreviewTab(paragraphTextArray[index], "blue");
|
100
|
-
};
|
101
|
-
});
|
102
|
-
|
103
|
-
it('When user selects an option, then that option should be displayed in selected state', () => {
|
104
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
|
105
|
-
textSelectionPage.steps.verifySelectedStateOptionInPreviewTab(paragraphTextArray[0], "blue");
|
106
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
|
107
|
-
textSelectionPage.steps.verifySelectedStateOptionInPreviewTab(paragraphTextArray[1], "blue");
|
108
|
-
});
|
109
|
-
|
110
|
-
it('When user clicks on a selected option, then that option should be deselected', () => {
|
111
|
-
textSelectionPage.steps.deselectOptionInPreviewTab(paragraphTextArray[0]);
|
112
|
-
textSelectionPage.steps.verifyDeselectedStateOptionInPreviewTab(paragraphTextArray[0]);
|
113
|
-
});
|
114
|
-
} else if (view === 'Grading view') {
|
115
|
-
it('The question text should be displayed with the selected correct options and status message \' Your answer is correct\' should be displayed', () => {
|
116
|
-
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[0]);
|
117
|
-
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[1]);
|
118
|
-
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
119
|
-
});
|
120
|
-
|
121
|
-
it('The submitted answer options should not be editable', () => {
|
122
|
-
textSelectionPage.steps.clickOnOptionInPreviewTab(paragraphTextArray[0]);
|
123
|
-
textSelectionPage.steps.verifyOptionIsSelectedInPreviewTab(paragraphTextArray[0]);
|
124
|
-
textSelectionPage.steps.clickOnOptionInPreviewTab(paragraphTextArray[2]);
|
125
|
-
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
|
126
|
-
});
|
127
|
-
} else {
|
128
|
-
it('The question text should be displayed with the selected correct options', () => {
|
129
|
-
for (let index = 0; index < 2; index++) {
|
130
|
-
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[index]);
|
131
|
-
};
|
132
|
-
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
|
133
|
-
});
|
134
|
-
}
|
135
|
-
});
|
136
|
-
});
|
137
|
-
});
|
@@ -1,122 +0,0 @@
|
|
1
|
-
import { questionInstructionsComponent, createQuestionBasePage, scoringSectionBaseEditTab, commonComponents, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, toolSettingsComponent } from "./components"
|
2
|
-
|
3
|
-
const selectors = {
|
4
|
-
...questionInstructionsComponent,
|
5
|
-
...commonComponents,
|
6
|
-
...scoringSectionBaseEditTab,
|
7
|
-
...additionalSettingsPanel,
|
8
|
-
addManipulativeLabel: () => cy.get('[class*="BrainingcampManipulativestyle__GroupNavigationWrapper"] [class*="BrainingcampManipulativestyle__WrapperSubHeader"]'),
|
9
|
-
selectAManipulativeToggleButton: () => cy.get('[data-ngie-testid="select-a-manipulative-toggle-button"]'),
|
10
|
-
enterShareCodeToggleButton: () => cy.get('[data-ngie-testid="enter-share-code-toggle-button"]'),
|
11
|
-
selectAManipulativeToggleButtonLabel: () => cy.get('.ngie-toggle-button-label').eq(0),
|
12
|
-
enterShareCodeToggleButtonLabel: () => cy.get('.ngie-toggle-button-label').eq(1),
|
13
|
-
manipulativeOptionToggleButton: (ariaLabel = null) => {
|
14
|
-
if (ariaLabel) {
|
15
|
-
return cy.get(`[class*="BrainingcampManipulativestyle__ManipulativeCard"][role="button"][aria-label*="${ariaLabel}"]`)
|
16
|
-
} else {
|
17
|
-
return cy.get('[class*="BrainingcampManipulativestyle__ManipulativeCard"][role="button"]')
|
18
|
-
}
|
19
|
-
},
|
20
|
-
selectAManipulativeLabel: () => cy.get('[class*="SelectManipulativeWrapper"] [class*="BrainingcampManipulativestyle__WrapperSubHeader"]'),
|
21
|
-
enterAShareCodeLabel: () => cy.get('[class*="EnterShareCodeWrapper"] [class*="BrainingcampManipulativestyle__WrapperSubHeader"]'),
|
22
|
-
enterAShareCodeInputField: () => cy.get('[class*="EnterShareCodeWrapper"] input'),
|
23
|
-
previewTabCanvas: () => cy.get('.canvas'),
|
24
|
-
}
|
25
|
-
|
26
|
-
const steps = {
|
27
|
-
...createQuestionBasePage.steps,
|
28
|
-
...questionInstructionsComponent.steps,
|
29
|
-
...scoringSectionBaseEditTab.steps,
|
30
|
-
...commonComponents.steps,
|
31
|
-
...additionalSettingsPanel.steps,
|
32
|
-
...toolSettingsComponent.steps,
|
33
|
-
|
34
|
-
verifySelectAManipulativeToggleButtonIsSelected: () => {
|
35
|
-
brainingCampManipulativePage.selectAManipulativeToggleButton()
|
36
|
-
.should('have.attr', 'aria-pressed', 'true');
|
37
|
-
},
|
38
|
-
|
39
|
-
verifySelectAManipulativeToggleButtonIsNotSelected: () => {
|
40
|
-
brainingCampManipulativePage.selectAManipulativeToggleButton()
|
41
|
-
.should('have.attr', 'aria-pressed', 'false');
|
42
|
-
},
|
43
|
-
|
44
|
-
verifyEnterShareCodeToggleButtonIsSelected: () => {
|
45
|
-
brainingCampManipulativePage.enterShareCodeToggleButton()
|
46
|
-
.should('have.attr', 'aria-pressed', 'true');
|
47
|
-
},
|
48
|
-
|
49
|
-
verifyEnterShareCodeToggleButtonIsNotSelected: () => {
|
50
|
-
brainingCampManipulativePage.enterShareCodeToggleButton()
|
51
|
-
.should('have.attr', 'aria-pressed', 'false');
|
52
|
-
},
|
53
|
-
|
54
|
-
/**
|
55
|
-
* @description Select a manipulative in edit tab
|
56
|
-
* @param {string} manipulativeName Name of the manipulative
|
57
|
-
*/
|
58
|
-
selectAManipulative: (manipulativeName) => {
|
59
|
-
brainingCampManipulativePage.manipulativeOptionToggleButton(manipulativeName)
|
60
|
-
.click()
|
61
|
-
.should('have.attr', 'aria-label', `${manipulativeName} pressed toggle`);
|
62
|
-
},
|
63
|
-
|
64
|
-
/**
|
65
|
-
* @description Verify a manipulative is selected
|
66
|
-
* @param {string} manipulativeName Name of the manipulative
|
67
|
-
*/
|
68
|
-
verifyAManipulativeOptionIsSelected: (manipulativeName) => {
|
69
|
-
brainingCampManipulativePage.manipulativeOptionToggleButton(manipulativeName)
|
70
|
-
.should('have.attr', 'aria-label', `${manipulativeName} pressed toggle`);
|
71
|
-
},
|
72
|
-
|
73
|
-
/**
|
74
|
-
* @description Verify a manipulative is not selected
|
75
|
-
* @param {string} manipulativeName Name of the manipulative
|
76
|
-
*/
|
77
|
-
verifyAManipulativeOptionIsNotSelected: (manipulativeName) => {
|
78
|
-
brainingCampManipulativePage.manipulativeOptionToggleButton(manipulativeName)
|
79
|
-
.should('have.attr', 'aria-label', `${manipulativeName} not pressed toggle`);
|
80
|
-
},
|
81
|
-
|
82
|
-
selectEnterShareCodeToggleButton: () => {
|
83
|
-
brainingCampManipulativePage.enterShareCodeToggleButton()
|
84
|
-
.click()
|
85
|
-
.should('have.attr', 'aria-pressed', 'true');
|
86
|
-
},
|
87
|
-
|
88
|
-
selectSelectAManipulativeToggleButton: () => {
|
89
|
-
brainingCampManipulativePage.selectAManipulativeToggleButton()
|
90
|
-
.click()
|
91
|
-
.should('have.attr', 'aria-pressed', 'true');
|
92
|
-
},
|
93
|
-
|
94
|
-
focusInAndFocusOutOfEnterAShareCodeInputField: () => {
|
95
|
-
brainingCampManipulativePage.enterAShareCodeInputField()
|
96
|
-
.click()
|
97
|
-
.blur();
|
98
|
-
},
|
99
|
-
|
100
|
-
addShareCodeInEnterAShareCodeInputField: (shareCode) => {
|
101
|
-
brainingCampManipulativePage.enterAShareCodeInputField()
|
102
|
-
.clear()
|
103
|
-
.type(shareCode)
|
104
|
-
.blur();
|
105
|
-
},
|
106
|
-
}
|
107
|
-
|
108
|
-
const tests = {
|
109
|
-
...createQuestionBasePage.tests,
|
110
|
-
...questionInstructionsComponent.tests,
|
111
|
-
...commonComponents.tests,
|
112
|
-
...scoringSectionBaseEditTab.tests,
|
113
|
-
...additionalSettingsPanel.tests,
|
114
|
-
...additionalSettingsAccessibilitySectionComponent.tests,
|
115
|
-
...toolSettingsComponent.steps,
|
116
|
-
}
|
117
|
-
|
118
|
-
export const brainingCampManipulativePage = {
|
119
|
-
...selectors,
|
120
|
-
steps,
|
121
|
-
tests
|
122
|
-
}
|
@@ -1,77 +0,0 @@
|
|
1
|
-
import utilities from "../../support/helpers/utilities";
|
2
|
-
const css = Cypress.env('css');
|
3
|
-
|
4
|
-
const selectors = {
|
5
|
-
defaultToolDropdownLabel: () => cy.get('#Default-tool-dropdown-label'),
|
6
|
-
defaultToolDropdown: () => cy.get('#Default-tool-select'),
|
7
|
-
defaultToolDropdownOptions: (dropdownOption = null) => {
|
8
|
-
if (dropdownOption) {
|
9
|
-
return cy.get(`[aria-labelledby*="Default-tool"] [role="option"][aria-label*="${dropdownOption}"]`)
|
10
|
-
} else {
|
11
|
-
return cy.get('[aria-labelledby*="Default-tool"] [role="option"]')
|
12
|
-
}
|
13
|
-
},
|
14
|
-
}
|
15
|
-
|
16
|
-
const steps = {
|
17
|
-
expandDefaultToolDropdown: () => {
|
18
|
-
defaultToolDropdown.defaultToolDropdown()
|
19
|
-
.click();
|
20
|
-
},
|
21
|
-
|
22
|
-
/**
|
23
|
-
* This function selects dropdown option from default tool dropdown
|
24
|
-
* @param {string} dropdownOption aria-label of the dropdown option
|
25
|
-
*/
|
26
|
-
selectOptionFromDefaultToolDropdown: (dropdownOption) => {
|
27
|
-
defaultToolDropdown.defaultToolDropdownOptions(dropdownOption)
|
28
|
-
.eq(0)
|
29
|
-
.click();
|
30
|
-
},
|
31
|
-
}
|
32
|
-
|
33
|
-
const tests = {
|
34
|
-
verifyDefaultToolDropdown:(toolOptionsArray)=>{
|
35
|
-
it('\'Default tool\' label and dropdown should be displayed with \'Point\' option selected by default', () => {
|
36
|
-
utilities.verifyInnerText(defaultToolDropdown.defaultToolDropdownLabel(), 'Default tool');
|
37
|
-
utilities.verifyInnerText(defaultToolDropdown.defaultToolDropdown(), toolOptionsArray[0]);
|
38
|
-
});
|
39
|
-
|
40
|
-
it(`${toolOptionsArray} options should be displayed when the user expands the \'Default tool\' dropdown`, () => {
|
41
|
-
defaultToolDropdown.steps.expandDefaultToolDropdown();
|
42
|
-
toolOptionsArray.forEach((dropdownOption) => {
|
43
|
-
utilities.verifyElementVisibilityState(defaultToolDropdown.defaultToolDropdownOptions(dropdownOption), 'exist');
|
44
|
-
});
|
45
|
-
utilities.verifyElementCount(defaultToolDropdown.defaultToolDropdownOptions(), toolOptionsArray.length);
|
46
|
-
defaultToolDropdown.steps.selectOptionFromDefaultToolDropdown(toolOptionsArray[0]);
|
47
|
-
});
|
48
|
-
|
49
|
-
it('CSS of default tool dropdown', { tags: 'css' }, () => {
|
50
|
-
defaultToolDropdown.steps.expandDefaultToolDropdown();
|
51
|
-
utilities.verifyCSS(defaultToolDropdown.defaultToolDropdownLabel(), {
|
52
|
-
'color': css.color.labels,
|
53
|
-
'font-size': css.fontSize.normal,
|
54
|
-
'font-weight': css.fontWeight.semibold
|
55
|
-
});
|
56
|
-
utilities.verifyCSS(defaultToolDropdown.defaultToolDropdownOptions('Point'), {
|
57
|
-
'color': css.color.liText,
|
58
|
-
'background-color': css.color.liTextSelectedBg,
|
59
|
-
'font-size': css.fontSize.default,
|
60
|
-
'font-weight': css.fontWeight.regular
|
61
|
-
});
|
62
|
-
utilities.verifyCSS(defaultToolDropdown.defaultToolDropdownOptions('Segment'), {
|
63
|
-
'color': css.color.liText,
|
64
|
-
'background-color': css.color.transparent,
|
65
|
-
'font-size': css.fontSize.default,
|
66
|
-
'font-weight': css.fontWeight.regular
|
67
|
-
});
|
68
|
-
defaultToolDropdown.steps.selectOptionFromDefaultToolDropdown('Point');
|
69
|
-
});
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
export const defaultToolDropdown = {
|
74
|
-
...selectors,
|
75
|
-
steps,
|
76
|
-
tests
|
77
|
-
}
|
@@ -1,74 +0,0 @@
|
|
1
|
-
import utilities from "../../support/helpers/utilities";
|
2
|
-
import { dialogBoxBase } from "../dialogBoxBase";
|
3
|
-
const css = Cypress.env('css');
|
4
|
-
|
5
|
-
const selectors = {
|
6
|
-
resetPopupConfirmResetButton: () => cy.get('.accept-button'),
|
7
|
-
resetPopupCancelButton: () => cy.get('.reject-button'),
|
8
|
-
}
|
9
|
-
|
10
|
-
const steps = {
|
11
|
-
confirmReset: () => {
|
12
|
-
resetPopupComponent.resetPopupConfirmResetButton()
|
13
|
-
.click();
|
14
|
-
},
|
15
|
-
|
16
|
-
cancelReset: () => {
|
17
|
-
resetPopupComponent.resetPopupCancelButton()
|
18
|
-
.click();
|
19
|
-
}
|
20
|
-
}
|
21
|
-
|
22
|
-
const tests = {
|
23
|
-
verifyResetPopupContentWithCSSAndA11y: () => {
|
24
|
-
it('When the user clicks on the \'Reset\' button then a dialog box should appear with title \'Reset\'', () => {
|
25
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
26
|
-
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Reset');
|
27
|
-
});
|
28
|
-
|
29
|
-
it('The dialog box should have content \'Are you sure you want to reset the graph? This will clear all objects and revert all settings to their default values.\' with \'Cancel\' and \'Confirm reset\' buttons should be displayed', () => {
|
30
|
-
utilities.verifyInnerText(dialogBoxBase.dialogBoxContent(), 'Are you sure you want to reset the graph? This will clear all objects and revert all settings to their default values.');
|
31
|
-
utilities.verifyInnerText(resetPopupComponent.resetPopupConfirmResetButton(), 'Confirm reset');
|
32
|
-
utilities.verifyInnerText(resetPopupComponent.resetPopupCancelButton(), 'Cancel');
|
33
|
-
});
|
34
|
-
|
35
|
-
it('CSS of Reset dialog box', { tags: 'css' }, () => {
|
36
|
-
utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
|
37
|
-
'color': css.color.flyoutTitle,
|
38
|
-
'font-size': css.fontSize.default,
|
39
|
-
'font-weight': css.fontWeight.regular
|
40
|
-
});
|
41
|
-
utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
|
42
|
-
'color': css.color.labels,
|
43
|
-
'font-size': css.fontSize.default,
|
44
|
-
'font-weight': css.fontWeight.regular
|
45
|
-
});
|
46
|
-
utilities.verifyCSS(resetPopupComponent.resetPopupCancelButton().find('p'), {
|
47
|
-
'color': css.color.secondaryBtn,
|
48
|
-
'font-size': css.fontSize.default,
|
49
|
-
'font-weight': css.fontWeight.semibold
|
50
|
-
});
|
51
|
-
utilities.verifyCSS(resetPopupComponent.resetPopupCancelButton(), {
|
52
|
-
'background-color': css.color.transparent
|
53
|
-
});
|
54
|
-
utilities.verifyCSS(resetPopupComponent.resetPopupConfirmResetButton().find('p'), {
|
55
|
-
'color': css.color.whiteText,
|
56
|
-
'font-size': css.fontSize.default,
|
57
|
-
'font-weight': css.fontWeight.semibold
|
58
|
-
});
|
59
|
-
utilities.verifyCSS(resetPopupComponent.resetPopupConfirmResetButton(), {
|
60
|
-
'background-color': css.color.editTableDeleteButton
|
61
|
-
});
|
62
|
-
});
|
63
|
-
|
64
|
-
it('Accessibility of Reset dialog box', { tags: 'a11y' }, () => {
|
65
|
-
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
66
|
-
});
|
67
|
-
}
|
68
|
-
}
|
69
|
-
|
70
|
-
export const resetPopupComponent = {
|
71
|
-
...selectors,
|
72
|
-
steps,
|
73
|
-
tests
|
74
|
-
}
|
@@ -1,69 +0,0 @@
|
|
1
|
-
const selectors = {
|
2
|
-
toolsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__ToolbarLabel"]').eq(0),
|
3
|
-
toolOptions: (toolOptionAriaLabel = null) => {
|
4
|
-
if (toolOptionAriaLabel) {
|
5
|
-
return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`.icon-button-custom-format[aria-label*="${toolOptionAriaLabel}"]`).eq(0)
|
6
|
-
} else {
|
7
|
-
return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`.icon-button-custom-format`)
|
8
|
-
}
|
9
|
-
},
|
10
|
-
controlsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__ToolbarLabel"]').eq(1),
|
11
|
-
controlOptions: (toolOptionAriaLabel = null) => {
|
12
|
-
if (toolOptionAriaLabel) {
|
13
|
-
return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find(`.icon-button-custom-format[aria-label*="${toolOptionAriaLabel}"]`)
|
14
|
-
} else {
|
15
|
-
return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find('.icon-button-custom-format')
|
16
|
-
}
|
17
|
-
},
|
18
|
-
toolOptionsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`[class*="DragItemstyles__LabelWrapper"]`),
|
19
|
-
toolOptionsTickIcon: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`.tick-icon-wrapper`),
|
20
|
-
controlsOptionsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find(`[class*="DragItemstyles__LabelWrapper"]`),
|
21
|
-
controlsTickIcon: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find(`.tick-icon-wrapper`)
|
22
|
-
}
|
23
|
-
|
24
|
-
const steps = {
|
25
|
-
/**
|
26
|
-
* This function selects tool options
|
27
|
-
* @param {string[]} toolOptionAriaLabelArray array aria-label of tool options
|
28
|
-
*/
|
29
|
-
selectToolOptions: (toolOptionAriaLabelArray) => {
|
30
|
-
toolOptionAriaLabelArray.forEach((toolOptionAriaLabel) => {
|
31
|
-
toolsAndControlsComponent.toolOptions(toolOptionAriaLabel)
|
32
|
-
.click();
|
33
|
-
});
|
34
|
-
},
|
35
|
-
|
36
|
-
/**
|
37
|
-
* This function de-selects tool options
|
38
|
-
* @param {string[]} toolOptionAriaLabelArray array aria-label of tool options
|
39
|
-
*/
|
40
|
-
deselectToolOptions: (toolOptionAriaLabelArray) => {
|
41
|
-
toolOptionAriaLabelArray.forEach((toolOptionAriaLabel) => {
|
42
|
-
toolsAndControlsComponent.toolOptions(toolOptionAriaLabel)
|
43
|
-
.click();
|
44
|
-
});
|
45
|
-
},
|
46
|
-
|
47
|
-
/**
|
48
|
-
* This function selects tool options
|
49
|
-
* @param {string[]} controlOptionAriaLabel array aria-label of tool options
|
50
|
-
*/
|
51
|
-
selectControl: (controlOptionAriaLabel) => {
|
52
|
-
toolsAndControlsComponent.controlOptions(controlOptionAriaLabel)
|
53
|
-
.click();
|
54
|
-
},
|
55
|
-
|
56
|
-
/**
|
57
|
-
* This function de-selects tool options
|
58
|
-
* @param {string[]} controlOptionAriaLabel array aria-label of tool options
|
59
|
-
*/
|
60
|
-
deselectControl: (controlOptionAriaLabel) => {
|
61
|
-
toolsAndControlsComponent.controlOptions(controlOptionAriaLabel)
|
62
|
-
.click();
|
63
|
-
}
|
64
|
-
}
|
65
|
-
|
66
|
-
export const toolsAndControlsComponent = {
|
67
|
-
...selectors,
|
68
|
-
steps
|
69
|
-
}
|