itemengine-cypress-automation 1.0.593-IEI-7195-e139b3f.0 → 1.0.593-IEI-7195-f6ffcc1.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.
@@ -4,7 +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
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
8
8
  const views = utilities.getViews(gradingAndCorrectAnsView);
9
9
  let itemReferenceID = "";
10
10
  const barBackgroundColor = ['rgb(46, 169, 89)', 'rgb(6, 117, 244)', 'rgb(219, 124, 0)', 'rgb(156, 105, 39)', 'rgb(219, 60, 0)'];
@@ -1,6 +1,8 @@
1
1
  import { chartsBarPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
 
4
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
5
+
4
6
  describe('Create Item page - Charts Bar', () => {
5
7
  before(() => {
6
8
  cy.loginAs('admin');
@@ -27,7 +29,11 @@ describe('Create Item page - Charts Bar', () => {
27
29
  chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 });
28
30
  chartsBarPage.steps.switchToGradingView();
29
31
  chartsBarPage.steps.verifyAnswerStatusBannerExist();
30
- chartsBarPage.steps.verifyCorrectAnswerSectionExist();
32
+ if (!alternativeAnswerCheck) {
33
+ chartsBarPage.steps.verifyCorrectAnswerSectionExist();
34
+ } else {
35
+ chartsBarPage.steps.verifyAlternateAnswerSectionExist();
36
+ }
31
37
  });
32
38
  });
33
39
  });
@@ -4,7 +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
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
8
8
 
9
9
  describe('Select chart type - Chart', () => {
10
10
  before(() => {
@@ -1369,7 +1369,12 @@ const steps = {
1369
1369
  },
1370
1370
 
1371
1371
  verifyCorrectAnswerSectionExist: () => {
1372
- chartsBarPage.correctAnswerlabelWrapper()
1372
+ chartsBarPage.correctAnswersLabel()
1373
+ .should('be.visible');
1374
+ },
1375
+
1376
+ verifyAlternateAnswerSectionExist: () => {
1377
+ chartsBarPage.correctAnswerLabelWrapper()
1373
1378
  .should('be.visible');
1374
1379
  },
1375
1380
 
@@ -39,7 +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
+ correctAnswerLabelWrapper: () => cy.get('[class*="CorrectAnswerLabelWrapper"]'),
43
43
  correctIcon: () => cy.get('.icon-correct'),
44
44
  incorrectIcon: () => cy.get('.icon-incorrect'),
45
45
  correctIncorrectAnswerTextWrapper: () => cy.get('[class*="AnswerStatusWrapper"]'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.593-IEI-7195-e139b3f.0",
3
+ "version": "1.0.593-IEI-7195-f6ffcc1.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {