itemengine-cypress-automation 1.0.590 → 1.0.591-IEI-7195-9cb645a.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/gradingViewAndCorrectAnswerView.smoke.js +7 -4
- package/cypress/e2e/ILC/ChartsBar/gradingViewAndCorrectAnswerView.smoke.js +7 -4
- package/cypress/e2e/ILC/ChartsBar/selectChartTypeSection.js +7 -4
- package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +7 -4
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/pages/chartsBarPage.js +1 -1
- package/cypress/pages/components/chartsCommonComponent.js +1 -0
- package/cypress/pages/drawingResponsePage.js +1 -7
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +1 -12
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import utilities from "../../../../support/helpers/utilities";
|
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
5
|
|
|
6
6
|
let gradingAndCorrectAnsView = ['Grading view', 'Correct answer view']
|
|
7
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === true;
|
|
7
8
|
const views = utilities.getViews(gradingAndCorrectAnsView);
|
|
8
9
|
let itemReferenceID = "";
|
|
9
10
|
const barBackgroundColor = ['rgb(46, 169, 89)', 'rgb(6, 117, 244)', 'rgb(219, 124, 0)', 'rgb(156, 105, 39)', 'rgb(219, 60, 0)'];
|
|
@@ -103,10 +104,12 @@ describe('Create item page - Charts - Bar horizontal orientation: Grading view,
|
|
|
103
104
|
}
|
|
104
105
|
});
|
|
105
106
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
if (!alternativeAnswerCheck) {
|
|
108
|
+
it('Correct answer label should be displayed', () => {
|
|
109
|
+
utilities.verifyInnerText(chartsBarPage.correctAnswersLabel(), 'Correct answers');
|
|
110
|
+
utilities.verifyElementVisibilityState(chartsBarPage.correctAnswersLabel(), 'visible');
|
|
111
|
+
});
|
|
112
|
+
}
|
|
110
113
|
|
|
111
114
|
it('Correct answer should be displayed in the correct answer section', () => {
|
|
112
115
|
chartsBarPage.steps.verifyBarHeightInCorrectAnswerSection({ barIndex: 0, barValue: 2, range: 20 });
|
|
@@ -4,6 +4,7 @@ import utilities from "../../../support/helpers/utilities";
|
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
5
|
|
|
6
6
|
let gradingAndCorrectAnsView = ['Grading view', 'Correct answer view']
|
|
7
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
7
8
|
const views = utilities.getViews(gradingAndCorrectAnsView);
|
|
8
9
|
let itemReferenceID = "";
|
|
9
10
|
const barBackgroundColor = ['rgb(46, 169, 89)', 'rgb(6, 117, 244)', 'rgb(219, 124, 0)', 'rgb(156, 105, 39)', 'rgb(219, 60, 0)'];
|
|
@@ -102,10 +103,12 @@ describe('Create item page - Charts - Bar: Grading view, Correct answer view con
|
|
|
102
103
|
}
|
|
103
104
|
});
|
|
104
105
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
if (!alternativeAnswerCheck) {
|
|
107
|
+
it('Correct answer label should be displayed', () => {
|
|
108
|
+
utilities.verifyInnerText(chartsBarPage.correctAnswersLabel(), 'Correct answers');
|
|
109
|
+
utilities.verifyElementVisibilityState(chartsBarPage.correctAnswersLabel(), 'visible');
|
|
110
|
+
});
|
|
111
|
+
}
|
|
109
112
|
|
|
110
113
|
it('Charts bar: Vertical - Correct answer should be displayed in the correct answer section', () => {
|
|
111
114
|
chartsBarPage.steps.verifyBarHeightInCorrectAnswerSection({ barIndex: 0, barValue: 2, range: 20 });
|
|
@@ -4,6 +4,7 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
5
|
const barBackgroundColor = ['rgb(46, 169, 89)', 'rgb(6, 117, 244)', 'rgb(219, 124, 0)'];
|
|
6
6
|
const barLabels = ['Bar 1', 'Bar 2', 'Bar 3']
|
|
7
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === true;
|
|
7
8
|
|
|
8
9
|
describe('Select chart type - Chart', () => {
|
|
9
10
|
before(() => {
|
|
@@ -339,10 +340,12 @@ describe('Select chart type - Chart', () => {
|
|
|
339
340
|
chartsBarPage.steps.verifyBarHeightInSelectChartType({ barIndex: 2, barValue: 0, range: 20 });
|
|
340
341
|
});
|
|
341
342
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
343
|
+
if (!alternativeAnswerCheck) {
|
|
344
|
+
it('When user sets a bar and does not lock the bar then it should not be reflected in specify correct answer section', () => {
|
|
345
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 2, value: 2, range: 20 });
|
|
346
|
+
chartsBarPage.steps.verifyBarHeightInSpecifyCorrectAnswer({ barIndex: 2, barValue: 0, range: 20 });
|
|
347
|
+
});
|
|
348
|
+
}
|
|
346
349
|
|
|
347
350
|
//Bar label
|
|
348
351
|
it('When user clicks on bar label button then popup should be displayed with title \'Bar label\' and \'Add label\' label with input field should be displayed along with \'Save\' and \'Cancel\' button', () => {
|
|
@@ -5,6 +5,7 @@ const css = Cypress.env('css');
|
|
|
5
5
|
|
|
6
6
|
let gradingAndCorrectAnsView = ['Grading view', 'Correct answer view']
|
|
7
7
|
const views = utilities.getViews(gradingAndCorrectAnsView);
|
|
8
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
8
9
|
let itemReferenceID = "";
|
|
9
10
|
|
|
10
11
|
|
|
@@ -101,10 +102,12 @@ describe('Create item page - Charts - Line: Grading view, Correct answer view co
|
|
|
101
102
|
chartsLinePage.steps.verifyPointValueInPreviewTab({ pointIndex: 1, value: 2, range: 20 });
|
|
102
103
|
});
|
|
103
104
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
if (!alternativeAnswerCheck) {
|
|
106
|
+
it('Correct answer label should be displayed', () => {
|
|
107
|
+
utilities.verifyInnerText(chartsLinePage.correctAnswersLabel(), 'Correct answers');
|
|
108
|
+
utilities.verifyElementVisibilityState(chartsLinePage.correctAnswersLabel(), 'visible');
|
|
109
|
+
});
|
|
110
|
+
}
|
|
108
111
|
|
|
109
112
|
it('Correct answer should be displayed in the correct answer section', () => {
|
|
110
113
|
chartsLinePage.steps.verifyPointValueInCorrectAnswerSection({ pointIndex: 0, value: 2, range: 20 });
|
|
@@ -506,7 +506,7 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
506
506
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(2);
|
|
507
507
|
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
|
|
508
508
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
509
|
-
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct
|
|
509
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answer');
|
|
510
510
|
listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(['sprout', 'plant', 'flower', 'seed'], ['2', '3', '4', '1']);
|
|
511
511
|
};
|
|
512
512
|
});
|
|
@@ -39,6 +39,7 @@ const selectors = {
|
|
|
39
39
|
|
|
40
40
|
//correct answer section
|
|
41
41
|
correctAnswersLabel: () => cy.get('[class*="CorrectAnswerHeader"]:visible'),
|
|
42
|
+
correctAnswerlabelWrapper: () => cy.get('[class*="CorrectAnswerLabelWrapper"]'),
|
|
42
43
|
correctIcon: () => cy.get('.icon-correct'),
|
|
43
44
|
incorrectIcon: () => cy.get('.icon-incorrect'),
|
|
44
45
|
correctIncorrectAnswerTextWrapper: () => cy.get('[class*="AnswerStatusWrapper"]'),
|
|
@@ -713,13 +713,7 @@ const steps = {
|
|
|
713
713
|
* @param {string} fileSize size of the file being uploaded
|
|
714
714
|
*/
|
|
715
715
|
verifyUploadingFilesMessage: (fileName, fileSize) => {
|
|
716
|
-
drawingResponsePage.insertImageContainer()
|
|
717
|
-
.should('be.visible')
|
|
718
|
-
.and(($el) => {
|
|
719
|
-
const text = $el.text();
|
|
720
|
-
expect(text).to.include('Uploading files. Please wait...');
|
|
721
|
-
expect(text).to.include(`${fileName} - ${fileSize}`);
|
|
722
|
-
});
|
|
716
|
+
utilities.verifyInnerText(drawingResponsePage.insertImageContainer(), `Uploading files. Please wait...\n${fileName} - ${fileSize}`);
|
|
723
717
|
},
|
|
724
718
|
|
|
725
719
|
/**
|
|
@@ -32,7 +32,7 @@ const selectors = {
|
|
|
32
32
|
dropzoneSettingsSetForAllDropzoneLabel: () => cy.get('[data-ngie-testid="set-for-all-dropzones-checkbox"] [class*="label"]'),
|
|
33
33
|
dropzoneSettingsSetForAllDropzoneCheckbox: () => cy.get('[data-ngie-testid="set-for-all-dropzones-checkbox"] input'),
|
|
34
34
|
//Specify correct answer section
|
|
35
|
-
dropzoneSpecifyCorrectAnswerSection: () => cy.get('
|
|
35
|
+
dropzoneSpecifyCorrectAnswerSection: () => cy.get('[class="droppable-area"] [role="button"]'),
|
|
36
36
|
optionContainerOptionsSpecifyCorrectAnswerSection: () => cy.get('.draggable-selected-item'),
|
|
37
37
|
optionsContainerSpecifyCorrectAnswerSection: () => cy.get('.draggable-wrapper'),
|
|
38
38
|
addAlternateButtonSpecifyCorrectAnswer: () => cy.get('.alternate-option-btn-wrapper button'),
|
|
@@ -96,8 +96,7 @@ const selectors = {
|
|
|
96
96
|
dropzoneNumerationBox: () => cy.get('.answer-numeration-number-box'),
|
|
97
97
|
correctAnswerResponseWrapperWithoutEnumeration: () => cy.get('.dnd-correct-answer-wrapper [class*="ResponseDropZonestyles__ResponseWrapper"]'),
|
|
98
98
|
responseAreaPreviewTab: () => cy.get('[class*="ResponseDropZonestyles__ResponseWrapper"] .cell'),
|
|
99
|
-
droppedOptionPreviewTab: () => cy.get('.response-dropped')
|
|
100
|
-
correctAnswersOptions: () => cy.get('[class*="ResponseComponentstyles__AnswerCell"] .question-text-wrapper'),
|
|
99
|
+
droppedOptionPreviewTab: () => cy.get('.response-dropped')
|
|
101
100
|
}
|
|
102
101
|
|
|
103
102
|
const steps = {
|
|
@@ -1226,16 +1225,6 @@ const steps = {
|
|
|
1226
1225
|
'border-style': styleName
|
|
1227
1226
|
});
|
|
1228
1227
|
},
|
|
1229
|
-
|
|
1230
|
-
verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount: (correctAnswerArray) => {
|
|
1231
|
-
utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.correctAnswersOptions(), correctAnswerArray.length);
|
|
1232
|
-
correctAnswerArray.forEach((correctAnswer, index) => {
|
|
1233
|
-
utilities.verifyTextContent(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.dropzoneNumerationBox(), index), index + 1);
|
|
1234
|
-
correctAnswer.forEach((answerOption) => {
|
|
1235
|
-
utilities.verifyTextContent(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.correctAnswersOptions(), index), answerOption);
|
|
1236
|
-
});
|
|
1237
|
-
});
|
|
1238
|
-
},
|
|
1239
1228
|
}
|
|
1240
1229
|
|
|
1241
1230
|
const tests = {
|