itemengine-cypress-automation 1.0.579-IEI-7178-6f40615.0 → 1.0.579-IEI-7193-1dd98c9.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 +2 -1
- package/cypress/config-files/ilqa.json +2 -1
- package/cypress/config-files/ilstage.json +2 -1
- package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +17 -0
- package/cypress/e2e/ILC/MultipleSelection/previewContentsForAllViews.smoke.js +18 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +19 -0
- package/cypress/e2e/ILC/NumberLineLabel/editTabBasicSection.js +18 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +2 -11
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +2 -11
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +2 -11
- 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 +18 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +19 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +17 -0
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +16 -0
- package/cypress/e2e/ILC/dataApi/fetchQuestion.js +150 -111
- package/cypress/e2e/ILC/dataApi/saveQuestions.js +53 -0
- package/cypress/pages/components/ckEditorToolbar.js +20 -0
- package/cypress/pages/components/draggableOptionContainer.js +14 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +17 -1
- package/cypress/pages/components/optionsWrapperComponent.js +33 -2
- package/cypress/pages/components/questionInputFieldComponent.js +18 -2
- package/cypress/pages/matchingPage.js +18 -0
- package/cypress/pages/numberLineLabelPage.js +1 -0
- package/cypress/pages/shortTextResponsePage.js +7 -35
- package/cypress/pages/textSelectionPage.js +17 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@
|
|
|
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"
|
|
16
|
+
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "false",
|
|
17
|
+
"ENABLE_EXPAND_IMAGE_ENHANCEMENT": "false"
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
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"
|
|
16
|
+
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "true",
|
|
17
|
+
"ENABLE_EXPAND_IMAGE_ENHANCEMENT": "true"
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
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"
|
|
14
|
+
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "false",
|
|
15
|
+
"ENABLE_EXPAND_IMAGE_ENHANCEMENT": "false"
|
|
15
16
|
}
|
|
16
17
|
}
|
|
@@ -3,6 +3,7 @@ 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');
|
|
6
7
|
|
|
7
8
|
describe('Create Item page - Matching : Question Instructions and prompt section', () => {
|
|
8
9
|
before(() => {
|
|
@@ -272,6 +273,22 @@ describe('Create Item page - Matching : Question Instructions and prompt section
|
|
|
272
273
|
utilities.verifyElementVisibilityState(matchingPage.dropzoneColumnAndPromptHeaderWrapperPreviewTab(), 'notExist');
|
|
273
274
|
});
|
|
274
275
|
|
|
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
|
+
|
|
275
292
|
it('CSS of added prompt in \'Preview\' tab table', { tags: 'css' }, () => {
|
|
276
293
|
utilities.verifyCSS(matchingPage.promptContainerPreviewTab().find('.question-text-wrapper'), {
|
|
277
294
|
'color': css.color.text,
|
|
@@ -6,6 +6,7 @@ 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');
|
|
9
10
|
|
|
10
11
|
describe('Create item page - Multiple selection: Preview contents', () => {
|
|
11
12
|
before(() => {
|
|
@@ -91,6 +92,23 @@ describe('Create item page - Multiple selection: Preview contents', () => {
|
|
|
91
92
|
multipleSelectionPage.steps.verifyEquationTextInPreviewTab(2);
|
|
92
93
|
cy.eyesCheckWindow(`Multiple selection - ${view} - Image, Bold Text, and Equation Display`);
|
|
93
94
|
});
|
|
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
|
+
}
|
|
94
112
|
|
|
95
113
|
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
|
96
114
|
it(`All the options should be in unchecked state`, () => {
|
|
@@ -6,6 +6,7 @@ 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');
|
|
9
10
|
|
|
10
11
|
describe('Create item page - Multiple selection grid: Preview contents', () => {
|
|
11
12
|
before(() => {
|
|
@@ -94,6 +95,24 @@ describe('Create item page - Multiple selection grid: Preview contents', () => {
|
|
|
94
95
|
utilities.verifyInnerText(multipleSelectionGridPage.questionInstructionsText(), 'Please select where the following animals are found');
|
|
95
96
|
utilities.verifyElementVisibilityState(multipleSelectionGridPage.questionInstructionsText(), 'visible');
|
|
96
97
|
});
|
|
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
|
+
}
|
|
97
116
|
|
|
98
117
|
it(`Multiple selection grid - The question grid as set by the user should be displayed in the ${view}`, () => {
|
|
99
118
|
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'None');
|
|
@@ -3,6 +3,7 @@ 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');
|
|
6
7
|
const labels = ['Label 1', 'Label 2', 'Label 3']
|
|
7
8
|
describe('Create Item page - Number line label : Question instructions and label section', () => {
|
|
8
9
|
before(() => {
|
|
@@ -41,6 +42,23 @@ describe('Create Item page - Number line label : Question instructions and label
|
|
|
41
42
|
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.');
|
|
42
43
|
});
|
|
43
44
|
|
|
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
|
+
|
|
44
62
|
//Need to remove this comment once https://redmine.zeuslearning.com/issues/578531 is resolved
|
|
45
63
|
// numberLineLabelPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
|
|
46
64
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
|
|
6
5
|
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
7
6
|
before(() => {
|
|
@@ -25,11 +24,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
25
24
|
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', () => {
|
|
26
25
|
shortTextResponsePage.steps.switchToGradingView();
|
|
27
26
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
28
|
-
|
|
29
|
-
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Fossil fuel combustion', 20, 'Buildings', 10);
|
|
30
|
-
} else {
|
|
31
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
32
|
-
}
|
|
27
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
33
28
|
shortTextResponsePage.steps.switchToStudentView();
|
|
34
29
|
});
|
|
35
30
|
|
|
@@ -61,11 +56,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
61
56
|
shortTextResponsePage.steps.switchToGradingView();
|
|
62
57
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
63
58
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
64
|
-
|
|
65
|
-
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Fossil fuel combustion', 20, 'Buildings', 10);
|
|
66
|
-
} else {
|
|
67
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
68
|
-
}
|
|
59
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
69
60
|
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
70
61
|
});
|
|
71
62
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
|
|
6
5
|
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
7
6
|
before(() => {
|
|
@@ -25,11 +24,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
25
24
|
it('When the user switches to \'Grading\' view without attempting the question, then incorrect border and correct answer section should be displayed', () => {
|
|
26
25
|
shortTextResponsePage.steps.switchToGradingView();
|
|
27
26
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
28
|
-
|
|
29
|
-
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 20);
|
|
30
|
-
} else {
|
|
31
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
32
|
-
}
|
|
27
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
33
28
|
shortTextResponsePage.steps.switchToStudentView();
|
|
34
29
|
});
|
|
35
30
|
|
|
@@ -61,11 +56,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
61
56
|
shortTextResponsePage.steps.switchToGradingView();
|
|
62
57
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
63
58
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
64
|
-
|
|
65
|
-
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 20);
|
|
66
|
-
} else {
|
|
67
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
68
|
-
}
|
|
59
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
69
60
|
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
70
61
|
});
|
|
71
62
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
|
|
6
5
|
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
7
6
|
before(() => {
|
|
@@ -26,11 +25,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
26
25
|
shortTextResponsePage.steps.switchToGradingView();
|
|
27
26
|
shortTextResponsePage.steps.verifyCorrectIncorrectIconNotVisibleGradingView();
|
|
28
27
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
29
|
-
|
|
30
|
-
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 10);
|
|
31
|
-
} else {
|
|
32
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
33
|
-
}
|
|
28
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
34
29
|
shortTextResponsePage.steps.switchToStudentView();
|
|
35
30
|
});
|
|
36
31
|
|
|
@@ -66,11 +61,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
66
61
|
shortTextResponsePage.steps.switchToGradingView();
|
|
67
62
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
68
63
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
69
|
-
|
|
70
|
-
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 10);
|
|
71
|
-
} else {
|
|
72
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
73
|
-
}
|
|
64
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
74
65
|
});
|
|
75
66
|
|
|
76
67
|
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');
|
|
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');
|
|
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');
|
|
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');
|
|
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');
|
|
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');
|
|
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');
|
|
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,7 +7,6 @@ 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';
|
|
11
10
|
|
|
12
11
|
describe('Create item page - Short text response: All or nothing', () => {
|
|
13
12
|
before(() => {
|
|
@@ -111,7 +110,7 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
|
111
110
|
}
|
|
112
111
|
//Need to remove comment once https://redmine.zeuslearning.com/issues/576511 is resolved
|
|
113
112
|
// shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
114
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings'
|
|
113
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
115
114
|
});
|
|
116
115
|
|
|
117
116
|
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', () => {
|
|
@@ -121,7 +120,7 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
|
121
120
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
122
121
|
studentViewPage.steps.clickOnGoToGradingViewButton()
|
|
123
122
|
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
124
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings'
|
|
123
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
125
124
|
}
|
|
126
125
|
if (view === 'Question preview' || view === 'Item preview') {
|
|
127
126
|
shortTextResponsePage.steps.switchToGradingView();
|
|
@@ -282,6 +281,7 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
|
282
281
|
shortTextResponsePage.steps.checkNonScoredScoringLabel();
|
|
283
282
|
shortTextResponsePage.steps.switchToGradingView();
|
|
284
283
|
};
|
|
284
|
+
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'Correct answer:');
|
|
285
285
|
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Urbanization');
|
|
286
286
|
});
|
|
287
287
|
|
|
@@ -6,6 +6,7 @@ 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');
|
|
9
10
|
|
|
10
11
|
describe('Create item page - Single selection: Preview contents', () => {
|
|
11
12
|
before(() => {
|
|
@@ -94,6 +95,23 @@ describe('Create item page - Single selection: Preview contents', () => {
|
|
|
94
95
|
singleSelectionPage.steps.verifyEquationTextInPreviewTab(3);
|
|
95
96
|
cy.eyesCheckWindow(`Single selection - ${view} - Options with image, equation, bold text, and link`);
|
|
96
97
|
});
|
|
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
|
+
}
|
|
97
115
|
|
|
98
116
|
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
|
99
117
|
it(`All the options should be in unchecked state`, () => {
|
|
@@ -5,6 +5,7 @@ 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');
|
|
8
9
|
var itemReferenceID = "";
|
|
9
10
|
describe('Create item page - Single selection grid: Preview contents', () => {
|
|
10
11
|
before(() => {
|
|
@@ -93,6 +94,24 @@ describe('Create item page - Single selection grid: Preview contents', () => {
|
|
|
93
94
|
utilities.verifyInnerText(singleSelectionGridPage.questionInstructionsText(), 'Please select where the following animals are found');
|
|
94
95
|
utilities.verifyElementVisibilityState(singleSelectionGridPage.questionInstructionsText(), 'visible');
|
|
95
96
|
});
|
|
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
|
+
}
|
|
96
115
|
|
|
97
116
|
it(`Single selection - grid ${view} - The question grid as set by the user should be displayed in the ${view}`, () => {
|
|
98
117
|
singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'None');
|
|
@@ -3,6 +3,7 @@ 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');
|
|
6
7
|
|
|
7
8
|
describe('Create item page - Text entry math: Question instructions, Add structure - Question input field', () => {
|
|
8
9
|
before(() => {
|
|
@@ -197,6 +198,22 @@ describe('Create item page - Text entry math: Question instructions, Add structu
|
|
|
197
198
|
textEntryMathPage.steps.switchToPreviewTab();
|
|
198
199
|
utilities.verifyElementCount(textEntryMathPage.responseFieldPreviewTab(), 1);
|
|
199
200
|
});
|
|
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
|
+
}
|
|
200
217
|
});
|
|
201
218
|
|
|
202
219
|
describe('User should be able to edit incomplete authored question', () => {
|
|
@@ -3,6 +3,7 @@ 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');
|
|
6
7
|
|
|
7
8
|
describe('Create Item page - Text selection: Question Instructions and Question section', () => {
|
|
8
9
|
before(() => {
|
|
@@ -191,6 +192,21 @@ describe('Create Item page - Text selection: Question Instructions and Question
|
|
|
191
192
|
textSelectionPage.steps.verifyBoldTextInPreviewTab();
|
|
192
193
|
textSelectionPage.steps.verifyLinkInPreviewTab();
|
|
193
194
|
});
|
|
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
|
+
}
|
|
194
210
|
|
|
195
211
|
//Failing due to https://redmine.zeuslearning.com/issues/537907
|
|
196
212
|
it('CSS of \'Preview tab\' when image, equation, bold text and link are added', { tags: 'css' }, () => {
|