itemengine-cypress-automation 1.0.211 → 1.0.212
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/allOrNothingScoringForAllViews.smoke.js +5 -5
- package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +6 -6
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +146 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomization.js +700 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomizationDraggableOptionsPanel.js +127 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCutomizationDraggableOptionProperties.js +253 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +3 -6
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +261 -0
- package/cypress/e2e/ILC/MatchingDropdown/previewContentsForAllViews.smoke.js +124 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +3 -2
- package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +2 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/SingleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +7 -7
- package/cypress/pages/chartsDotPlotPage.js +22 -0
- package/cypress/pages/chartsLinePage.js +1 -0
- package/cypress/pages/essayResponsePage.js +73 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +550 -3
- package/cypress/pages/graphingPage.js +4 -0
- package/cypress/pages/matchingPage.js +189 -1
- package/package.json +1 -1
@@ -41,6 +41,14 @@ const selectors = {
|
|
41
41
|
dropzoneColumnHeaderSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region [class*="ClozeWithDragAndDropstyles__HeaderContainer"]').eq(1),
|
42
42
|
dropzoneColumnHeaderPreviewTab: () => cy.get('.preview-container [class*="ClozeWithDragAndDropstyles__HeaderContainer"]').eq(1),
|
43
43
|
dropzoneColumnAndPromptHeaderWrapperSpecifyCorrectAnswerSection: () => cy.get('.correct-answer-accordion [class*="ClozeWithDragAndDropstyles__ResponseHeaderWrapper"]'),
|
44
|
+
optionsLayoutToggleButton: (ariaLabel = null) => {
|
45
|
+
if (ariaLabel) {
|
46
|
+
return cy.get(`.MuiToggleButtonGroup-root button[aria-label*="${ariaLabel}"]`)
|
47
|
+
} else {
|
48
|
+
return cy.get('.MuiToggleButtonGroup-root button')
|
49
|
+
}
|
50
|
+
},
|
51
|
+
optionInputFieldDropdown: () => cy.get('.edit-mcq-options-wrapper [data-rbd-draggable-id*="option-draggable"] [type="text"]'),
|
44
52
|
//Specify correct answer section
|
45
53
|
dropzoneSpecifyCorrectAnswerSection: () => cy.get('.correct-answer-wrapper .authoring-droppable-hotspot-wrapper'),
|
46
54
|
dropzoneWrapperSpecifyCorrectAnswerSection: () => cy.get('.match-list-form-control-wrapper-preview .authoring-droppable-hotspot-wrapper'),
|
@@ -52,7 +60,17 @@ const selectors = {
|
|
52
60
|
draggableOptionInDropzoneInSpecifyCorrectAnswer: () => cy.get('.item-content-wrapper'),
|
53
61
|
droppedDraggableOptionInDropzoneSpecifyCorrectAnswerSection: () => cy.get('[class*="MultipleDroppedItemstyles__ItemWrapper"]'),
|
54
62
|
optionsContainerSpecifyCorrectAnswerSection: () => cy.get('.draggable-wrapper'),
|
55
|
-
|
63
|
+
dropdownSpecifyCorrectAnswerSection: () => cy.get('.correct-answer-wrapper [aria-haspopup="listbox"]'),
|
64
|
+
dropdownPreviewTab: () => cy.get('[class*="ResponseDropdownComponentstyles__ResponseDropdownWrapper"] [aria-haspopup="listbox"]'),
|
65
|
+
dropdownList: () => cy.get('.dropdown-list-ul'),
|
66
|
+
dropdownWrapperPreviewTab: () => cy.get('[class*="ResponseDropdownComponentstyles__ResponseDropdownWrapper"]'),
|
67
|
+
dropdownListOptions: (ariaLabel = null) => {
|
68
|
+
if (ariaLabel) {
|
69
|
+
return cy.get(`.dropdown-list-ul .dropdown-menu-item[aria-label*="${ariaLabel}"]`)
|
70
|
+
} else {
|
71
|
+
return cy.get('.dropdown-list-ul .dropdown-menu-item')
|
72
|
+
}
|
73
|
+
},
|
56
74
|
//Penalty points
|
57
75
|
penaltyPointsForEachIncorrectDropzoneInputField: () => cy.get('input[aria-label="Penalty points for each incorrect dropzone"]'),
|
58
76
|
specifyPointsForEachIncorrectDropzoneRadioButton: () => cy.get('input[aria-label*="Specify points for each incorrect"]'),
|
@@ -70,6 +88,7 @@ const selectors = {
|
|
70
88
|
dropzoneNumerationPreviewTab: () => cy.get('[class*="MultipleDroppableHotspotstyle__NumerationDiv"]'),
|
71
89
|
dropzoneOptionPreviewTab: () => cy.get('[class*="MultipleDroppedItemstyles__FlexWrapper"]'),
|
72
90
|
dropzoneNumeration: () => cy.get('[class*="NumerationDiv"]'),
|
91
|
+
dropdownNumeration: () => cy.get('[class*="ResponseDropdownComponentstyles__NumerationDiv"]'),
|
73
92
|
correctAnswersNumeration: () => cy.get('.answer-numeration-number-box'),
|
74
93
|
correctAnswerResponseWrapper: () => cy.get('[class*="ClozeWithDragAndDropstyles__AnswerCell"]'),
|
75
94
|
correctAnswersOptions: () => cy.get('.match-list-drag-and-drop .question-text-wrapper'),
|
@@ -1355,6 +1374,175 @@ const steps = {
|
|
1355
1374
|
matchingPage.optionsContainerPreviewTab()
|
1356
1375
|
.click()
|
1357
1376
|
},
|
1377
|
+
|
1378
|
+
/**
|
1379
|
+
* @param {string} ariaLabel - Aria label of toggle button to select.
|
1380
|
+
* @description selects a option layout toggle button
|
1381
|
+
*/
|
1382
|
+
selectOptionLayoutToggleButton: (ariaLabel) => {
|
1383
|
+
matchingPage.optionsLayoutToggleButton(ariaLabel)
|
1384
|
+
.click()
|
1385
|
+
},
|
1386
|
+
|
1387
|
+
/**
|
1388
|
+
* @param {number} dropdownIndex Index of dropdown in specify correct answer
|
1389
|
+
* @description Expand dropdown in preview tab
|
1390
|
+
*/
|
1391
|
+
expandDropdownInSpecifyCorrectAnswerSection: (dropdownIndex) => {
|
1392
|
+
utilities.getNthElement(matchingPage.dropdownSpecifyCorrectAnswerSection(), dropdownIndex)
|
1393
|
+
.click({ force: true });
|
1394
|
+
},
|
1395
|
+
|
1396
|
+
/**
|
1397
|
+
* @param {number} dropdownIndex Index of dropdown in preview tab
|
1398
|
+
* @description Expand dropdown in preview tab
|
1399
|
+
*/
|
1400
|
+
expandDropdownInPreviewTab: (dropdownIndex) => {
|
1401
|
+
utilities.getNthElement(matchingPage.dropdownPreviewTab(), dropdownIndex)
|
1402
|
+
.click({ force: true });
|
1403
|
+
utilities.getNthElement(matchingPage.dropdownPreviewTab(), dropdownIndex)
|
1404
|
+
.should('have.attr', 'aria-expanded', 'true');
|
1405
|
+
},
|
1406
|
+
|
1407
|
+
/**
|
1408
|
+
* @param {string} dropdownOption Option to be selected from dropdown
|
1409
|
+
* @description Select option from dropdown
|
1410
|
+
*/
|
1411
|
+
selectOptionFromDropdownList: (dropdownOption) => {
|
1412
|
+
matchingPage.dropdownListOptions(dropdownOption)
|
1413
|
+
.click({ force: true });
|
1414
|
+
},
|
1415
|
+
|
1416
|
+
/**
|
1417
|
+
* @param {Object[]} CorrectAnswerArray - An array of objects containing the dropdownIndex and dropdownOption to be selected.
|
1418
|
+
* @param {number} CorrectAnswerArray[].dropdownIndex - The index of dropdown in specify correct answer
|
1419
|
+
* @param {string} CorrectAnswerArray[].dropdownOption - The dropdown option to be selected from dropdown list
|
1420
|
+
* @description Select option from dropdown in preview tab
|
1421
|
+
*/
|
1422
|
+
selectResponseFromDropdownInSpecifyCorrectAnswerSection: (correctAnswerArray) => {
|
1423
|
+
correctAnswerArray.forEach(({ dropdownIndex, dropdownOption }) => {
|
1424
|
+
matchingPage.steps.expandDropdownInSpecifyCorrectAnswerSection(dropdownIndex);
|
1425
|
+
matchingPage.steps.selectOptionFromDropdownList(dropdownOption);
|
1426
|
+
matchingPage.steps.verifyTextDisplayedInSpecifyCorrectAnswerSection(dropdownIndex, dropdownOption);
|
1427
|
+
});
|
1428
|
+
},
|
1429
|
+
|
1430
|
+
/**
|
1431
|
+
* @param {Object[]} CorrectAnswerArray - An array of objects containing the dropdownIndex and dropdownOption to be selected.
|
1432
|
+
* @param {number} CorrectAnswerArray[].dropdownIndex - The index of dropdown in preview tab
|
1433
|
+
* @param {string} CorrectAnswerArray[].dropdownOption - The dropdown option to be selected from dropdown list
|
1434
|
+
* @description Select option from dropdown in preview tab
|
1435
|
+
*/
|
1436
|
+
selectResponseFromDropdownInPreviewTab: (correctAnswerArray) => {
|
1437
|
+
correctAnswerArray.forEach(({ dropdownIndex, dropdownOption }) => {
|
1438
|
+
matchingPage.steps.expandDropdownInPreviewTab(dropdownIndex);
|
1439
|
+
matchingPage.steps.selectOptionFromDropdownList(dropdownOption);
|
1440
|
+
matchingPage.steps.verifyTextDisplayedInDropdownPreviewTab(dropdownIndex, dropdownOption);
|
1441
|
+
});
|
1442
|
+
},
|
1443
|
+
|
1444
|
+
/**
|
1445
|
+
* @description Verifies if the specified text is displayed in the dropdown specify correct answer section.
|
1446
|
+
* @param {number} dropdownIndex - The index of the dropdown.
|
1447
|
+
* @param {string} dropdownText - The text expected to be displayed in the dropdown specify correct answer section.
|
1448
|
+
*/
|
1449
|
+
verifyTextDisplayedInSpecifyCorrectAnswerSection: (dropdownIndex, dropdownText) => {
|
1450
|
+
utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropdownSpecifyCorrectAnswerSection(), dropdownIndex), dropdownText);
|
1451
|
+
},
|
1452
|
+
|
1453
|
+
/**
|
1454
|
+
* @description Verifies if the specified text is displayed in the dropdown preview tab.
|
1455
|
+
* @param {number} dropdownIndex - The index of the dropdown.
|
1456
|
+
* @param {string} dropdownText - The text expected to be displayed in the dropdown preview tab.
|
1457
|
+
*/
|
1458
|
+
verifyTextDisplayedInDropdownPreviewTab: (dropdownIndex, dropdownText) => {
|
1459
|
+
utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropdownPreviewTab(), dropdownIndex), dropdownText);
|
1460
|
+
},
|
1461
|
+
|
1462
|
+
/**
|
1463
|
+
* @description Verifies the text content of a dropdown in the Preview Tab.
|
1464
|
+
* @param {number} dropdownIndex - Index of the dropdown to verify.
|
1465
|
+
*/
|
1466
|
+
verifyDropdownIsEmptyPreviewTab: (dropdownIndex) => {
|
1467
|
+
matchingPage.dropdownPreviewTab()
|
1468
|
+
.eq(dropdownIndex)
|
1469
|
+
.should('have.text', '');
|
1470
|
+
},
|
1471
|
+
|
1472
|
+
/**
|
1473
|
+
* @description Verifies the numeration for dropdown in preview tab.
|
1474
|
+
* @param {number} index - The index of the dropdown to verify.
|
1475
|
+
*/
|
1476
|
+
verifyDropdownNumeration: (index) => {
|
1477
|
+
utilities.verifyTextContent(utilities.getNthElement(matchingPage.dropdownNumeration(), index), `${index + 1}`);
|
1478
|
+
},
|
1479
|
+
|
1480
|
+
/**
|
1481
|
+
* @description Verifies the incorrect option icon for a specified dropdown in the Preview Tab.
|
1482
|
+
* @param {number} dropdownIndex - The index of the dropdown to verify.
|
1483
|
+
*/
|
1484
|
+
verifyIncorrectOptionIconDropdown: (dropdownIndex) => {
|
1485
|
+
matchingPage.dropdownWrapperPreviewTab()
|
1486
|
+
.eq(dropdownIndex)
|
1487
|
+
.within(() => {
|
1488
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'exist');
|
1489
|
+
});
|
1490
|
+
matchingPage.dropdownWrapperPreviewTab()
|
1491
|
+
.eq(dropdownIndex)
|
1492
|
+
.find('.drop-down-parent')
|
1493
|
+
.should('have.css', 'border', `1px solid ${css.color.incorrectAnswer}`);
|
1494
|
+
},
|
1495
|
+
|
1496
|
+
/**
|
1497
|
+
* @description Verifies the correct option icon for a specified dropdown in the Preview Tab.
|
1498
|
+
* @param {number} dropdownIndex - The index of the dropdown to verify.
|
1499
|
+
*/
|
1500
|
+
verifyCorrectOptionIconDropdown: (dropdownIndex) => {
|
1501
|
+
matchingPage.dropdownWrapperPreviewTab()
|
1502
|
+
.eq(dropdownIndex)
|
1503
|
+
.within(() => {
|
1504
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'exist');
|
1505
|
+
});
|
1506
|
+
matchingPage.dropdownWrapperPreviewTab()
|
1507
|
+
.eq(dropdownIndex)
|
1508
|
+
.find('.drop-down-parent')
|
1509
|
+
.should('have.css', 'border', `1px solid ${css.color.correctAnswer}`);
|
1510
|
+
},
|
1511
|
+
|
1512
|
+
/**
|
1513
|
+
* @description Verifies the absence of a correct/incorrect option icon for a specified option in the Preview Tab.
|
1514
|
+
* @param {number} optionIndex - The index of the option to verify.
|
1515
|
+
*/
|
1516
|
+
verifyCorrectIncorrectIconNotExistDropdown: (optionIndex) => {
|
1517
|
+
matchingPage.dropdownWrapperPreviewTab()
|
1518
|
+
.eq(optionIndex)
|
1519
|
+
.within(() => {
|
1520
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'notExist');
|
1521
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'notExist');
|
1522
|
+
});
|
1523
|
+
},
|
1524
|
+
|
1525
|
+
/**
|
1526
|
+
* Verify that a specific dropdown is disabled in the preview tab.
|
1527
|
+
* @param {number} dropdownIndex - The index of the disabled dropdown.
|
1528
|
+
*/
|
1529
|
+
verifyDropdownIsDisabled: (dropdownIndex) => {
|
1530
|
+
utilities.verifyElementDisabledClass(utilities.getNthElement(matchingPage.dropdownPreviewTab(), dropdownIndex));
|
1531
|
+
},
|
1532
|
+
|
1533
|
+
/**
|
1534
|
+
* Enters text into multiple options input fields.
|
1535
|
+
* @param {string[]} promptTextArray - Array of text to enter into the option input fields.
|
1536
|
+
*/
|
1537
|
+
enterTextInOptionInputFieldDropdown: (optionsArray) => {
|
1538
|
+
optionsArray.forEach((options, index) => {
|
1539
|
+
matchingPage.optionInputFieldDropdown()
|
1540
|
+
.eq(index)
|
1541
|
+
.clear()
|
1542
|
+
.type(options, { delay: 50 })
|
1543
|
+
.blur();
|
1544
|
+
});
|
1545
|
+
},
|
1358
1546
|
}
|
1359
1547
|
|
1360
1548
|
const tests = {
|