itemengine-cypress-automation 1.0.579-IEI-7105-043279f.0 → 1.0.579-IEI-7178-6f40615.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/config-files/ilprod.json +1 -2
- package/cypress/config-files/ilqa.json +1 -2
- package/cypress/config-files/ilstage.json +1 -2
- package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +0 -17
- package/cypress/e2e/ILC/MultipleSelection/previewContentsForAllViews.smoke.js +0 -18
- package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +0 -19
- package/cypress/e2e/ILC/NumberLineLabel/editTabBasicSection.js +0 -18
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +11 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +11 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +11 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingWeightsBasic.js +7 -7
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/SingleSelection/previewContents.smoke.js +0 -18
- package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +0 -19
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +0 -17
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +0 -16
- package/cypress/pages/components/ckEditorToolbar.js +0 -20
- package/cypress/pages/components/draggableOptionContainer.js +0 -14
- package/cypress/pages/components/gridQuestionCommonComponent.js +1 -17
- package/cypress/pages/components/optionsWrapperComponent.js +2 -33
- package/cypress/pages/components/questionInputFieldComponent.js +2 -18
- package/cypress/pages/matchingPage.js +0 -18
- package/cypress/pages/numberLineLabelPage.js +0 -1
- package/cypress/pages/shortTextResponsePage.js +35 -7
- package/cypress/pages/textSelectionPage.js +1 -17
- package/package.json +1 -1
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"organisation_id": "eb7d4a20-c96c-4852-9b34-7e3231016315",
|
|
14
14
|
"migration_usernme": "ilc-prod-content-user",
|
|
15
15
|
"migration_password": "Oj2kTWQM7ZRmegmS",
|
|
16
|
-
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "false"
|
|
17
|
-
"ENABLE_EXPAND_IMAGE_ENHANCEMENT": "false"
|
|
16
|
+
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "false"
|
|
18
17
|
}
|
|
19
18
|
}
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"organisation_id": "eb7d4a20-c96c-4852-9b34-7e3231016315",
|
|
14
14
|
"migration_usernme": "demo-technical-tester",
|
|
15
15
|
"migration_password": "SXYeokWOoTuwEg2w",
|
|
16
|
-
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "true"
|
|
17
|
-
"ENABLE_EXPAND_IMAGE_ENHANCEMENT": "true"
|
|
16
|
+
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "true"
|
|
18
17
|
}
|
|
19
18
|
}
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"admin_username": "demouser-ilc",
|
|
12
12
|
"admin_password": "T6b9FK0pC6Tg8wDz",
|
|
13
13
|
"organisation_id": "eb7d4a20-c96c-4852-9b34-7e3231016315",
|
|
14
|
-
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "false"
|
|
15
|
-
"ENABLE_EXPAND_IMAGE_ENHANCEMENT": "false"
|
|
14
|
+
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "false"
|
|
16
15
|
}
|
|
17
16
|
}
|
|
@@ -3,7 +3,6 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
5
|
const promptArray = ['Land pollution', 'Water pollution', 'Air pollution'];
|
|
6
|
-
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
7
6
|
|
|
8
7
|
describe('Create Item page - Matching : Question Instructions and prompt section', () => {
|
|
9
8
|
before(() => {
|
|
@@ -273,22 +272,6 @@ describe('Create Item page - Matching : Question Instructions and prompt section
|
|
|
273
272
|
utilities.verifyElementVisibilityState(matchingPage.dropzoneColumnAndPromptHeaderWrapperPreviewTab(), 'notExist');
|
|
274
273
|
});
|
|
275
274
|
|
|
276
|
-
if (imageExpandEnhancement === 'true') {
|
|
277
|
-
it('When user add large image in question instruction, user should be able to expand the image in preview tab', () => {
|
|
278
|
-
matchingPage.steps.switchToEditTab();
|
|
279
|
-
matchingPage.steps.clearPromptInputField(0);
|
|
280
|
-
matchingPage.steps.focusInPromptInputField(0);
|
|
281
|
-
matchingPage.steps.selectImageOptionFromCKEditorToolbar();
|
|
282
|
-
matchingPage.steps.addImageToInputField();
|
|
283
|
-
matchingPage.steps.switchToPreviewTab();
|
|
284
|
-
matchingPage.steps.verifyExpandIconInImage();
|
|
285
|
-
matchingPage.steps.clickExpandIconInImage();
|
|
286
|
-
utilities.verifyInnerText(matchingPage.closeImagePopup(), 'Close');
|
|
287
|
-
matchingPage.steps.closeImagePopup();
|
|
288
|
-
matchingPage.steps.verifyExpandIconInImage();
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
|
|
292
275
|
it('CSS of added prompt in \'Preview\' tab table', { tags: 'css' }, () => {
|
|
293
276
|
utilities.verifyCSS(matchingPage.promptContainerPreviewTab().find('.question-text-wrapper'), {
|
|
294
277
|
'color': css.color.text,
|
|
@@ -6,7 +6,6 @@ let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Stu
|
|
|
6
6
|
const views = utilities.getViews(previewContentViews);
|
|
7
7
|
var itemReferenceID = "";
|
|
8
8
|
const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
|
|
9
|
-
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
10
9
|
|
|
11
10
|
describe('Create item page - Multiple selection: Preview contents', () => {
|
|
12
11
|
before(() => {
|
|
@@ -92,23 +91,6 @@ describe('Create item page - Multiple selection: Preview contents', () => {
|
|
|
92
91
|
multipleSelectionPage.steps.verifyEquationTextInPreviewTab(2);
|
|
93
92
|
cy.eyesCheckWindow(`Multiple selection - ${view} - Image, Bold Text, and Equation Display`);
|
|
94
93
|
});
|
|
95
|
-
if (imageExpandEnhancement === 'true') {
|
|
96
|
-
it('Image expand icon should be visible on the image in option', () => {
|
|
97
|
-
multipleSelectionPage.steps.verifyImageInPreviewTab(0);
|
|
98
|
-
multipleSelectionPage.steps.verifyExpandIconInImage();
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
it('When the user clicks on the expand button then the image should be expanded and a close button should be displayed', () => {
|
|
102
|
-
multipleSelectionPage.steps.verifyImageInPreviewTab(0);
|
|
103
|
-
multipleSelectionPage.steps.clickExpandIconInImage();
|
|
104
|
-
utilities.verifyInnerText(multipleSelectionPage.closeImagePopup(), 'Close');
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed on image again in the option', () => {
|
|
108
|
-
multipleSelectionPage.steps.closeImagePopup();
|
|
109
|
-
multipleSelectionPage.steps.verifyExpandIconInImage();
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
94
|
|
|
113
95
|
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
|
114
96
|
it(`All the options should be in unchecked state`, () => {
|
|
@@ -6,7 +6,6 @@ const css = Cypress.env('css');
|
|
|
6
6
|
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view', 'Print preview'];
|
|
7
7
|
const views = utilities.getViews(previewContentViews);
|
|
8
8
|
var itemReferenceID = "";
|
|
9
|
-
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
10
9
|
|
|
11
10
|
describe('Create item page - Multiple selection grid: Preview contents', () => {
|
|
12
11
|
before(() => {
|
|
@@ -95,24 +94,6 @@ describe('Create item page - Multiple selection grid: Preview contents', () => {
|
|
|
95
94
|
utilities.verifyInnerText(multipleSelectionGridPage.questionInstructionsText(), 'Please select where the following animals are found');
|
|
96
95
|
utilities.verifyElementVisibilityState(multipleSelectionGridPage.questionInstructionsText(), 'visible');
|
|
97
96
|
});
|
|
98
|
-
|
|
99
|
-
if (imageExpandEnhancement === 'true') {
|
|
100
|
-
it('Image expand icon should be visible on the image in option', () => {
|
|
101
|
-
multipleSelectionGridPage.steps.verifyTableCellWithImageInPreviewTab({ row: 1, column: 1 });
|
|
102
|
-
multipleSelectionGridPage.steps.verifyExpandIconInImage();
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
it('When the user clicks on the expand button then the image should be expanded and a close button should be displayed', () => {
|
|
106
|
-
multipleSelectionGridPage.steps.verifyTableCellWithImageInPreviewTab({ row: 1, column: 1 });
|
|
107
|
-
multipleSelectionGridPage.steps.clickExpandIconInImage();
|
|
108
|
-
utilities.verifyInnerText(multipleSelectionGridPage.closeImagePopup(), 'Close');
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed on image again in the option', () => {
|
|
112
|
-
multipleSelectionGridPage.steps.closeImagePopup();
|
|
113
|
-
multipleSelectionGridPage.steps.verifyExpandIconInImage();
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
97
|
|
|
117
98
|
it(`Multiple selection grid - The question grid as set by the user should be displayed in the ${view}`, () => {
|
|
118
99
|
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'None');
|
|
@@ -3,7 +3,6 @@ import { ckEditorToolbar, equationEditorFlyout } from "../../../pages/components
|
|
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
|
-
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
7
6
|
const labels = ['Label 1', 'Label 2', 'Label 3']
|
|
8
7
|
describe('Create Item page - Number line label : Question instructions and label section', () => {
|
|
9
8
|
before(() => {
|
|
@@ -42,23 +41,6 @@ describe('Create Item page - Number line label : Question instructions and label
|
|
|
42
41
|
utilities.verifyTextContent(numberLineLabelPage.questionInstructionsText(), 'Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
|
43
42
|
});
|
|
44
43
|
|
|
45
|
-
if (imageExpandEnhancement === 'true') {
|
|
46
|
-
it('When user add large image in question instruction, user should be able to expand the image in preview tab', () => {
|
|
47
|
-
numberLineLabelPage.steps.switchToEditTab();
|
|
48
|
-
numberLineLabelPage.steps.clearQuestionInstructionsInputField();
|
|
49
|
-
numberLineLabelPage.steps.focusInQuestionInstructionsInputField();
|
|
50
|
-
numberLineLabelPage.steps.selectImageOptionFromCKEditorToolbar();
|
|
51
|
-
numberLineLabelPage.steps.addImageToInputField();
|
|
52
|
-
numberLineLabelPage.steps.focusOutQuestionInstructionsInputField();
|
|
53
|
-
numberLineLabelPage.steps.switchToPreviewTab();
|
|
54
|
-
numberLineLabelPage.steps.verifyExpandIconInImage();
|
|
55
|
-
numberLineLabelPage.steps.clickExpandIconInImage();
|
|
56
|
-
utilities.verifyInnerText(numberLineLabelPage.closeImagePopup(), 'Close');
|
|
57
|
-
numberLineLabelPage.steps.closeImagePopup();
|
|
58
|
-
numberLineLabelPage.steps.verifyExpandIconInImage();
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
44
|
//Need to remove this comment once https://redmine.zeuslearning.com/issues/578531 is resolved
|
|
63
45
|
// numberLineLabelPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
|
|
64
46
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { shortTextResponsePage } from "../../../../pages/shortTextResponsePage";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
const css = Cypress.env('css');
|
|
4
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
4
5
|
|
|
5
6
|
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
6
7
|
before(() => {
|
|
@@ -24,7 +25,11 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
24
25
|
it('When the user selects \'Grading\' view without attempting the question, correct/incorrect icons should not be displayed and answer input field should have incorrect answer border and correct answer section should be displayed below response input field', () => {
|
|
25
26
|
shortTextResponsePage.steps.switchToGradingView();
|
|
26
27
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
27
|
-
|
|
28
|
+
if (alternativeAnswerCheck) {
|
|
29
|
+
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Fossil fuel combustion', 20, 'Buildings', 10);
|
|
30
|
+
} else {
|
|
31
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
32
|
+
}
|
|
28
33
|
shortTextResponsePage.steps.switchToStudentView();
|
|
29
34
|
});
|
|
30
35
|
|
|
@@ -56,7 +61,11 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
56
61
|
shortTextResponsePage.steps.switchToGradingView();
|
|
57
62
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
58
63
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
59
|
-
|
|
64
|
+
if (alternativeAnswerCheck) {
|
|
65
|
+
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Fossil fuel combustion', 20, 'Buildings', 10);
|
|
66
|
+
} else {
|
|
67
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
68
|
+
}
|
|
60
69
|
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
61
70
|
});
|
|
62
71
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { shortTextResponsePage } from "../../../../pages/shortTextResponsePage";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
const css = Cypress.env('css');
|
|
4
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
4
5
|
|
|
5
6
|
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
6
7
|
before(() => {
|
|
@@ -24,7 +25,11 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
24
25
|
it('When the user switches to \'Grading\' view without attempting the question, then incorrect border and correct answer section should be displayed', () => {
|
|
25
26
|
shortTextResponsePage.steps.switchToGradingView();
|
|
26
27
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
27
|
-
|
|
28
|
+
if (alternativeAnswerCheck) {
|
|
29
|
+
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 20);
|
|
30
|
+
} else {
|
|
31
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
32
|
+
}
|
|
28
33
|
shortTextResponsePage.steps.switchToStudentView();
|
|
29
34
|
});
|
|
30
35
|
|
|
@@ -56,7 +61,11 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
56
61
|
shortTextResponsePage.steps.switchToGradingView();
|
|
57
62
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
58
63
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
59
|
-
|
|
64
|
+
if (alternativeAnswerCheck) {
|
|
65
|
+
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 20);
|
|
66
|
+
} else {
|
|
67
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
68
|
+
}
|
|
60
69
|
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
61
70
|
});
|
|
62
71
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { shortTextResponsePage } from "../../../../pages/shortTextResponsePage";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
const css = Cypress.env('css');
|
|
4
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
4
5
|
|
|
5
6
|
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
6
7
|
before(() => {
|
|
@@ -25,7 +26,11 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
25
26
|
shortTextResponsePage.steps.switchToGradingView();
|
|
26
27
|
shortTextResponsePage.steps.verifyCorrectIncorrectIconNotVisibleGradingView();
|
|
27
28
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
28
|
-
|
|
29
|
+
if (alternativeAnswerCheck) {
|
|
30
|
+
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 10);
|
|
31
|
+
} else {
|
|
32
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
33
|
+
}
|
|
29
34
|
shortTextResponsePage.steps.switchToStudentView();
|
|
30
35
|
});
|
|
31
36
|
|
|
@@ -61,7 +66,11 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
61
66
|
shortTextResponsePage.steps.switchToGradingView();
|
|
62
67
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
63
68
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
64
|
-
|
|
69
|
+
if (alternativeAnswerCheck) {
|
|
70
|
+
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 10);
|
|
71
|
+
} else {
|
|
72
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
73
|
+
}
|
|
65
74
|
});
|
|
66
75
|
|
|
67
76
|
shortTextResponsePage.tests.verifyIncorrectAnswerLabelAndBorderCSSAndA11y('short text response');
|
|
@@ -21,7 +21,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
21
21
|
it('When the user switches to \'Grading\' view without attempting the question, then incorrect border and correct answer section should not be displayed', () => {
|
|
22
22
|
shortTextResponsePage.steps.switchToGradingView();
|
|
23
23
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
24
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
24
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
25
25
|
shortTextResponsePage.steps.switchToStudentView();
|
|
26
26
|
});
|
|
27
27
|
|
|
@@ -42,7 +42,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
42
42
|
shortTextResponsePage.steps.switchToGradingView();
|
|
43
43
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
44
44
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
45
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
45
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
46
46
|
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
47
47
|
});
|
|
48
48
|
});
|
|
@@ -67,7 +67,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
67
67
|
shortTextResponsePage.steps.switchToGradingView();
|
|
68
68
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
69
69
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
70
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
70
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
71
71
|
|
|
72
72
|
});
|
|
73
73
|
|
|
@@ -80,7 +80,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
80
80
|
shortTextResponsePage.steps.switchToGradingView();
|
|
81
81
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
82
82
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
83
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
83
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
it('When the user attempts the question correctly, then the user should be awarded 20 points and on switching to \'Grading\' view, correct icon should be displayed beside response input field, correct answer border should be displayed in question preview', () => {
|
|
@@ -112,7 +112,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
112
112
|
shortTextResponsePage.steps.verifyPreviewScore(5, 20);
|
|
113
113
|
shortTextResponsePage.steps.switchToGradingView();
|
|
114
114
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
115
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
115
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
it('When the user sets minimum scoring to \'Award minimum score\', allots minimum points and attempts the question incorrectly, then the user should be awarded with minimum points', () => {
|
|
@@ -121,7 +121,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
121
121
|
shortTextResponsePage.steps.switchToGradingView();
|
|
122
122
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
123
123
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
124
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
124
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
125
125
|
});
|
|
126
126
|
|
|
127
127
|
it('When the user sets minimum scoring to \'Award minimum score\', allots minimum points and attempts the question correctly, then the user should be awarded with 20 points', () => {
|
|
@@ -149,7 +149,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
149
149
|
shortTextResponsePage.steps.switchToGradingView();
|
|
150
150
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
151
151
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
152
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
152
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
153
153
|
});
|
|
154
154
|
|
|
155
155
|
it('When the user sets minimum scoring to \'Award minimum score only if attempted\', allots minimum points and attempts the question correctly, then the user should be awarded with 20 points', () => {
|
|
@@ -7,6 +7,7 @@ let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
|
|
7
7
|
const views = utilities.getViews(correctAnswerViews);
|
|
8
8
|
const css = Cypress.env('css');
|
|
9
9
|
var itemReferenceID = "";
|
|
10
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
10
11
|
|
|
11
12
|
describe('Create item page - Short text response: All or nothing', () => {
|
|
12
13
|
before(() => {
|
|
@@ -110,7 +111,7 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
|
110
111
|
}
|
|
111
112
|
//Need to remove comment once https://redmine.zeuslearning.com/issues/576511 is resolved
|
|
112
113
|
// shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
113
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
114
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
114
115
|
});
|
|
115
116
|
|
|
116
117
|
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides incorrect response, incorrect answer border around response field and correct answer should be displayed in the question preview', () => {
|
|
@@ -120,7 +121,7 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
|
120
121
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
121
122
|
studentViewPage.steps.clickOnGoToGradingViewButton()
|
|
122
123
|
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
123
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
124
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
124
125
|
}
|
|
125
126
|
if (view === 'Question preview' || view === 'Item preview') {
|
|
126
127
|
shortTextResponsePage.steps.switchToGradingView();
|
|
@@ -281,7 +282,6 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
|
281
282
|
shortTextResponsePage.steps.checkNonScoredScoringLabel();
|
|
282
283
|
shortTextResponsePage.steps.switchToGradingView();
|
|
283
284
|
};
|
|
284
|
-
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'Correct answer:');
|
|
285
285
|
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Urbanization');
|
|
286
286
|
});
|
|
287
287
|
|
|
@@ -6,7 +6,6 @@ let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Stu
|
|
|
6
6
|
const views = utilities.getViews(previewContentViews);
|
|
7
7
|
var itemReferenceID = "";
|
|
8
8
|
const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
|
|
9
|
-
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
10
9
|
|
|
11
10
|
describe('Create item page - Single selection: Preview contents', () => {
|
|
12
11
|
before(() => {
|
|
@@ -95,23 +94,6 @@ describe('Create item page - Single selection: Preview contents', () => {
|
|
|
95
94
|
singleSelectionPage.steps.verifyEquationTextInPreviewTab(3);
|
|
96
95
|
cy.eyesCheckWindow(`Single selection - ${view} - Options with image, equation, bold text, and link`);
|
|
97
96
|
});
|
|
98
|
-
if (imageExpandEnhancement === 'true') {
|
|
99
|
-
it('Image expand icon should be visible on the image in option', () => {
|
|
100
|
-
singleSelectionPage.steps.verifyImageInPreviewTab(0);
|
|
101
|
-
singleSelectionPage.steps.verifyExpandIconInImage();
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
it('When the user clicks on the expand button then the image should be expanded and a close button should be displayed', () => {
|
|
105
|
-
singleSelectionPage.steps.verifyImageInPreviewTab(0);
|
|
106
|
-
singleSelectionPage.steps.clickExpandIconInImage();
|
|
107
|
-
utilities.verifyInnerText(singleSelectionPage.closeImagePopup(), 'Close');
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed on image again in the option', () => {
|
|
111
|
-
singleSelectionPage.steps.closeImagePopup();
|
|
112
|
-
singleSelectionPage.steps.verifyExpandIconInImage();
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
97
|
|
|
116
98
|
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
|
117
99
|
it(`All the options should be in unchecked state`, () => {
|
|
@@ -5,7 +5,6 @@ import utilities from "../../../support/helpers/utilities";
|
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
6
|
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view', 'Print preview'];
|
|
7
7
|
const views = utilities.getViews(previewContentViews);
|
|
8
|
-
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
9
8
|
var itemReferenceID = "";
|
|
10
9
|
describe('Create item page - Single selection grid: Preview contents', () => {
|
|
11
10
|
before(() => {
|
|
@@ -94,24 +93,6 @@ describe('Create item page - Single selection grid: Preview contents', () => {
|
|
|
94
93
|
utilities.verifyInnerText(singleSelectionGridPage.questionInstructionsText(), 'Please select where the following animals are found');
|
|
95
94
|
utilities.verifyElementVisibilityState(singleSelectionGridPage.questionInstructionsText(), 'visible');
|
|
96
95
|
});
|
|
97
|
-
|
|
98
|
-
if (imageExpandEnhancement === 'true') {
|
|
99
|
-
it('Image expand icon should be visible on the image in option', () => {
|
|
100
|
-
singleSelectionGridPage.steps.verifyTableCellWithImageInPreviewTab({ row: 1, column: 1 });
|
|
101
|
-
singleSelectionGridPage.steps.verifyExpandIconInImage();
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
it('When the user clicks on the expand button then the image should be expanded and a close button should be displayed', () => {
|
|
105
|
-
singleSelectionGridPage.steps.verifyTableCellWithImageInPreviewTab({ row: 1, column: 1 });
|
|
106
|
-
singleSelectionGridPage.steps.clickExpandIconInImage();
|
|
107
|
-
utilities.verifyInnerText(singleSelectionGridPage.closeImagePopup(), 'Close');
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed on image again in the option', () => {
|
|
111
|
-
singleSelectionGridPage.steps.closeImagePopup();
|
|
112
|
-
singleSelectionGridPage.steps.verifyExpandIconInImage();
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
96
|
|
|
116
97
|
it(`Single selection - grid ${view} - The question grid as set by the user should be displayed in the ${view}`, () => {
|
|
117
98
|
singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'None');
|
|
@@ -3,7 +3,6 @@ import { commonComponents } from "../../../pages/components";
|
|
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
|
-
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
7
6
|
|
|
8
7
|
describe('Create item page - Text entry math: Question instructions, Add structure - Question input field', () => {
|
|
9
8
|
before(() => {
|
|
@@ -198,22 +197,6 @@ describe('Create item page - Text entry math: Question instructions, Add structu
|
|
|
198
197
|
textEntryMathPage.steps.switchToPreviewTab();
|
|
199
198
|
utilities.verifyElementCount(textEntryMathPage.responseFieldPreviewTab(), 1);
|
|
200
199
|
});
|
|
201
|
-
|
|
202
|
-
if (imageExpandEnhancement === 'true') {
|
|
203
|
-
it('When user add large image in question input field, user should be able to expand the image in preview tab', () => {
|
|
204
|
-
textEntryMathPage.steps.switchToEditTab();
|
|
205
|
-
textEntryMathPage.steps.focusInQuestionInputField();
|
|
206
|
-
textEntryMathPage.steps.selectImageOptionFromCKEditorToolbar();
|
|
207
|
-
textEntryMathPage.steps.addImageToInputField();
|
|
208
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
|
209
|
-
textEntryMathPage.steps.verifyExpandIconInImage();
|
|
210
|
-
textEntryMathPage.steps.clickExpandIconInImage();
|
|
211
|
-
utilities.verifyInnerText(textEntryMathPage.closeImagePopup(), 'Close');
|
|
212
|
-
textEntryMathPage.steps.closeImagePopup();
|
|
213
|
-
textEntryMathPage.steps.verifyExpandIconInImage();
|
|
214
|
-
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
200
|
});
|
|
218
201
|
|
|
219
202
|
describe('User should be able to edit incomplete authored question', () => {
|
|
@@ -3,7 +3,6 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
5
|
const grepTags = Cypress.env('grepTags');
|
|
6
|
-
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
7
6
|
|
|
8
7
|
describe('Create Item page - Text selection: Question Instructions and Question section', () => {
|
|
9
8
|
before(() => {
|
|
@@ -192,21 +191,6 @@ describe('Create Item page - Text selection: Question Instructions and Question
|
|
|
192
191
|
textSelectionPage.steps.verifyBoldTextInPreviewTab();
|
|
193
192
|
textSelectionPage.steps.verifyLinkInPreviewTab();
|
|
194
193
|
});
|
|
195
|
-
if (imageExpandEnhancement === 'true') {
|
|
196
|
-
it('Image expand icon should be visible on the image in option', () => {
|
|
197
|
-
textSelectionPage.steps.verifyExpandIconInImage();
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
it('When the user clicks on the expand button then the image should be expanded and a close button should be displayed', () => {
|
|
201
|
-
textSelectionPage.steps.clickExpandIconInImage();
|
|
202
|
-
utilities.verifyInnerText(textSelectionPage.closeImagePopup(), 'Close');
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed on image again in the option', () => {
|
|
206
|
-
textSelectionPage.steps.closeImagePopup();
|
|
207
|
-
textSelectionPage.steps.verifyExpandIconInImage();
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
194
|
|
|
211
195
|
//Failing due to https://redmine.zeuslearning.com/issues/537907
|
|
212
196
|
it('CSS of \'Preview tab\' when image, equation, bold text and link are added', { tags: 'css' }, () => {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import constants from "../../fixtures/constants";
|
|
2
|
-
import utilities from "../../support/helpers/utilities";
|
|
3
2
|
|
|
4
3
|
const selectors = {
|
|
5
4
|
imageIcon: () => cy.get('a[title="Insert Image"]:visible'),
|
|
@@ -27,28 +26,9 @@ const selectors = {
|
|
|
27
26
|
linkDialogboxURLInputField: () => cy.get('input[class*="cke_dialog_ui_input_text"]:visible').eq(1),
|
|
28
27
|
sourceIcon: () => cy.get('a[title="Source"]:visible'),
|
|
29
28
|
sourceTextArea: () => cy.get('textarea.cke_source'),
|
|
30
|
-
expandIconButton: () => cy.get('.expand-image-btn'),
|
|
31
|
-
closeImagePopup: () => cy.get('.close-popup-btn'),
|
|
32
29
|
}
|
|
33
30
|
|
|
34
31
|
const steps = {
|
|
35
|
-
verifyExpandIconInImage: () => {
|
|
36
|
-
utilities.verifyElementVisibilityState(ckEditorToolbar.expandIconButton(), 'visible');
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
clickExpandIconInImage: () => {
|
|
40
|
-
ckEditorToolbar.expandIconButton()
|
|
41
|
-
.first()
|
|
42
|
-
.scrollIntoView()
|
|
43
|
-
.realClick();
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
closeImagePopup: () => {
|
|
47
|
-
ckEditorToolbar.closeImagePopup()
|
|
48
|
-
.click();
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
|
|
52
32
|
selectBoldOptionFromCKEditorToolbar: () => {
|
|
53
33
|
ckEditorToolbar.boldIcon()
|
|
54
34
|
.click();
|
|
@@ -3,7 +3,6 @@ import { commonComponents } from "./commonComponents";
|
|
|
3
3
|
import { createQuestionBasePage } from "./createQuestionBasePage";
|
|
4
4
|
import { draggableOptionsSectionComponent } from "./draggableOptionsSectionComponent";
|
|
5
5
|
import { optionsWrapperComponent } from "./optionsWrapperComponent";
|
|
6
|
-
import { ckEditorToolbar } from "./ckEditorToolbar";
|
|
7
6
|
const css = Cypress.env('css');
|
|
8
7
|
const options = ['option 1', 'option 2'];
|
|
9
8
|
const threeOptions = ['option 1', 'option 2', 'option 3'];
|
|
@@ -454,19 +453,6 @@ const tests = {
|
|
|
454
453
|
createQuestionBasePage.steps.switchToPreviewTab();
|
|
455
454
|
draggableOptionContainer.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(optionsAfterDeleting);
|
|
456
455
|
});
|
|
457
|
-
it('When user add large image in option, the option container should have expand icon', () => {
|
|
458
|
-
createQuestionBasePage.steps.switchToEditTab();
|
|
459
|
-
optionsWrapperComponent.steps.addOption();
|
|
460
|
-
optionsWrapperComponent.steps.focusInOptionsInputField(2)
|
|
461
|
-
ckEditorToolbar.steps.selectImageOptionFromCKEditorToolbar()
|
|
462
|
-
ckEditorToolbar.steps.addImageToInputField();
|
|
463
|
-
createQuestionBasePage.steps.switchToPreviewTab();
|
|
464
|
-
optionsWrapperComponent.steps.verifyExpandIconInImage();
|
|
465
|
-
optionsWrapperComponent.steps.clickExpandIconInImage();
|
|
466
|
-
utilities.verifyInnerText(optionsWrapperComponent.closeImagePopup(), 'Close');
|
|
467
|
-
optionsWrapperComponent.steps.closeImagePopup();
|
|
468
|
-
optionsWrapperComponent.steps.verifyExpandIconInImage();
|
|
469
|
-
});
|
|
470
456
|
},
|
|
471
457
|
|
|
472
458
|
verifyDraggableOptionsForGroupedLayoutInSpecifyCorrectAnswerSection: () => {
|
|
@@ -158,26 +158,10 @@ const selectors = {
|
|
|
158
158
|
colorBlock: () => cy.get('.color-grid-wrapper .color-picker-block'),
|
|
159
159
|
editColorButton: () => cy.get('button[aria-label="edit color"]'),
|
|
160
160
|
colorBlockSelectedIcon: () => cy.get('[class*="BtnSelectionWrapper"] svg'),
|
|
161
|
-
optionsInputFieldInQuestionPreviewTab: () => cy.get('.cell-content-text')
|
|
162
|
-
expandIconButton: () => cy.get('.expand-image-btn'),
|
|
163
|
-
closeImagePopup: () => cy.get('.close-popup-btn')
|
|
161
|
+
optionsInputFieldInQuestionPreviewTab: () => cy.get('.cell-content-text')
|
|
164
162
|
}
|
|
165
163
|
|
|
166
164
|
const steps = {
|
|
167
|
-
verifyExpandIconInImage: () => {
|
|
168
|
-
utilities.verifyElementVisibilityState(gridQuestionCommonComponent.expandIconButton(), 'visible');
|
|
169
|
-
},
|
|
170
|
-
|
|
171
|
-
clickExpandIconInImage: () => {
|
|
172
|
-
gridQuestionCommonComponent.expandIconButton()
|
|
173
|
-
.click();
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
closeImagePopup: () => {
|
|
177
|
-
gridQuestionCommonComponent.closeImagePopup()
|
|
178
|
-
.click();
|
|
179
|
-
},
|
|
180
|
-
|
|
181
165
|
/**
|
|
182
166
|
* Modifies the property of a table cell at the specified row and column.
|
|
183
167
|
* @param {Object} position - The position of the table cell to modify.
|
|
@@ -2,10 +2,8 @@ import constants from "../../fixtures/constants";
|
|
|
2
2
|
import utilities from "../../support/helpers/utilities";
|
|
3
3
|
import { ckEditorToolbar } from "./ckEditorToolbar";
|
|
4
4
|
import { commonComponents } from "./commonComponents";
|
|
5
|
-
import { createQuestionBasePage } from "./createQuestionBasePage";
|
|
6
5
|
import { equationEditorFlyout } from "./equationEditorFlyout";
|
|
7
6
|
const css = Cypress.env('css');
|
|
8
|
-
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
9
7
|
|
|
10
8
|
const selectors = {
|
|
11
9
|
optionsLabel: () => cy.get('.options-label-wrapper .options-label'),
|
|
@@ -15,9 +13,7 @@ const selectors = {
|
|
|
15
13
|
deleteOptionButton: () => cy.get('.ngie-button[aria-label*="Delete option"]'),
|
|
16
14
|
optionsInputField: () => cy.get('.option-component [role="textbox"]'),
|
|
17
15
|
//TODO: Need to update this in all TEI
|
|
18
|
-
optionNumeration: () => cy.get('[class*="SingleOptionstyle__AdornmentDiv"]')
|
|
19
|
-
expandIconButton: () => cy.get('.expand-image-container .expand-image-btn[aria-label="expand image button"]'),
|
|
20
|
-
closeImagePopup: () => cy.get('.close-popup-btn')
|
|
16
|
+
optionNumeration: () => cy.get('[class*="SingleOptionstyle__AdornmentDiv"]')
|
|
21
17
|
}
|
|
22
18
|
|
|
23
19
|
const steps = {
|
|
@@ -304,23 +300,7 @@ const steps = {
|
|
|
304
300
|
|
|
305
301
|
verifyOptionCount: (count) => {
|
|
306
302
|
utilities.verifyElementCount(optionsWrapperComponent.optionsInputField(), count);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
verifyExpandIconInImage: () => {
|
|
310
|
-
utilities.verifyElementVisibilityState(optionsWrapperComponent.expandIconButton(), 'visible');
|
|
311
|
-
},
|
|
312
|
-
|
|
313
|
-
clickExpandIconInImage: () => {
|
|
314
|
-
optionsWrapperComponent.expandIconButton()
|
|
315
|
-
.first()
|
|
316
|
-
.scrollIntoView()
|
|
317
|
-
.realClick();
|
|
318
|
-
},
|
|
319
|
-
|
|
320
|
-
closeImagePopup: () => {
|
|
321
|
-
optionsWrapperComponent.closeImagePopup()
|
|
322
|
-
.click();
|
|
323
|
-
}
|
|
303
|
+
}
|
|
324
304
|
}
|
|
325
305
|
|
|
326
306
|
const tests = {
|
|
@@ -407,17 +387,6 @@ const tests = {
|
|
|
407
387
|
ckEditorToolbar.steps.addImageToInputField();
|
|
408
388
|
optionsWrapperComponent.steps.verifyImageAndAltTextInOptionsInputField(inputFieldIndex);
|
|
409
389
|
});
|
|
410
|
-
if (imageExpandEnhancement === 'true') {
|
|
411
|
-
it('When user add large image in options input field, user should be able to expand the image in preview tab', () => {
|
|
412
|
-
createQuestionBasePage.steps.switchToPreviewTab();
|
|
413
|
-
ckEditorToolbar.steps.verifyExpandIconInImage();
|
|
414
|
-
ckEditorToolbar.steps.clickExpandIconInImage();
|
|
415
|
-
utilities.verifyInnerText(ckEditorToolbar.closeImagePopup(), 'Close');
|
|
416
|
-
ckEditorToolbar.steps.closeImagePopup();
|
|
417
|
-
ckEditorToolbar.steps.verifyExpandIconInImage();
|
|
418
|
-
createQuestionBasePage.steps.switchToEditTab();
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
390
|
},
|
|
422
391
|
|
|
423
392
|
/**
|
|
@@ -10,9 +10,7 @@ const selectors = {
|
|
|
10
10
|
responseAreaNumeration: () => cy.get('marker'),
|
|
11
11
|
responseAreaResponseLabel: () => cy.get('content'),
|
|
12
12
|
questionContainerPreviewTab: () => cy.get('.preview-question-text-wrapper'),
|
|
13
|
-
responseAreaSettingsButton: () => cy.get('.add_response_settings_btn')
|
|
14
|
-
expandIconButton: () => cy.get('.expand-image-btn'),
|
|
15
|
-
closeImagePopup: () => cy.get('.close-popup-btn'),
|
|
13
|
+
responseAreaSettingsButton: () => cy.get('.add_response_settings_btn')
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
const steps = {
|
|
@@ -147,21 +145,7 @@ const steps = {
|
|
|
147
145
|
utilities.getNthElement(questionInputFieldComponent.responseArea(), responseAreaIndex)
|
|
148
146
|
.find('.add_response_element')
|
|
149
147
|
.should('have.css', 'height', height);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
verifyExpandIconInImage: () => {
|
|
153
|
-
utilities.verifyElementVisibilityState(questionInputFieldComponent.expandIconButton(), 'visible');
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
clickExpandIconInImage: () => {
|
|
157
|
-
questionInputFieldComponent.expandIconButton()
|
|
158
|
-
.click();
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
closeImagePopup: () => {
|
|
162
|
-
questionInputFieldComponent.closeImagePopup()
|
|
163
|
-
.click();
|
|
164
|
-
}
|
|
148
|
+
}
|
|
165
149
|
}
|
|
166
150
|
|
|
167
151
|
const tests = {
|
|
@@ -5,7 +5,6 @@ import { createItemPage } from "./createItemPage";
|
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
6
|
const options = ['option 1', 'option 2', 'option 3'];
|
|
7
7
|
const fourOptions = ['option 1', 'option 2', 'option 3', 'option 4'];
|
|
8
|
-
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
9
8
|
|
|
10
9
|
const selectors = {
|
|
11
10
|
...correctIncorrectAnswerLabelComponent,
|
|
@@ -25,7 +24,6 @@ const selectors = {
|
|
|
25
24
|
...scoringSectionBaseEditTab,
|
|
26
25
|
...additionalSettingsPanel,
|
|
27
26
|
...connectorStyleStyleAndLayoutCustomizationComponent,
|
|
28
|
-
...ckEditorToolbar,
|
|
29
27
|
//Edit tab
|
|
30
28
|
promptInputField: () => cy.get('.edit-mcq-stems-wrapper [role="textbox"]'),
|
|
31
29
|
promptInputFieldWrapper: () => cy.get('.edit-mcq-stems-wrapper .edit-mcq-option-wrapper'),
|
|
@@ -2866,22 +2864,6 @@ const tests = {
|
|
|
2866
2864
|
createQuestionBasePage.steps.switchToPreviewTab();
|
|
2867
2865
|
draggableOptionContainer.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(optionsAfterDeleting);
|
|
2868
2866
|
});
|
|
2869
|
-
if (imageExpandEnhancement === 'true') {
|
|
2870
|
-
it('When user add large image in question instruction, user should be able to expand the image in preview tab', () => {
|
|
2871
|
-
createQuestionBasePage.steps.switchToEditTab();
|
|
2872
|
-
optionsWrapperComponent.steps.addOption();
|
|
2873
|
-
matchingPage.steps.focusInOptionsInputField(3);
|
|
2874
|
-
matchingPage.steps.selectImageOptionFromCKEditorToolbar();
|
|
2875
|
-
matchingPage.steps.addImageToInputField();
|
|
2876
|
-
// matchingPage.steps.focusOutOptionsInputField(3);
|
|
2877
|
-
createQuestionBasePage.steps.switchToPreviewTab();
|
|
2878
|
-
matchingPage.steps.verifyExpandIconInImage();
|
|
2879
|
-
matchingPage.steps.clickExpandIconInImage();
|
|
2880
|
-
utilities.verifyInnerText(matchingPage.closeImagePopup(), 'Close');
|
|
2881
|
-
matchingPage.steps.closeImagePopup();
|
|
2882
|
-
matchingPage.steps.verifyExpandIconInImage();
|
|
2883
|
-
});
|
|
2884
|
-
}
|
|
2885
2867
|
},
|
|
2886
2868
|
|
|
2887
2869
|
//Need to remove when https://redmine.zeuslearning.com/issues/566720 is resolved
|
|
@@ -15,7 +15,6 @@ const selectors = {
|
|
|
15
15
|
...autoScoredScoringPreviewTab,
|
|
16
16
|
...randomizeOptionsComponent,
|
|
17
17
|
...additionalSettingsPanel,
|
|
18
|
-
...ckEditorToolbar,
|
|
19
18
|
partialEqualWeightsPointsPerResponseScore: () => cy.get('.alternate-points-points-per-value-span'),
|
|
20
19
|
snapToTicksCheckbox: () => cy.get('[data-ngie-testid="snap-to-grid-nodes-checkbox"] input'),
|
|
21
20
|
snapToTicksLabel: () => cy.get('[data-ngie-testid="snap-to-grid-nodes-checkbox"] .MuiFormControlLabel-label'),
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel, acceptedStudentInputComponent, studentViewSettingsLabelComponent, customizeSpecialCharacterComponent, studentResponseAndLayoutComponent, printPreviewComponent } from "./components/";
|
|
1
|
+
import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel, acceptedStudentInputComponent, studentViewSettingsLabelComponent, customizeSpecialCharacterComponent, studentResponseAndLayoutComponent, printPreviewComponent, showAlternativeAnswersComponent } from "./components/";
|
|
2
2
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
3
3
|
import utilities from "../support/helpers/utilities";
|
|
4
4
|
import { createItemPage } from "./createItemPage";
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
6
7
|
|
|
7
8
|
const selectors = {
|
|
8
9
|
...questionInstructionsComponent,
|
|
@@ -18,6 +19,7 @@ const selectors = {
|
|
|
18
19
|
...createQuestionBasePage,
|
|
19
20
|
...printPreviewComponent,
|
|
20
21
|
...autoScoredScoringSectionMultiResponseType,
|
|
22
|
+
...showAlternativeAnswersComponent,
|
|
21
23
|
|
|
22
24
|
answerLabelSpecifyCorrectAnswerSection: () => cy.get('.answer-label'),
|
|
23
25
|
displayCharacterCountLabel: () => cy.get('[data-ngie-testid="display-character-count-checkbox"] .MuiFormControlLabel-label'),
|
|
@@ -65,7 +67,13 @@ const selectors = {
|
|
|
65
67
|
//Preview tab
|
|
66
68
|
previewTabResponseField: () => cy.get('.input-field input:visible'),
|
|
67
69
|
previewTabResponseFieldWrapper: () => cy.get('.input-wrapper:visible'),
|
|
68
|
-
previewTabCorrectAnswerWrapper: () =>
|
|
70
|
+
previewTabCorrectAnswerWrapper: () => {
|
|
71
|
+
if (alternativeAnswerCheck) {
|
|
72
|
+
return cy.get('[class*="CorrectAnswerSectionstyle__CorrectAnswerLabelWrapper"]');
|
|
73
|
+
} else {
|
|
74
|
+
return cy.get('[class*="ShortTextResponsestyles__CorrectAnswerWrapper"]');
|
|
75
|
+
}
|
|
76
|
+
},
|
|
69
77
|
previewTabCorrectAnswerLabel: () => cy.get('[class*="ShortTextResponsestyles__CorrectAnswerLabel"]'),
|
|
70
78
|
previewTabCorrectAnswerResponse: () => cy.get('[class*="ShortTextResponsestyles__CorrectAnswerValueWrapper"]'),
|
|
71
79
|
responseFieldCountPreviewTab: () => cy.get('[class*="InputLimitLabelWrapper"]'),
|
|
@@ -127,6 +135,7 @@ const steps = {
|
|
|
127
135
|
...createItemPage.steps,
|
|
128
136
|
...printPreviewComponent.steps,
|
|
129
137
|
...autoScoredScoringSectionMultiResponseType.steps,
|
|
138
|
+
...showAlternativeAnswersComponent.steps,
|
|
130
139
|
|
|
131
140
|
verifyCorrectIcon: () => {
|
|
132
141
|
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
|
|
@@ -149,7 +158,7 @@ const steps = {
|
|
|
149
158
|
|
|
150
159
|
verifyIncorrectAttemptBorder: () => {
|
|
151
160
|
utilities.verifyCSS(shortTextResponsePage.previewTabResponseField().parent().find('fieldset'), {
|
|
152
|
-
'border': `
|
|
161
|
+
'border': `0.8px solid ${css.color.incorrectAnswer}`
|
|
153
162
|
});
|
|
154
163
|
},
|
|
155
164
|
|
|
@@ -165,14 +174,33 @@ const steps = {
|
|
|
165
174
|
* @param {String} correctAnswer correct answer in correct answer wrapper present in grading view
|
|
166
175
|
* @description function verifies correct answer wrapper in grading view
|
|
167
176
|
*/
|
|
168
|
-
verifyCorrectAnswerResponseInCorrectAnswerWrapper: (correctAnswer) => {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
177
|
+
verifyCorrectAnswerResponseInCorrectAnswerWrapper: (correctAnswer, correctAnswerPoints = '') => {
|
|
178
|
+
if (alternativeAnswerCheck) {
|
|
179
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerWrapper(), 'visible');
|
|
180
|
+
(correctAnswerPoints !== '') && shortTextResponsePage.steps.verifyCorrectAnswersLabelAndPointVisible(`(${correctAnswerPoints} points)`);
|
|
181
|
+
} else {
|
|
182
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerWrapper(), 'visible');
|
|
183
|
+
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'Correct answer:');
|
|
184
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'visible');
|
|
185
|
+
}
|
|
172
186
|
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerResponse(), correctAnswer);
|
|
173
187
|
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerResponse(), 'visible');
|
|
174
188
|
},
|
|
175
189
|
|
|
190
|
+
verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper: (correctAnswer, correctAnswerPoints, alternateAnswer, alternateAnswerPoints) => {
|
|
191
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerWrapper(), 'visible');
|
|
192
|
+
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerResponse().eq(0), correctAnswer);
|
|
193
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerResponse().eq(0), 'visible');
|
|
194
|
+
shortTextResponsePage.steps.verifyCorrectAnswersLabelAndPointVisible(`(${correctAnswerPoints} points)`);
|
|
195
|
+
shortTextResponsePage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
196
|
+
shortTextResponsePage.steps.disableShowAlternativeAnswersToggle();
|
|
197
|
+
shortTextResponsePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
198
|
+
shortTextResponsePage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
199
|
+
shortTextResponsePage.steps.clickShowAlternativeAnswersToggle();
|
|
200
|
+
shortTextResponsePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, `(${alternateAnswerPoints} points)`);
|
|
201
|
+
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerResponse().eq(1), alternateAnswer);
|
|
202
|
+
},
|
|
203
|
+
|
|
176
204
|
enterTextInShortTextResponseInputField: (correctAnswer) => {
|
|
177
205
|
shortTextResponsePage.setCorrectAnswerResponseField()
|
|
178
206
|
.type(correctAnswer)
|
|
@@ -102,8 +102,6 @@ const selectors = {
|
|
|
102
102
|
optionsInputFieldInQuestionPreviewTab: () => cy.get('[class*="word-span highlight_option"]'),
|
|
103
103
|
questionInstructionsPrintViewText: () => cy.get('.question-text-wrapper').eq(0),
|
|
104
104
|
questionTextPrintViewParagraphs: () => cy.get('#nextgen-assess-print-view [data-testid="question-instruction-element"] p'),
|
|
105
|
-
expandIconButton: () => cy.get('.expand-image-btn'),
|
|
106
|
-
closeImagePopup: () => cy.get('.close-popup-btn'),
|
|
107
105
|
}
|
|
108
106
|
|
|
109
107
|
const steps = {
|
|
@@ -1381,21 +1379,7 @@ const steps = {
|
|
|
1381
1379
|
textSelectionPage.questionTextPrintViewParagraphs().each(($el, index) => {
|
|
1382
1380
|
utilities.verifyInnerText(utilities.getNthElement(textSelectionPage.questionTextPrintViewParagraphs(), index), `${paragraphTextArray[index]}`);
|
|
1383
1381
|
});
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
verifyExpandIconInImage: () => {
|
|
1387
|
-
utilities.verifyElementVisibilityState(textSelectionPage.expandIconButton(), 'visible');
|
|
1388
|
-
},
|
|
1389
|
-
|
|
1390
|
-
clickExpandIconInImage: () => {
|
|
1391
|
-
textSelectionPage.expandIconButton()
|
|
1392
|
-
.click();
|
|
1393
|
-
},
|
|
1394
|
-
|
|
1395
|
-
closeImagePopup: () => {
|
|
1396
|
-
textSelectionPage.closeImagePopup()
|
|
1397
|
-
.click();
|
|
1398
|
-
},
|
|
1382
|
+
}
|
|
1399
1383
|
}
|
|
1400
1384
|
|
|
1401
1385
|
const tests = {
|