itemengine-cypress-automation 1.0.246-revertedSaveAsYouGo-5fef93d.0 → 1.0.246

Sign up to get free protection for your applications and to get access to all the features.
@@ -329,7 +329,7 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
329
329
  chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
330
330
  chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 4, range: 10 });
331
331
  chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 6, range: 10 });
332
- chartsBarPage.steps.verifyPreviewScore(8, 20);
332
+ chartsBarPage.steps.verifyPreviewScore(12.5, 50);
333
333
  chartsBarPage.steps.switchToGradingView();
334
334
  chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
335
335
  chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
@@ -328,7 +328,7 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
328
328
 
329
329
  chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 8, range: 10 });
330
330
  chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 6, range: 10 });
331
- chartsBarPage.steps.verifyPreviewScore(8, 20);
331
+ chartsBarPage.steps.verifyPreviewScore(12.5, 50);
332
332
  chartsBarPage.steps.switchToGradingView();
333
333
  chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
334
334
  chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
@@ -1,5 +1,6 @@
1
1
  import abortEarlySetup from "../../../support/helpers/abortEarly";
2
2
  import { dialogBoxBase, fillInTheGapsOverImageTextPage } from "../../../pages";
3
+ import utilities from "../../../support/helpers/utilities";
3
4
  const options = ['Flower', 'Leaves'];
4
5
 
5
6
  describe('Create item page - Fill in the gaps over image - text: Header section and saving question', () => {
@@ -40,7 +40,8 @@ describe('Create item page - Fill in the gaps over image with text: Supported fi
40
40
 
41
41
  it('When the user tries to uploads an image with unsupported file type, then an error message, "Error: The file type is not supported. Please upload a file with the following supported formats: JPG, PNG, GIF, SVG.", should be displayed', () => {
42
42
  fillInTheGapsOverImageTextPage.steps.uploadFile('sample.heic');
43
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.errorMessage(), 'notExist');
43
+ utilities.verifyTextContent(fillInTheGapsOverImageTextPage.errorMessage(), 'Error: The file type is not supported. Please upload a file with the following supported formats: JPG, PNG, GIF, SVG.');
44
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.errorMessage(), 'visible');
44
45
  fillInTheGapsOverImageTextPage.steps.verifyCanvasImageNotExist();
45
46
  });
46
47
 
@@ -2,7 +2,6 @@ import { dialogBoxBase, gridFillPage } from "../../../pages";
2
2
  import { autoScoredSpecifyCorrectAnswerSection } from "../../../pages/components";
3
3
  import abortEarlySetup from "../../../support/helpers/abortEarly";
4
4
  import utilities from "../../../support/helpers/utilities";
5
- import { autoScoredSpecifyCorrectAnswerSection } from "../../../pages/components";
6
5
 
7
6
  describe('Create Item page - Grid fill: Specify Correct answer, Alternative correct answer', () => {
8
7
  before(() => {
@@ -41,7 +41,7 @@ describe('Create item page - List ordering: Specify correct answer, Alternative
41
41
 
42
42
  it('When user tries to \'+Add alternative answer\' after allotting points without re-ordering the options then the warning popup should appear and on closing the warning popup, an error message should be displayed in the \'Specify correct answer\' section', () => {
43
43
  listOrderingPage.steps.clickOnAddAlternativeAnswerButton();
44
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
44
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
45
45
  utilities.verifyInnerText(listOrderingPage.errorMessage(), 'Error: The correct answer sequence matches the option sequence. Please either rearrange the options or select \'Randomize options\' to continue.');
46
46
  utilities.verifyElementVisibilityState(listOrderingPage.errorMessage(), 'visible');
47
47
  });
@@ -137,10 +137,6 @@ describe('Create Item page - Matching: Draggable options section', () => {
137
137
  matchingPage.steps.verifyDeleteOptionButtonDisabledState();
138
138
  });
139
139
 
140
- it('When the user not entering text in the option input fields, then the \'Add group\' button should be disable', () => {
141
- utilities.verifyElementDisabled(matchingPage.addGroupButton());
142
- });
143
-
144
140
  it('When the user enters text in the options input field, the error messages should disappear', () => {
145
141
  matchingPage.steps.enterTextInOneOptionInputField(0, 'option 1');
146
142
  matchingPage.steps.enterTextInOneOptionInputField(1, 'option 2');
@@ -31,7 +31,7 @@ describe('Create item page - Matching: Option section', () => {
31
31
  utilities.verifyElementCount(matchingPage.optionWrapper(), 2);
32
32
  cy.log('Verifying the input text given to input fields after deletion of 2nd option')
33
33
  optionsAfterDeleting.forEach((inputFieldText, optionIndex) => {
34
- utilities.verifyInputFieldValue(utilities.getNthElement(matchingPage.optionInnnerFieldInputFieldDropdown(), optionIndex), inputFieldText);
34
+ utilities.verifyInputFieldValue(utilities.getNthElement(matchingPage.optionInnerFieldInputFieldDropdown(), optionIndex), inputFieldText);
35
35
  });
36
36
  });
37
37
 
@@ -98,22 +98,7 @@ describe('Create item page - Charts - Dot plot: Header section and saving questi
98
98
  chartsDotPlotPage.steps.selectDotPlot();
99
99
  });
100
100
 
101
- describe('Validation error messages', () => {
102
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please set points']);
103
-
104
- it('Validation error messages should be displayed below required input fields', () => {
105
- chartsDotPlotPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
106
- chartsDotPlotPage.steps.verifyWarningIconOnRequiredFields(['Please set points']);
107
- chartsDotPlotPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
108
- });
109
-
110
- it('Validation error messages should disappear when required input fields are filled', () => {
111
- chartsDotPlotPage.steps.allotPoints(10);
112
- chartsDotPlotPage.steps.verifyErrorMessageIsNotDisplayed();
113
- });
114
-
115
- chartsDotPlotPage.tests.verifyCreateItemWrapperContentsA11y();
116
- });
101
+ chartsDotPlotPage.tests.verifyCreateItemWrapperContentsA11y();
117
102
 
118
103
  describe('Saving a question', () => {
119
104
  it('When user clicks on "Save question" button, then the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
@@ -264,7 +264,8 @@ const steps = {
264
264
  imageCanvasComponent.canvasWidthInputField()
265
265
  .invoke('attr', 'value')
266
266
  .then((value) => {
267
- imageCanvasComponent.canvasImage().should('have.css', 'width', `${value}px`);
267
+ imageCanvasComponent.canvasImage()
268
+ .should('have.css', 'width', `${value}px`);
268
269
  });
269
270
  },
270
271
 
@@ -791,10 +792,11 @@ const tests = {
791
792
  * @param {"text container"|"dropzone"} response value for the error message
792
793
  */
793
794
  verifyInsertAndDeleteResponseAreaFunctionality: (response) => {
794
- it(`When user clicks on close button for response container, then response container should be removed from canvas and error message should not be displayed`, () => {
795
+ it(`When user clicks on close button for response container, then response container should be removed from canvas and error message should be displayed`, () => {
795
796
  imageCanvasComponent.steps.removeResponseArea(0);
796
797
  utilities.verifyElementVisibilityState(imageCanvasComponent.responseAreaWrapper(), 'notExist');
797
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
798
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
799
+ utilities.verifyInnerText(commonComponents.errorMessage(), `Error: Please insert a ${response}.`);
798
800
  });
799
801
 
800
802
  it('When user adds response container, then error message should disappear', () => {
@@ -854,7 +856,8 @@ const tests = {
854
856
  }
855
857
  utilities.verifyElementCount(imageCanvasComponent.responseArea(), 0);
856
858
  imageCanvasComponent.steps.verifyUndoButtonDisabled();
857
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
859
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
860
+ utilities.verifyInnerText(commonComponents.errorMessage(), `Error: Please insert a ${response}.`);
858
861
  });
859
862
 
860
863
  it('When the user reaches the latest state by performing redo actions, the \'Redo\' button should get disabled and error message should disappear', () => {
@@ -1230,16 +1230,16 @@ const tests = {
1230
1230
 
1231
1231
  it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
1232
1232
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
1233
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
1233
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
1234
1234
  if (accordionName == 'Correct') {
1235
1235
  autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1236
1236
  .within(() => {
1237
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
1237
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1238
1238
  });
1239
1239
  } else {
1240
1240
  autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1241
1241
  .within(() => {
1242
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
1242
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1243
1243
  });
1244
1244
  };
1245
1245
  });
@@ -1560,16 +1560,17 @@ const tests = {
1560
1560
 
1561
1561
  it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion, error message should not be thrown on the \'${accordionName}\' accordion`, () => {
1562
1562
  imageHighlightPage.steps.removeHighlightOfARegionInSetCorrectAnswerSection(1);
1563
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist')
1563
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible')
1564
+ utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.')
1564
1565
  if (accordionName == 'Correct') {
1565
1566
  autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1566
1567
  .within(() => {
1567
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
1568
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1568
1569
  });
1569
1570
  } else {
1570
1571
  autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1571
1572
  .within(() => {
1572
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
1573
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1573
1574
  });
1574
1575
  };
1575
1576
  });
@@ -54,7 +54,7 @@ const selectors = {
54
54
  noConnectorButton: () => cy.get('button[aria-label*="Matching layout No connectors"]'),
55
55
  connectorLabel: () => cy.get('button[aria-label*="Matching layout Connectors"] .ngie-toggle-button-label'),
56
56
  noConnectorLabel: () => cy.get('button[aria-label*="Matching layout No connectors"] .ngie-toggle-button-label'),
57
- optionInnnerFieldInputFieldDropdown: () => cy.get(' .edit-mcq-options-wrapper [data-rbd-draggable-id*="option-draggable"] .MuiOutlinedInput-inputAdornedStart'),
57
+ optionInnerFieldInputFieldDropdown: () => cy.get(' .edit-mcq-options-wrapper [data-rbd-draggable-id*="option-draggable"] .MuiOutlinedInput-inputAdornedStart'),
58
58
  //Specify correct answer section
59
59
  connectorIcon: () => cy.get('.correct-answer-accordion [class*="ClozeWithDragAndDropstyles__ShowIconWrapper"]'),
60
60
  dropzoneSpecifyCorrectAnswerSection: () => cy.get('.correct-answer-wrapper .authoring-droppable-hotspot-wrapper'),
@@ -2345,7 +2345,8 @@ const tests = {
2345
2345
  .eq(inputFieldIndex)
2346
2346
  .click()
2347
2347
  .blur();
2348
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
2348
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
2349
+ utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Option is required.');
2349
2350
  });
2350
2351
 
2351
2352
  it('User should be able to enter text in options input field', () => {
@@ -1023,16 +1023,17 @@ const tests = {
1023
1023
 
1024
1024
  it(`When the user resets the number line in the ${accordionName} accordion, error message should not be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
1025
1025
  numberLineLabelPage.steps.clickAndDropLabelInContainerSpecifyCorrectAnswer('Label 2');
1026
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
1026
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
1027
+ utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
1027
1028
  if (accordionName == 'Correct') {
1028
1029
  autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1029
1030
  .within(() => {
1030
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
1031
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1031
1032
  });
1032
1033
  } else {
1033
1034
  autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1034
1035
  .within(() => {
1035
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
1036
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1036
1037
  });
1037
1038
  };
1038
1039
  });
@@ -1249,16 +1249,17 @@ const tests = {
1249
1249
 
1250
1250
  it(`When the user deselects all the selected options in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
1251
1251
  textSelectionPage.steps.deselectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
1252
- utilities.verifyElementVisibilityState(textSelectionPage.specifyCorrectAnswerErrorMessage(), 'notExist');
1252
+ utilities.verifyElementVisibilityState(textSelectionPage.specifyCorrectAnswerErrorMessage(), 'exist');
1253
+ utilities.verifyInnerText(textSelectionPage.specifyCorrectAnswerErrorMessage(), 'Error: Please set a correct answer.');
1253
1254
  if (accordionName == 'Correct') {
1254
1255
  autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1255
1256
  .within(() => {
1256
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
1257
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1257
1258
  });
1258
1259
  } else {
1259
1260
  autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1260
1261
  .within(() => {
1261
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
1262
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1262
1263
  });
1263
1264
  };
1264
1265
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.246-revertedSaveAsYouGo-5fef93d.0",
3
+ "version": "1.0.246",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {