itemengine-cypress-automation 1.0.180-essayResponseLazyLoadingFix-63cd8a3.0 → 1.0.180-essayResponseLazyLoadingFix-3170a00.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,6 +13,7 @@ export const lrnPage = {
13
13
  correctAnswersResponseText: () => cy.get('.lrn_correctAnswerList li'),
14
14
  backgroundCanvasImage: () => cy.get('.lrn_imagecloze_image'),
15
15
  essayResponseTextArea: () => cy.get('.lrn_texteditor_editable'),
16
+ essayResponseResponseWrapper: () => cy.get('.lrn_response_wrapper'),
16
17
  essayResponseToolbarButton: () => cy.get('[aria-label="Text controls"] button.lrn_btn'),
17
18
  essayResponseFooter: () => cy.get('.lrn-toolbar-footer'),
18
19
  essayResponseToolbarWordCountWrapper: () => cy.get('.lrn_toolbar_right'),
@@ -283,7 +284,7 @@ export const extractLrnQuestionData = {
283
284
  obj.textAreaPlaceholder = textAreaPlaceholder;
284
285
  });
285
286
  let toolbarButtons = [];
286
- lrnPage.essayResponseTextArea()
287
+ lrnPage.essayResponseResponseWrapper()
287
288
  .then(($element) => {
288
289
  if ($element[0].innerHTML.includes('type="button"')) {
289
290
  lrnPage.essayResponseToolbarButton()
@@ -258,7 +258,7 @@ export const verifyIeQuestionData = {
258
258
  let textAreaPlaceholder = $element[0].attributes["data-cke-editorplaceholder"]?.nodeValue;
259
259
  expect(textAreaPlaceholder).to.be.eq(expectedQuestionData.textAreaPlaceholder);
260
260
  });
261
- if (expectedQuestionData.toolbarButtons.length != 0) {
261
+ if (expectedQuestionData.toolbarButtons.length !== 0) {
262
262
  let ieButtonsTitle = [];
263
263
  let ieButtonsExpected = expectedQuestionData.toolbarButtons.map((button) => {
264
264
  return essayResponseToolbarOptionsENUM[button];
@@ -270,6 +270,9 @@ export const verifyIeQuestionData = {
270
270
  }).then(() => {
271
271
  expect(ieButtonsTitle).to.have.deep.members(ieButtonsExpected);
272
272
  });
273
+ } else {
274
+ essayResponsePage.previewTabToolbarOption()
275
+ .should('not.exist');
273
276
  }
274
277
  if (expectedQuestionData.hasWordLimit || expectedQuestionData.hasWordCount) {
275
278
  if (expectedQuestionData.hasWordLimit) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.180-essayResponseLazyLoadingFix-63cd8a3.0",
3
+ "version": "1.0.180-essayResponseLazyLoadingFix-3170a00.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {