itemengine-cypress-automation 1.0.573-IEI-7080-f70315e.0 → 1.0.573-IEI-7079-ed54ea2.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/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +205 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +205 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +248 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +247 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +223 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +175 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +191 -0
- package/cypress/e2e/ILC/ChartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePointsLocked.js +24 -24
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +177 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +206 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +228 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +229 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +229 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +206 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +183 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +206 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +184 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +181 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +37 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsForAnswerInputFields.js +72 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +19 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +56 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +57 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +15 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +54 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +12 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomizationAllViews.js +156 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +0 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +9 -124
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +8 -123
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +8 -123
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +6 -93
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +2 -23
- package/cypress/e2e/ILC/ImageHighlight/additionalSettings.js +86 -0
- package/cypress/e2e/ILC/ImageHighlight/backgroundImageAndCanvasProperties.js +60 -9
- package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +14 -12
- package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +12 -3
- package/cypress/e2e/ILC/ImageHighlight/minimumScoringPenaltyPointsAndRoundingDropdown.js +65 -2
- package/cypress/e2e/ILC/ImageHighlight/studentViewSettings.js +15 -1
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +1 -168
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +284 -17
- package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +397 -25
- package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +320 -20
- package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +0 -130
- package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +97 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +164 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +165 -11
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +165 -11
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +24 -14
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +26 -16
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +25 -15
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +24 -13
- package/cypress/e2e/ILC/dataApi/saveItems.js +1 -1
- package/cypress/e2e/ILC/dataApi/saveQuestions.js +7 -7
- package/cypress/e2e/ILC/dataApi/saveQuestionsMCQAlternateAnswers.js +6 -6
- package/cypress/pages/chartsBarPage.js +44 -1
- package/cypress/pages/chartsDotPlotPage.js +99 -1
- package/cypress/pages/chartsLinePage.js +48 -1
- package/cypress/pages/components/additionalSettingsPanel.js +9 -0
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +1 -1
- package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +4 -10
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +14 -37
- package/cypress/pages/components/gradingViewEnumerationComponent.js +5 -0
- package/cypress/pages/components/imageCanvasComponent.js +0 -3
- package/cypress/pages/components/placeholderTextSectionComponent.js +10 -0
- package/cypress/pages/components/showAlternativeAnswersComponent.js +41 -65
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +21 -1
- package/cypress/pages/imageHighlightPage.js +184 -7
- package/cypress/pages/itemPreviewPage.js +1 -0
- package/cypress/pages/multipleSelectionPage.js +32 -0
- package/cypress/pages/singleSelectionPage.js +17 -0
- package/cypress/support/helpers/utilities.js +16 -0
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +47 -53
- package/service.yaml +2 -2
|
@@ -72,6 +72,12 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
|
72
72
|
|
|
73
73
|
fillInTheGapsOverImageTextPage.tests.verifyInsertTextTooltip();
|
|
74
74
|
|
|
75
|
+
it('When user insert text container, then it should be displayed', () => {
|
|
76
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(50);
|
|
77
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
78
|
+
fillInTheGapsOverImageTextPage.steps.undoAction();
|
|
79
|
+
});
|
|
80
|
+
|
|
75
81
|
fillInTheGapsOverImageTextPage.tests.verifyUndoRedoClearAllButtons();
|
|
76
82
|
});
|
|
77
83
|
|
|
@@ -217,7 +223,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
|
217
223
|
'border': `1px solid ${css.color.activeComponentBorder}`
|
|
218
224
|
});
|
|
219
225
|
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseArea(), 0), {
|
|
220
|
-
'border': `1px
|
|
226
|
+
'border': `1px solid ${css.color.activeComponentBorder}`
|
|
221
227
|
});
|
|
222
228
|
});
|
|
223
229
|
|
|
@@ -410,4 +416,16 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
|
410
416
|
|
|
411
417
|
fillInTheGapsOverImageTextPage.tests.verifyImageNotExistPreviewTab();
|
|
412
418
|
});
|
|
419
|
+
|
|
420
|
+
describe('Print layout settings accordion', () => {
|
|
421
|
+
abortEarlySetup();
|
|
422
|
+
before(() => {
|
|
423
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
424
|
+
cy.barsPreLoaderWait();
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
fillInTheGapsOverImageTextPage.tests.verifyPrintLayoutSettingsAccordionProperties();
|
|
428
|
+
|
|
429
|
+
fillInTheGapsOverImageTextPage.tests.verifyPrintLayoutSettingsAccordionContents();
|
|
430
|
+
});
|
|
413
431
|
});
|
package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
|
1
|
+
import { fillInTheGapsOverImageTextPage, itemPreviewPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
6
|
+
const views = utilities.getViews(correctAnswerViews);
|
|
7
|
+
let itemReferenceID = "";
|
|
5
8
|
|
|
6
9
|
describe('Create Item page - Fill in the gaps over image - text: ', () => {
|
|
7
10
|
before(() => {
|
|
@@ -67,4 +70,56 @@ describe('Create Item page - Fill in the gaps over image - text: ', () => {
|
|
|
67
70
|
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Flower232&*' }]);
|
|
68
71
|
});
|
|
69
72
|
});
|
|
73
|
+
|
|
74
|
+
views.forEach((view) => {
|
|
75
|
+
describe(`${view}: Accepted student input`, () => {
|
|
76
|
+
abortEarlySetup();
|
|
77
|
+
before(() => {
|
|
78
|
+
switch (view) {
|
|
79
|
+
case 'Question preview':
|
|
80
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
81
|
+
cy.barsPreLoaderWait();
|
|
82
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
83
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
84
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
85
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(50);
|
|
86
|
+
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(0, 'Number');
|
|
87
|
+
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(1, 'Integer');
|
|
88
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
89
|
+
break;
|
|
90
|
+
case 'Item preview':
|
|
91
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
92
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
93
|
+
break;
|
|
94
|
+
case 'Student view':
|
|
95
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
96
|
+
break;
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
beforeEach(() => {
|
|
100
|
+
switch (view) {
|
|
101
|
+
case 'Question preview':
|
|
102
|
+
break;
|
|
103
|
+
case 'Item preview':
|
|
104
|
+
break;
|
|
105
|
+
case 'Student view':
|
|
106
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
if (view === 'Question preview') {
|
|
111
|
+
after(() => {
|
|
112
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
113
|
+
fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
|
|
114
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
115
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
it(`When the user try to insert text in the response field where the accepted student input type set to number , then it should show a warning message in ${view}`, () => {
|
|
120
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
|
121
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.limitReachedWarningMessageContainer(), 'Only number can be typed.');
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
});
|
|
70
125
|
});
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
|
1
|
+
import { fillInTheGapsOverImageTextPage, itemPreviewPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
|
3
4
|
const css = Cypress.env('css');
|
|
5
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
6
|
+
const views = utilities.getViews(correctAnswerViews);
|
|
7
|
+
let itemReferenceID = "";
|
|
4
8
|
|
|
5
9
|
describe('Create item page - Fill in the gaps over image with text: Set limit section', () => {
|
|
6
10
|
before(() => {
|
|
@@ -49,7 +53,7 @@ describe('Create item page - Fill in the gaps over image with text: Set limit se
|
|
|
49
53
|
|
|
50
54
|
//Uncomment below code once https://redmine.zeuslearning.com/issues/566930 is resolved
|
|
51
55
|
// fillInTheGapsOverImageTextPage.tests.verifyMaximumCharacterLimitWarningConditionsSpecifyCorrectAnswerSection();
|
|
52
|
-
|
|
56
|
+
|
|
53
57
|
//Uncomment below code once https://redmine.zeuslearning.com/issues/566930 is resolved
|
|
54
58
|
// fillInTheGapsOverImageTextPage.tests.verifyMinimumCharacterLimitWarningConditionsSpecifyCorrectAnswerSection();
|
|
55
59
|
});
|
|
@@ -79,11 +83,61 @@ describe('Create item page - Fill in the gaps over image with text: Set limit se
|
|
|
79
83
|
it('User should able to enter characters in the response field', () => {
|
|
80
84
|
fillInTheGapsOverImageTextPage.steps.addTextInAnswerInputFieldsPreviewTab(0, 'Flower');
|
|
81
85
|
});
|
|
82
|
-
|
|
86
|
+
|
|
83
87
|
//Uncomment below code oncee https://redmine.zeuslearning.com/issues/566930 is resolved
|
|
84
88
|
// fillInTheGapsOverImageTextPage.tests.verifyMaximumCharacterLimitWarningConditionsPreviewTab();
|
|
85
89
|
|
|
86
90
|
//Uncomment below code once https://redmine.zeuslearning.com/issues/566930 is resolved
|
|
87
91
|
// fillInTheGapsOverImageTextPage.tests.verifyMinimumCharacterLimitWarningConditionsPreviewTab();
|
|
88
92
|
});
|
|
93
|
+
|
|
94
|
+
views.forEach((view) => {
|
|
95
|
+
describe(`${view}: Student view settings`, () => {
|
|
96
|
+
abortEarlySetup();
|
|
97
|
+
before(() => {
|
|
98
|
+
switch (view) {
|
|
99
|
+
case 'Question preview':
|
|
100
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
101
|
+
cy.barsPreLoaderWait();
|
|
102
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
103
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
104
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
105
|
+
fillInTheGapsOverImageTextPage.steps.setMaximumLimit(30)
|
|
106
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
107
|
+
break;
|
|
108
|
+
case 'Item preview':
|
|
109
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
110
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
111
|
+
break;
|
|
112
|
+
case 'Student view':
|
|
113
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
114
|
+
break;
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
beforeEach(() => {
|
|
119
|
+
switch (view) {
|
|
120
|
+
case 'Question preview':
|
|
121
|
+
break;
|
|
122
|
+
case 'Item preview':
|
|
123
|
+
break;
|
|
124
|
+
case 'Student view':
|
|
125
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
if (view === 'Question preview') {
|
|
130
|
+
after(() => {
|
|
131
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
132
|
+
fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
|
|
133
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
134
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
it(`When the user sets the maximum character limit for the response field, it should be reflected in the ${view}`, () => {
|
|
139
|
+
fillInTheGapsOverImageTextPage.steps.verifyMaximumCharacterLimitInPreviewTab(0, 30);
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
});
|
|
89
143
|
});
|
|
@@ -82,21 +82,21 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
82
82
|
|
|
83
83
|
it('CSS of special characters section', { tags: 'css' }, () => {
|
|
84
84
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersLabel(), {
|
|
85
|
-
'color': css.color.
|
|
85
|
+
'color': css.color.codeBlockText,
|
|
86
86
|
'font-size': css.fontSize.default,
|
|
87
87
|
'font-weight': css.fontWeight.semibold
|
|
88
88
|
});
|
|
89
89
|
//checked state of enable special characters checkbox
|
|
90
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.
|
|
90
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.enableSpecialCharactersCheckboxWrapper().find('svg g g').eq(0), {
|
|
91
91
|
'fill': css.color.activeButtons
|
|
92
92
|
});
|
|
93
93
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.groupByLanguageLabel(), {
|
|
94
|
-
'color': css.color.
|
|
94
|
+
'color': css.color.labelText,
|
|
95
95
|
'font-size': css.fontSize.normal,
|
|
96
96
|
'font-weight': css.fontWeight.regular
|
|
97
97
|
});
|
|
98
98
|
//selected state of radio button
|
|
99
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.
|
|
99
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.showOnlyCustomSpecialCharactersRadioButtonWrapper().find('svg'), {
|
|
100
100
|
'fill': css.color.activeButtons
|
|
101
101
|
});
|
|
102
102
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.customSpecialCharactersLabel(), {
|
|
@@ -109,7 +109,7 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
109
109
|
'font-size': css.fontSize.default,
|
|
110
110
|
'font-weight': css.fontWeight.regular
|
|
111
111
|
});
|
|
112
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.
|
|
112
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.customSpecialCharactersInputFieldWrapper().find('fieldset'), {
|
|
113
113
|
'border': `1px solid ${css.color.figDefaultComponentBorder}`
|
|
114
114
|
});
|
|
115
115
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.customizeSpecialCharactersPreviewButton(), {
|
|
@@ -150,13 +150,10 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
150
150
|
});
|
|
151
151
|
//Category tiles in de-selected state
|
|
152
152
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileIcon().eq(0).find('svg'), {
|
|
153
|
-
'fill': css.color.
|
|
154
|
-
});
|
|
155
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(0).parent(), {
|
|
156
|
-
'fill': css.color.secondaryBtn
|
|
153
|
+
'fill': css.color.optionColor
|
|
157
154
|
});
|
|
158
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(0).
|
|
159
|
-
'fill': css.color.
|
|
155
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(0).find('svg'), {
|
|
156
|
+
'fill': css.color.optionColor
|
|
160
157
|
});
|
|
161
158
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileCategoryName().eq(0), {
|
|
162
159
|
'color': css.color.secondaryBtn,
|
|
@@ -172,18 +169,18 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
172
169
|
utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
|
|
173
170
|
'color': css.color.flyoutTitle,
|
|
174
171
|
'font-size': css.fontSize.heading,
|
|
175
|
-
'font-weight': css.fontWeight.
|
|
172
|
+
'font-weight': css.fontWeight.semibold
|
|
176
173
|
});
|
|
177
174
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupCategoryLabel().eq(0), {
|
|
178
175
|
'color': css.color.accordionLabel,
|
|
179
|
-
'font-size': css.fontSize.
|
|
180
|
-
'font-weight': css.fontWeight.
|
|
176
|
+
'font-size': css.fontSize.default,
|
|
177
|
+
'font-weight': css.fontWeight.bold
|
|
181
178
|
});
|
|
182
179
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupCategoryAccordionExpandIcon().last().find('svg'), {
|
|
183
180
|
'fill': css.color.activeButtons
|
|
184
181
|
});
|
|
185
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupSymbol().eq(0).find('svg'), {
|
|
186
|
-
'fill': css.color.
|
|
182
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupSymbol().eq(0).find('svg path'), {
|
|
183
|
+
'fill': css.color.activeButtons
|
|
187
184
|
});
|
|
188
185
|
});
|
|
189
186
|
|
|
@@ -191,10 +188,10 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
191
188
|
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
|
192
189
|
cy.log('Closing preview popup');
|
|
193
190
|
dialogBoxBase.steps.closeWarningPopup();
|
|
194
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.specialCharactersLabel()
|
|
191
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.specialCharactersLabel());
|
|
195
192
|
cy.log('Selecting show only custom special characters radio button');
|
|
196
193
|
fillInTheGapsOverImageTextPage.steps.selectShowOnlyCustomSpecialCharactersRadioButton();
|
|
197
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.
|
|
194
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.customSpecialCharactersInputFieldWrapper());
|
|
198
195
|
});
|
|
199
196
|
});
|
|
200
197
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
|
1
|
+
import { fillInTheGapsOverImageTextPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
6
|
+
const views = utilities.getViews(correctAnswerViews);
|
|
7
|
+
let itemReferenceID = "";
|
|
5
8
|
|
|
6
9
|
describe('Create Item page - drag and drop into categories: Student view settings', () => {
|
|
7
10
|
before(() => {
|
|
@@ -34,6 +37,56 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
|
34
37
|
fillInTheGapsOverImageTextPage.tests.verifySpellCheckFunctionalityPreviewTab();
|
|
35
38
|
});
|
|
36
39
|
|
|
40
|
+
views.forEach((view) => {
|
|
41
|
+
describe(`${view}: Student view settings`, () => {
|
|
42
|
+
abortEarlySetup();
|
|
43
|
+
before(() => {
|
|
44
|
+
switch (view) {
|
|
45
|
+
case 'Question preview':
|
|
46
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
47
|
+
cy.barsPreLoaderWait();
|
|
48
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
49
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
50
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
51
|
+
fillInTheGapsOverImageTextPage.steps.checkSpellCheckCheckbox();
|
|
52
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
53
|
+
break;
|
|
54
|
+
case 'Item preview':
|
|
55
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
56
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
57
|
+
break;
|
|
58
|
+
case 'Student view':
|
|
59
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
60
|
+
break;
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
beforeEach(() => {
|
|
65
|
+
switch (view) {
|
|
66
|
+
case 'Question preview':
|
|
67
|
+
break;
|
|
68
|
+
case 'Item preview':
|
|
69
|
+
break;
|
|
70
|
+
case 'Student view':
|
|
71
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
if (view === 'Question preview') {
|
|
76
|
+
after(() => {
|
|
77
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
78
|
+
fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
|
|
79
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
80
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
it('When the \'Spell check\' functionality is enabled, the response field should have \'spellcheck\' attribute set as \'true\' in the preview tab', () => {
|
|
85
|
+
fillInTheGapsOverImageTextPage.steps.verifySpellCheckOfResponseFieldPreviewTabEnabled(0);
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
37
90
|
/*describe('Allow students to check answer: Edit tab', () => {
|
|
38
91
|
abortEarlySetup();
|
|
39
92
|
before(() => {
|
|
@@ -399,6 +399,18 @@ describe('Create Item page - Fill in the gaps over image with text: Style and la
|
|
|
399
399
|
fillInTheGapsOverImageTextPage.steps.verifyResponseAreaDimensions(30, 118);
|
|
400
400
|
});
|
|
401
401
|
|
|
402
|
+
it('User should only be able to enter numeric values in the \'Height (px)\' and \'Width (px)\' input fields', () => {
|
|
403
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerHeight('1*2');
|
|
404
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerWidth('2%1');
|
|
405
|
+
fillInTheGapsOverImageTextPage.steps.verifyValueInTextContainerWidthAndHeightInputField('12', '21');
|
|
406
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerHeight('apple');
|
|
407
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerWidth('news');
|
|
408
|
+
fillInTheGapsOverImageTextPage.steps.verifyValueInTextContainerWidthAndHeightInputField('', '');
|
|
409
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerHeight('54!@');
|
|
410
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerWidth('@12');
|
|
411
|
+
fillInTheGapsOverImageTextPage.steps.verifyValueInTextContainerWidthAndHeightInputField('54', '12');
|
|
412
|
+
});
|
|
413
|
+
|
|
402
414
|
it('When the user specifies the height and width, the dimensions of the text containers should update accordingly', () => {
|
|
403
415
|
fillInTheGapsOverImageTextPage.steps.setTextContainerHeight(100);
|
|
404
416
|
fillInTheGapsOverImageTextPage.steps.setTextContainerWidth(200);
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { fillInTheGapsOverImageTextPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
|
4
|
+
import { colorPopupComponent } from "../../../pages/components";
|
|
5
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
|
6
|
+
const views = utilities.getViews(correctAnswerViews);
|
|
7
|
+
const css = Cypress.env('css');
|
|
8
|
+
let itemReferenceID = "";
|
|
9
|
+
const modifiedColor = 'rgb(121, 60, 60)';
|
|
10
|
+
|
|
11
|
+
describe('Create Item page - Drag and drop into categories: Style and layout customization', () => {
|
|
12
|
+
before(() => {
|
|
13
|
+
cy.loginAs('admin');
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
views.forEach((view) => {
|
|
17
|
+
describe(`${view}: Style and Layout Customization - Default State`, () => {
|
|
18
|
+
abortEarlySetup();
|
|
19
|
+
before(() => {
|
|
20
|
+
switch (view) {
|
|
21
|
+
case 'Question preview':
|
|
22
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
23
|
+
cy.barsPreLoaderWait();
|
|
24
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
25
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
26
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
27
|
+
fillInTheGapsOverImageTextPage.steps.selectResponseArea(0);
|
|
28
|
+
fillInTheGapsOverImageTextPage.steps.selectResponseAreaPointerStyle('left');
|
|
29
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
30
|
+
break;
|
|
31
|
+
case 'Item preview':
|
|
32
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
33
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
34
|
+
fillInTheGapsOverImageTextPage.steps.switchToGradingView();
|
|
35
|
+
break;
|
|
36
|
+
case 'Student view':
|
|
37
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
38
|
+
break;
|
|
39
|
+
case 'Grading view':
|
|
40
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
41
|
+
break;
|
|
42
|
+
case 'Correct answer view':
|
|
43
|
+
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
44
|
+
break;
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
beforeEach(() => {
|
|
49
|
+
switch (view) {
|
|
50
|
+
case 'Question preview':
|
|
51
|
+
break;
|
|
52
|
+
case 'Item preview':
|
|
53
|
+
fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
54
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
if (view === 'Question preview') {
|
|
60
|
+
after(() => {
|
|
61
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
62
|
+
fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
|
|
63
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
64
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
it(`Text container should have default border color, fill color, and border style in ${view}`, () => {
|
|
69
|
+
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldFillColor(0, css.color.optionsBg);
|
|
70
|
+
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldBorderColor(0, `1px solid ${css.color.activeComponentBorder}`);
|
|
71
|
+
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldBorderStyle(0, 'solid');
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it(`text container connector style should be displayed in default state in ${view}`, () => {
|
|
75
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAreaConnectorEndPointShapePreviewTab('Circle');
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
views.forEach((view) => {
|
|
81
|
+
describe(`${view}: Style and Layout Customization - modified State`, () => {
|
|
82
|
+
abortEarlySetup();
|
|
83
|
+
before(() => {
|
|
84
|
+
switch (view) {
|
|
85
|
+
case 'Question preview':
|
|
86
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
87
|
+
cy.barsPreLoaderWait();
|
|
88
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
89
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
90
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
91
|
+
fillInTheGapsOverImageTextPage.steps.selectResponseArea(0);
|
|
92
|
+
fillInTheGapsOverImageTextPage.steps.selectResponseAreaPointerStyle('left');
|
|
93
|
+
fillInTheGapsOverImageTextPage.steps.expandStyleAndLayoutCustomizationAccordion();
|
|
94
|
+
fillInTheGapsOverImageTextPage.steps.selectEndPointShapeButton('Square');
|
|
95
|
+
fillInTheGapsOverImageTextPage.steps.editColor(0);
|
|
96
|
+
colorPopupComponent.steps.clickInColorSaturationPalette();
|
|
97
|
+
colorPopupComponent.steps.clickOnOkButton();
|
|
98
|
+
fillInTheGapsOverImageTextPage.steps.editColor(1);
|
|
99
|
+
colorPopupComponent.steps.clickInColorSaturationPalette();
|
|
100
|
+
colorPopupComponent.steps.clickOnOkButton();
|
|
101
|
+
fillInTheGapsOverImageTextPage.steps.selectBorderStyleToggleButton('Dotted');
|
|
102
|
+
fillInTheGapsOverImageTextPage.steps.checkSetHeightAndWidthForAllTextContainersCheckbox();
|
|
103
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerHeight(100);
|
|
104
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerWidth(200);
|
|
105
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
106
|
+
break;
|
|
107
|
+
case 'Item preview':
|
|
108
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
109
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
110
|
+
fillInTheGapsOverImageTextPage.steps.switchToGradingView();
|
|
111
|
+
break;
|
|
112
|
+
case 'Grading view':
|
|
113
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
114
|
+
break;
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
beforeEach(() => {
|
|
119
|
+
switch (view) {
|
|
120
|
+
case 'Question preview':
|
|
121
|
+
break;
|
|
122
|
+
case 'Item preview':
|
|
123
|
+
fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
124
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
|
125
|
+
break;
|
|
126
|
+
case 'Grading view':
|
|
127
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
if (view === 'Question preview') {
|
|
133
|
+
after(() => {
|
|
134
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
135
|
+
fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
|
|
136
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
137
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
it(`Text container should have default border color, fill color, and border style in ${view}`, () => {
|
|
142
|
+
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldFillColor(0, modifiedColor);
|
|
143
|
+
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldBorderColor(0, `1px dotted ${modifiedColor}`);
|
|
144
|
+
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldBorderStyle(0, 'dotted');
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
it(`text container connector style should be displayed in default state in ${view}`, () => {
|
|
148
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAreaConnectorEndPointShapePreviewTab('Square');
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
it(`Text containers should have modified height and width in ${view}`, () => {
|
|
152
|
+
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldHeightAndWidthInAllViews(0, '100px', '200px');
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
});
|
|
@@ -43,7 +43,5 @@ describe('Create item page - Fill in the gaps over image with text: Supported fi
|
|
|
43
43
|
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.errorMessage(), 'notExist');
|
|
44
44
|
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.canvasUploadedImage(), 'notExist');
|
|
45
45
|
});
|
|
46
|
-
|
|
47
|
-
fillInTheGapsOverImageTextPage.tests.verifyErrorMessageCSSAndA11y();
|
|
48
46
|
});
|
|
49
47
|
});
|