itemengine-cypress-automation 1.0.162 → 1.0.163-migrationScripts-a06df9c.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +2 -2
- package/cypress/e2e/migration/migration.js +1 -1
- package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +29 -0
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +26 -2
- package/package.json +2 -2
@@ -943,10 +943,10 @@ describe('Preview tab contents - primary toolbar options, secondary toolbar opti
|
|
943
943
|
drawingResponsePage.steps.verifyCSSOfSecondaryOptionPopupOptions(0, 'rgb(0, 224, 255)');
|
944
944
|
drawingResponsePage.steps.verifyCSSOfSecondaryOptionPopupOptions(1, 'rgb(6, 255, 172)');
|
945
945
|
drawingResponsePage.steps.verifyCSSOfSecondaryOptionPopupOptions(2, 'rgb(255, 90, 51)');
|
946
|
-
drawingResponsePage.steps.verifyCSSOfSecondaryOptionPopupOptions(3, 'rgb(
|
946
|
+
drawingResponsePage.steps.verifyCSSOfSecondaryOptionPopupOptions(3, 'rgb(119, 60, 60)');
|
947
947
|
drawingResponsePage.steps.verifyCSSOfSecondaryOptionPopupOptions(4, 'rgb(255, 255, 255)');
|
948
948
|
drawingResponsePage.steps.verifyNoColorOptionFromSecondaryOptionPopup(4);
|
949
|
-
drawingResponsePage.steps.verifySelectedColorBlock('rgb(
|
949
|
+
drawingResponsePage.steps.verifySelectedColorBlock('rgb(119, 60, 60)');
|
950
950
|
});
|
951
951
|
|
952
952
|
it('CSS of color popup contents', { tags: 'css' }, () => {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { migrationScript } from "../../support/migrationHelpers/migrationScript"
|
2
2
|
|
3
|
-
let referenceIds =
|
3
|
+
let referenceIds = ["#63 4.NBT.A.2 Number Operations in Base Ten Number Operations in Base Ten Math 04","#71 6.RP.A.3b Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#83 6.RP.A.3c Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#84 6.RP.A.3b Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#87 6.RP.A.3b Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#125 6.SP.B.5c Statistics Probability Statistics Probability Math 06","#183 8.F.B.4 Functions Functions Math 08","#186 8.EE.C.7b Expressions Equations Expressions Equations Math 08","#187 8.EE.B.6 Expressions Equations Expressions Equations Math 08","#191 7.EE.B.4b Expressions Equations Expressions Equations Math 07","#193 7.SP.C.8b Statistics Probability Statistics Probability Math 07","#194 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#195 8.G.A.3 Geometry Geometry Math 08","#196 6.G.A.4 7.G.B.6 Geometry Geometry Math 06 07","#198 6.EE.A.2 Expressions Equations Expressions Equations Math 06","#1 8.EE.C.7b Expressions Equations Expressions Equations Math 08","#262 6.EE.B.6 8.EE.C.8 Expressions Equations Expressions Equations Math 06 08","#263 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#264 8.G.A.3 Geometry Geometry Math 08","#265 8.F.B.4 HSF-IF.B.6 Interpreting Functions Functions Functions Interpreting Functions Math 08 09 10 11 12","#266 8.SP.A.1 HSF-IF.A.3 Interpreting Functions Statistics Probability Interpreting Functions Statistics Probability Math 08 09 10 11 12","#268 8.G.A.3 Geometry Geometry Math 08","#271 7.G.B.4 7.G.B.6 Geometry Geometry Math 07","#272 7.NS.A.3 The Number System The Number System Math 07","#273 6.SP.B.5 6.SP.B.5c Statistics Probability Statistics Probability Math 06","#275 6.RP.A.3 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06 07","#277 4.OA.B.4 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#278 4.OA.C.5 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#279 4.NBT.A.2 Number Operations in Base Ten Number Operations in Base Ten Math 04","#280 5.MD.C.3b Measurement Data Measurement Data Math 05","#281 6.SP.A.2 Statistics Probability Statistics Probability Math 06","#283 4.MD.A.3 Measurement Data Measurement Data Math 04","#284 6.SP.A.2 Statistics Probability Statistics Probability Math 06","#285 5.NBT.B.7 Number Operations in Base Ten Number Operations in Base Ten Math 05","#287 4.NBT.A.2 Number Operations in Base Ten Number Operations in Base Ten Math 04","#289 6.EE.A.2 6.EE.A.2c Expressions Equations Expressions Equations Math 06","#290 6.SP.A.2 Statistics Probability Statistics Probability Math 06","#291 2.NBT.A.1 Number Operations in Base Ten Number Operations in Base Ten Math 02","#292 2.MD.A.1 Measurement Data Measurement Data Math 02","#293 2.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 02","#294 4.NBT.B.5 Number Operations in Base Ten Number Operations in Base Ten Math 04","#295 6.SP.B.5c Statistics Probability Statistics Probability Math 06","#296 3.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 03","#297 4.MD.A.3 Measurement Data Measurement Data Math 04","#298 2.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 02","#299 3.G.A.2 Geometry Geometry Math 03","#300 2.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 02","#301 3.MD.A.1 Measurement Data Measurement Data Math 03","#303 2.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 02","#304 4.OA.C.5 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#305 2.NBT.B.5 Number Operations in Base Ten Number Operations in Base Ten Math 02","#306 2.MD.C.8 Measurement Data Measurement Data Math 02","#326 6.NS.B.2 The Number System The Number System Math 06","#328 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#329 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#330 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#331 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#334 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#335 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#336 6.NS.B.2 The Number System The Number System Math 06","#337 4.MD.A.2 Measurement Data Measurement Data Math 04","#338 6.RP.A.3c Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#339 6.RP.A.3c Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#340 6.RP.A.1 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#341 6.RP.A.3 6.RP.A.3b Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#342 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#343 6.RP.A.3c Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#344 6.EE.C.9 Expressions Equations Expressions Equations Math 06","#346 6.NS.A.1 The Number System The Number System Math 06","#347 6.RP.A.3d Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#348 6.NS.A.1 The Number System The Number System Math 06","#349 6.NS.A.1 The Number System The Number System Math 06","#350 6.NS.A.1 The Number System The Number System Math 06","#351 6.NS.A.1 The Number System The Number System Math 06","#352 6.NS.B.3 The Number System The Number System Math 06","#353 6.NS.B.3 The Number System The Number System Math 06","#354 6.NS.B.2 The Number System The Number System Math 06","#355 6.NS.B.3 The Number System The Number System Math 06","#358 6.NS.B.4 The Number System The Number System Math 06","#359 6.NS.C.5 The Number System The Number System Math 06","#360 6.NS.C.5 The Number System The Number System Math 06","#361 6.NS.C.7 The Number System The Number System Math 06","#363 6.EE.A.1 Expressions Equations Expressions Equations Math 06","#364 6.EE.B.6 Expressions Equations Expressions Equations Math 06","#365 6.EE.B.6 Expressions Equations Expressions Equations Math 06","#370 6.EE.B.6 6.EE.B.7 Expressions Equations Expressions Equations Math 06","#373 7.RP.A.1 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#375 7.RP.A.1 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#376 7.RP.A.1 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#377 7.RP.A.2 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#378 7.RP.A.2 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#379 7.RP.A.2 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#380 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#381 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#382 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#383 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#384 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#385 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#386 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#387 7.G.B.6 7.RP.A.3 Geometry Ratios Proportional Relationships Geometry Ratios Proportional Relationships Math 07"]//JSON.parse(Cypress.env('referenceIds')).slice(0, 50);
|
4
4
|
|
5
5
|
migrationScript(referenceIds);
|
@@ -469,7 +469,7 @@ const steps = {
|
|
469
469
|
},
|
470
470
|
|
471
471
|
verifyCorrectAnswerSectionNotExists: () => {
|
472
|
-
utilities.verifyElementVisibilityState(gridQuestionCommonComponent.
|
472
|
+
utilities.verifyElementVisibilityState(gridQuestionCommonComponent.correctAnswersLabel(), 'notExist');
|
473
473
|
},
|
474
474
|
|
475
475
|
/**
|
@@ -26,6 +26,7 @@ export const lrnPage = {
|
|
26
26
|
draggableResponseImage: () => cy.get('[aria-label="Possible responses"] .lrn_btn_drag img'),
|
27
27
|
draggableResponseMathMl: () => cy.get('[aria-label="Possible responses"] .lrn_btn_drag math'),
|
28
28
|
questionContainerPreviewTab: () => cy.get('.lrn_response_input'),
|
29
|
+
specialCharactersButton: () => cy.get('.lrn_charactermapbutton'),
|
29
30
|
steps: {
|
30
31
|
checkShowAnswersToggle: () => {
|
31
32
|
lrnPage.showAnswersToggle()
|
@@ -490,6 +491,27 @@ export const extractLrnQuestionData = {
|
|
490
491
|
.then(($responseFields) => {
|
491
492
|
obj.previewResponseCount = $responseFields.length;
|
492
493
|
});
|
494
|
+
lrnPage.clozeResponse()
|
495
|
+
.eq(0)
|
496
|
+
.parent()
|
497
|
+
.then(($responseField) => {
|
498
|
+
obj.isMultiline = $responseField[0].type === 'textarea' ? true : false;
|
499
|
+
if($responseField[0].innerHTML.includes('lrn_charactermapbutton')) {
|
500
|
+
obj.specialCharactersEnabled = true;
|
501
|
+
}
|
502
|
+
});
|
503
|
+
let responses = [];
|
504
|
+
lrnPage.clozeResponse()
|
505
|
+
.each(($responseField) => {
|
506
|
+
let responseObj = {}
|
507
|
+
responseObj.placeholder = $responseField[0].placeholder;
|
508
|
+
responseObj.maxLength = $responseField[0].maxLength;
|
509
|
+
responseObj.type = $responseField[0].type;
|
510
|
+
responseObj.spellcheck = $responseField[0].spellcheck;
|
511
|
+
responseObj.ariaLabel = $responseField[0].ariaLabel;
|
512
|
+
responses.push(responseObj);
|
513
|
+
});
|
514
|
+
obj.responses = responses;
|
493
515
|
});
|
494
516
|
lrnQuestionDataArr.push(obj);
|
495
517
|
},
|
@@ -517,6 +539,13 @@ export const extractLrnQuestionData = {
|
|
517
539
|
.then(($responseFields) => {
|
518
540
|
obj.previewResponseCount = $responseFields.length;
|
519
541
|
});
|
542
|
+
const correctAnswersText = [];
|
543
|
+
lrnPage.correctAnswersResponseText()
|
544
|
+
.each(($element) => {
|
545
|
+
let innerText = $element[0].innerText;
|
546
|
+
correctAnswersText.push(innerText);
|
547
|
+
});
|
548
|
+
obj.correctAnswersText = correctAnswersText;
|
520
549
|
});
|
521
550
|
lrnQuestionDataArr.push(obj);
|
522
551
|
},
|
@@ -21,6 +21,8 @@ export const iePage = {
|
|
21
21
|
essayResponseFooter: () => cy.get('.essay-character-view-wrapper'),
|
22
22
|
drawingResponseToolbarButton: () => cy.get('[class*="DrawingToolButtonstyled__Container"] svg'),
|
23
23
|
drawingResponseLowerCanvas: () => cy.get('.lower-canvas'),
|
24
|
+
figCorrectAnswerBlock: () => cy.get('[class*="AnswerCell"]'),
|
25
|
+
figTextResponseField: () => cy.get('[class*="response"][class*="-input"] .MuiInputBase-input'),
|
24
26
|
|
25
27
|
steps: {
|
26
28
|
verifyQuestionInstructions: (expectedQuestionData) => {
|
@@ -459,10 +461,28 @@ export const verifyIeQuestionData = {
|
|
459
461
|
innerText = innerText.replace(/\u200b/g, '');
|
460
462
|
expect(expectedQuestionData.previewQuestion).to.be.eq(innerText);
|
461
463
|
});
|
462
|
-
|
464
|
+
iePage.figTextResponseField()
|
463
465
|
.then(($resposneWrapper) => {
|
464
466
|
expect($resposneWrapper.length).to.be.eq(expectedQuestionData.previewResponseCount);
|
465
467
|
});
|
468
|
+
iePage.figTextResponseField()
|
469
|
+
.each(($responseField, index) => {
|
470
|
+
expect($responseField[0].placeholder).to.be.eq(expectedQuestionData.responses[index].placeholder);
|
471
|
+
expect($responseField[0].maxLength).to.be.eq(expectedQuestionData.responses[index].maxLength);
|
472
|
+
expect($responseField[0].type).to.be.eq(expectedQuestionData.responses[index].type);
|
473
|
+
expect($responseField[0].spellcheck).to.be.eq(expectedQuestionData.responses[index].spellcheck);
|
474
|
+
//expect($responseField[0].ariaLabel).to.be.eq(expectedQuestionData.responses[index].ariaLabel);
|
475
|
+
});
|
476
|
+
iePage.figTextResponseField()
|
477
|
+
.eq(0)
|
478
|
+
.click()
|
479
|
+
.then(() => {
|
480
|
+
if(expectedQuestionData.specialCharactersEnabled) {
|
481
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.specialCharactersButtonPreviewTab(), 'visible');
|
482
|
+
} else {
|
483
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.specialCharactersButtonPreviewTab(), 'notExist');
|
484
|
+
}
|
485
|
+
});
|
466
486
|
});
|
467
487
|
},
|
468
488
|
|
@@ -480,10 +500,14 @@ export const verifyIeQuestionData = {
|
|
480
500
|
innerText = innerText.replace(/\u200b/g, '');
|
481
501
|
expect(expectedQuestionData.previewQuestion).to.be.eq(innerText);
|
482
502
|
});
|
483
|
-
|
503
|
+
iePage.figTextResponseField()
|
484
504
|
.then(($resposneWrapper) => {
|
485
505
|
expect($resposneWrapper.length).to.be.eq(expectedQuestionData.previewResponseCount);
|
486
506
|
});
|
507
|
+
iePage.figCorrectAnswerBlock()
|
508
|
+
.each(($element, index) => {
|
509
|
+
utilities.verifyInnerText(cy.wrap($element), expectedQuestionData.correctAnswersText[index]);
|
510
|
+
});
|
487
511
|
});
|
488
512
|
},
|
489
513
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.163-migrationScripts-a06df9c.0",
|
4
4
|
"description": "",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -35,4 +35,4 @@
|
|
35
35
|
"node-fetch": "^3.3.2",
|
36
36
|
"react-uuid": "^2.0.0"
|
37
37
|
}
|
38
|
-
}
|
38
|
+
}
|