itemengine-cypress-automation 1.0.68 → 1.0.69
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/fixtures/theme/ilc.json +2 -1
- package/cypress/pages/audioPlayerPage.js +2 -2
- package/cypress/pages/components/additionalSettingsPanel.js +46 -14
- package/cypress/pages/components/autoScoredAdditionalSettings.js +6 -6
- package/cypress/pages/components/autoScoredPreviewBase.js +6 -8
- package/cypress/pages/components/autoScoredScoringSection.js +22 -18
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +60 -9
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +7 -7
- package/cypress/pages/components/createQuestionBasePage.js +8 -2
- package/cypress/pages/components/draggableOptionsContainer.js +2 -1
- package/cypress/pages/components/equationEditorFlyout.js +2 -1
- package/cypress/pages/components/essayResponseCommonComponents.js +10 -4
- package/cypress/pages/components/figOverImageCommonComponent.js +2 -1
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +34 -14
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -1
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +7 -7
- package/cypress/pages/components/listSortingAndOrderingBase.js +1 -1
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +10 -0
- package/cypress/pages/components/mcqQuestionCommonComponents.js +1 -1
- package/cypress/pages/components/mcqScoringComponent.js +1 -1
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +20 -18
- package/cypress/pages/components/questionInstructionsComponent.js +1 -1
- package/cypress/pages/components/scoringSectionBase.js +30 -1
- package/cypress/pages/components/setPointsPopupBase.js +2 -1
- package/cypress/pages/components/uploadImageSectionComponent.js +8 -8
- package/cypress/pages/createItemPage.js +83 -1
- package/cypress/pages/dialogBoxBase.js +3 -7
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +5 -4
- package/cypress/pages/essayResponsePage.js +1 -0
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -0
- package/cypress/pages/fillInTheGapsScoring.js +215 -317
- package/cypress/pages/highlightImagePage.js +6 -4
- package/cypress/pages/highlightPage.js +1 -2
- package/cypress/pages/index.js +4 -0
- package/cypress/pages/listMatchingPage.js +5 -4
- package/cypress/pages/listMatchingScoring.js +274 -272
- package/cypress/pages/listOrderingPage.js +23 -14
- package/cypress/pages/listSortingPage.js +7 -9
- package/cypress/pages/multipleSelectionPage.js +2 -1
- package/cypress/pages/shortTextResponsePage.js +9 -0
- package/cypress/pages/singleSelectionPage.js +1 -0
- package/cypress/pages/uploadResponsePage.js +296 -15
- package/cypress/pages/videoResponsePage.js +5 -6
- package/package.json +1 -1
@@ -1497,30 +1497,31 @@ const tests = {
|
|
1497
1497
|
},
|
1498
1498
|
|
1499
1499
|
verifyAutoScoredPartialEqualWeightsRoundDownScore: () => {
|
1500
|
-
it('When the \'Round down score\' checkbox is selected, then in Preview tab when user
|
1501
|
-
listMatchingPage.previewScoreText()
|
1502
|
-
.verifyInnerText('0/8.5');
|
1500
|
+
it('When the \'Round down score\' checkbox is not selected, then in Preview tab when user selects partially or fully correct answers the points should be displayed in decimal points if applicable as per the options selected by the user', () => {
|
1503
1501
|
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 0);
|
1504
1502
|
listMatchingPage.previewScoreText()
|
1505
|
-
.verifyInnerText('4/8.5');
|
1506
|
-
listMatchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
1503
|
+
.verifyInnerText('4.25/8.5');
|
1507
1504
|
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 2', 1);
|
1508
1505
|
listMatchingPage.previewScoreText()
|
1509
|
-
.verifyInnerText('8/8.5');
|
1510
|
-
listMatchingPage.steps.
|
1506
|
+
.verifyInnerText('8.5/8.5');
|
1507
|
+
listMatchingPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
1511
1508
|
});
|
1512
1509
|
|
1513
|
-
it('When the \'Round down score\' checkbox is
|
1510
|
+
it('When the \'Round down score\' checkbox is selected, then in Preview tab when user enters partially or fully correct answers responses the points displayed should be rounded down to the nearest whole number', () => {
|
1514
1511
|
listMatchingPage.steps.switchToEditTab();
|
1515
|
-
listMatchingPage.steps.
|
1512
|
+
listMatchingPage.steps.expandRoundingDropdown();
|
1513
|
+
listMatchingPage.steps.selectOptionFromRoundingDropdownOption('round down if <= 0.99');
|
1516
1514
|
listMatchingPage.steps.switchToPreviewTab();
|
1515
|
+
listMatchingPage.previewScoreText()
|
1516
|
+
.verifyInnerText('0/8.5');
|
1517
1517
|
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 0);
|
1518
1518
|
listMatchingPage.previewScoreText()
|
1519
|
-
.verifyInnerText('4
|
1519
|
+
.verifyInnerText('4/8.5');
|
1520
|
+
listMatchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
1520
1521
|
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 2', 1);
|
1521
1522
|
listMatchingPage.previewScoreText()
|
1522
|
-
.verifyInnerText('8
|
1523
|
-
listMatchingPage.steps.
|
1523
|
+
.verifyInnerText('8/8.5');
|
1524
|
+
listMatchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
1524
1525
|
});
|
1525
1526
|
},
|
1526
1527
|
|
@@ -1647,252 +1648,252 @@ const tests = {
|
|
1647
1648
|
},
|
1648
1649
|
|
1649
1650
|
verifyPartialDifferentWeightWithAlternateAnswerWhenCorrectPointsMoreThanAlternatePoints
|
1650
|
-
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1698
|
-
|
1699
|
-
|
1700
|
-
|
1701
|
-
|
1702
|
-
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1747
|
-
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1755
|
-
|
1756
|
-
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
1760
|
-
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
1774
|
-
|
1775
|
-
|
1776
|
-
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1784
|
-
|
1785
|
-
|
1786
|
-
|
1787
|
-
|
1788
|
-
|
1789
|
-
|
1790
|
-
|
1791
|
-
|
1792
|
-
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1864
|
-
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1868
|
-
|
1869
|
-
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
verifyPartialDifferentWeightWithAlternateAnswerWhenAlternatePointsMoreThanCorrectPoints:(optionLayout) => {
|
1651
|
+
: (optionLayout) => {
|
1652
|
+
it('Alternate answer case: When Correct Answer points are more than Alternate Answer points', () => {
|
1653
|
+
cy.log('Total points displayed besides Show correct answer checkbox should be of Correct Answer points')
|
1654
|
+
listMatchingPage.previewScoreText()
|
1655
|
+
.verifyInnerText('0/24');
|
1656
|
+
|
1657
|
+
cy.log('When the user selects \'Show correct answer\' checkbox without attempting the question, correct answer container should be displayed with the correct responses from the correct tab');
|
1658
|
+
listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
|
1659
|
+
listMatchingPage.steps.verifyCorrectAnswerStemOptionsInCorrectAnswerContainerAndCount(['Common answer for stem 1', 'Correct answer for stem 2', 'Correct answer for stem 3', 'Common answer for stem 4'], ['1', '2', '3', '4']);
|
1660
|
+
listMatchingPage.steps.verifyCorrectIncorrectIconLabelAndBorderNotExist();
|
1661
|
+
|
1662
|
+
cy.log('After deselecting Show correct answer checkbox, the question preview should return to the previous state')
|
1663
|
+
listMatchingPage.steps.uncheckShowCorrectAnswerCheckbox();
|
1664
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1665
|
+
|
1666
|
+
cy.log('When the user enters incorrect answer responses, 0 points should be awarded and on selecting \'Show correct answer\' checkbox red cross-mark icon should be displayed besides the attempted response fields, no icon should be displayed beside the unattempted responses, correct/incorrect answer label and its border should not be displayed and correct answer container should be displayed with correct answer from the correct tab');
|
1667
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Incorrect answer 1', 0);
|
1668
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Incorrect answer 2', 3);
|
1669
|
+
listMatchingPage.previewScoreText()
|
1670
|
+
.verifyInnerText('0/24');
|
1671
|
+
listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
|
1672
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
1673
|
+
listMatchingPage.steps.verifyCorrectIncorrectIconNotVisible(1);
|
1674
|
+
listMatchingPage.steps.verifyCorrectIncorrectIconNotVisible(2);
|
1675
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
|
1676
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1677
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1678
|
+
listMatchingPage.steps.verifyCorrectAnswerStemOptionsInCorrectAnswerContainerAndCount(['Common answer for stem 1', 'Correct answer for stem 2', 'Correct answer for stem 3', 'Common answer for stem 4'], ['1', '2', '3', '4']);
|
1679
|
+
listMatchingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
1680
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1681
|
+
|
1682
|
+
cy.log('When the user clicks on \'Check answer\' button, then red cross-mark icon should be displayed besides the attempted response fields, no icon should be displayed beside the unattempted responses, correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
|
1683
|
+
listMatchingPage.steps.checkAnswer();
|
1684
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
1685
|
+
listMatchingPage.steps.verifyCorrectIncorrectIconNotVisible(1);
|
1686
|
+
listMatchingPage.steps.verifyCorrectIncorrectIconNotVisible(2);
|
1687
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
|
1688
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1689
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1690
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1691
|
+
|
1692
|
+
cy.log('When the user attempts the question fully correct as set in the Correct tab, points specified for correct answer should be awarded and on selecting \'Show correct answer\' checkbox green check-mark icon should be displayed besides all the response fields, correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
|
1693
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Common answer for stem 1', 0);
|
1694
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 2', 1);
|
1695
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 3', 2);
|
1696
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Common answer for stem 4', 3);
|
1697
|
+
listMatchingPage.previewScoreText()
|
1698
|
+
.verifyInnerText('24/24');
|
1699
|
+
listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
|
1700
|
+
listMatchingPage.steps.verifyCorrectOptionsCheckMarkIconsForAllStemResponseAreas();
|
1701
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1702
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1703
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1704
|
+
listMatchingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
1705
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1706
|
+
|
1707
|
+
cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides all the response fields, correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
|
1708
|
+
listMatchingPage.steps.checkAnswer();
|
1709
|
+
listMatchingPage.steps.verifyCorrectOptionsCheckMarkIconsForAllStemResponseAreas();
|
1710
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1711
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1712
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1713
|
+
|
1714
|
+
cy.log('When the user attempts the question fully correct as set in the Alternate tab, points specified for alternate correct answers should be awarded and on selecting \'Show correct answer\' checkbox green check-mark icon should be displayed besides all the response fields, correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
|
1715
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Alternate answer for stem 2', 1);
|
1716
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Alternate answer for stem 3', 2);
|
1717
|
+
listMatchingPage.previewScoreText()
|
1718
|
+
.verifyInnerText('20/24');
|
1719
|
+
listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
|
1720
|
+
listMatchingPage.steps.verifyCorrectOptionsCheckMarkIconsForAllStemResponseAreas();
|
1721
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1722
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1723
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1724
|
+
listMatchingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
1725
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1726
|
+
|
1727
|
+
cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides all the response fields, correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
|
1728
|
+
listMatchingPage.steps.checkAnswer();
|
1729
|
+
listMatchingPage.steps.verifyCorrectOptionsCheckMarkIconsForAllStemResponseAreas();
|
1730
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1731
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1732
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1733
|
+
|
1734
|
+
cy.log('When user selects partially correct answer options such that user has selected correct options only from the correct tab then user should be awarded with points for the correctly attempted responses and on selecting show correct answer checkbox then green check-mark icons should be displayed beside the correctly attempted responses from the correct tab and red cross-mark icons should be displayed beside the incorrectly attempted response fields, no icon should be displayed beside the unattempted response, correct/incorrect answer label and its border should not be displayed and correct answer container should be displayed with the correct answers for the user responses marked incorrect');
|
1735
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Incorrect answer 1', 0);
|
1736
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 2', 1);
|
1737
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 3', 2);
|
1738
|
+
listMatchingPage.steps.clickAndDropOptionFromResponseAreaToDraggableOptionsContainerInPreviewTab(3);
|
1739
|
+
listMatchingPage.previewScoreText()
|
1740
|
+
.verifyInnerText('11/24');
|
1741
|
+
listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
|
1742
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
1743
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
1744
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(2);
|
1745
|
+
listMatchingPage.steps.verifyCorrectIncorrectIconNotVisible(3);
|
1746
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1747
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1748
|
+
listMatchingPage.steps.verifyCorrectAnswerStemOptionsInCorrectAnswerContainerAndCount(['Common answer for stem 1', 'Common answer for stem 4'], ['1', '4']);
|
1749
|
+
listMatchingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
1750
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1751
|
+
|
1752
|
+
cy.log('When the user clicks on \'Check answer\' button, then green check-mark icons should be displayed beside the correctly attempted responses from the correct tab and red cross-mark icons should be displayed beside the incorrectly attempted response fields, no icon should be displayed beside the unattempted response, correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed')
|
1753
|
+
listMatchingPage.steps.checkAnswer();
|
1754
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
1755
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
1756
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(2);
|
1757
|
+
listMatchingPage.steps.verifyCorrectIncorrectIconNotVisible(3);
|
1758
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1759
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1760
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1761
|
+
|
1762
|
+
cy.log('When user selects partially correct answer options such that user has selected correct options only from the alternate tab then user should be awarded with points for the correctly attempted responses and on selecting show correct answer checkbox then green check-mark icons should be displayed beside the correctly attempted responses from the alternate tab and red cross-mark icons should be displayed beside the incorrectly attempted response fields, no icon should be displayed beside the unattempted response, correct/incorrect answer label and its border should not be displayed and correct answer container should be displayed with the correct answers for the user responses marked incorrect')
|
1763
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Alternate answer for stem 2', 1);
|
1764
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Alternate answer for stem 3', 2);
|
1765
|
+
listMatchingPage.previewScoreText()
|
1766
|
+
.verifyInnerText('11/24');
|
1767
|
+
listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
|
1768
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
1769
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
1770
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(2);
|
1771
|
+
listMatchingPage.steps.verifyCorrectIncorrectIconNotVisible(3);
|
1772
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1773
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1774
|
+
listMatchingPage.steps.verifyCorrectAnswerStemOptionsInCorrectAnswerContainerAndCount(['Common answer for stem 1', 'Common answer for stem 4'], ['1', '4']);
|
1775
|
+
listMatchingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
1776
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1777
|
+
|
1778
|
+
cy.log('When the user clicks on \'Check answer\' button, then green check-mark icons should be displayed beside the correctly attempted responses from the alternate tab and red cross-mark icons should be displayed beside the incorrectly attempted response fields, no icon should be displayed beside the unattempted responses, correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed')
|
1779
|
+
listMatchingPage.steps.checkAnswer();
|
1780
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
1781
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
1782
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(2);
|
1783
|
+
listMatchingPage.steps.verifyCorrectIncorrectIconNotVisible(3);
|
1784
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1785
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1786
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1787
|
+
|
1788
|
+
cy.log('When user selects equal number of options from the correct tab and alternate tab then points of the correctly attempted options from the tab that awards maximum points i.e. alternate tab in this case should be awarded and on selecting show correct answer checkbox green check-mark icon should be displayed besides the attempted responses from the alternate tab and red cross-mark icon should be displayed besides the attempted responses from the correct tab, correct/incorrect answer label and its border should not be displayed and correct answer container should be displayed with the correct answers from the correct tab for the user responses marked incorrect');
|
1789
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Common answer for stem 1', 0);
|
1790
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 3', 2);
|
1791
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Common answer for stem 4', 3);
|
1792
|
+
listMatchingPage.previewScoreText()
|
1793
|
+
.verifyInnerText('18/24');
|
1794
|
+
listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
|
1795
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
1796
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
1797
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
|
1798
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(3);
|
1799
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1800
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1801
|
+
listMatchingPage.steps.verifyCorrectAnswerStemOptionsInCorrectAnswerContainerAndCount(['Correct answer for stem 3'], ['3']);
|
1802
|
+
listMatchingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
1803
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1804
|
+
|
1805
|
+
cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides the attempted responses from the alternate tab and red cross-mark icon should be displayed besides the attempted responses from the correct tab, correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
|
1806
|
+
listMatchingPage.steps.checkAnswer();
|
1807
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
1808
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
1809
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
|
1810
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(3);
|
1811
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1812
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1813
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1814
|
+
|
1815
|
+
cy.log('When user selects equal number of options from the correct tab and alternate tab then points of the correctly attempted options from the tab that awards maximum points i.e. correct tab in this case should be awarded and on selecting show correct answer checkbox green check-mark icon should be displayed besides the attempted responses from the correct tab and red cross-mark icon should be displayed besides the attempted responses from the alternate tab, correct/incorrect answer label and its border should not be displayed and correct answer container should be displayed with the correct answers from the correct tab for the user responses marked incorrect');
|
1816
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 2', 1);
|
1817
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Alternate answer for stem 3', 2);
|
1818
|
+
listMatchingPage.previewScoreText()
|
1819
|
+
.verifyInnerText('20/24');
|
1820
|
+
listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
|
1821
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
1822
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
1823
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
|
1824
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(3);
|
1825
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1826
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1827
|
+
listMatchingPage.steps.verifyCorrectAnswerStemOptionsInCorrectAnswerContainerAndCount(['Correct answer for stem 3'], ['3']);
|
1828
|
+
listMatchingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
1829
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1830
|
+
|
1831
|
+
cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides the attempted responses from the correct tab and red cross-mark icon should be displayed besides the attempted responses from the alternate tab, correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
|
1832
|
+
listMatchingPage.steps.checkAnswer();
|
1833
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
1834
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
1835
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
|
1836
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(3);
|
1837
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1838
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1839
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1840
|
+
|
1841
|
+
cy.log('(Overachiever case) Pre-step: Switching to Edit tab and allotting points to correct and alternate tab such that the difference between the points is substantial and the points per response are in decimal');
|
1842
|
+
listMatchingPage.steps.switchToEditTab();
|
1843
|
+
switch (optionLayout) {
|
1844
|
+
case 'standard':
|
1845
|
+
listMatchingPage.steps.addOption();
|
1846
|
+
listMatchingPage.steps.addInputToOptionForDragAndDropInputField('Alternate answer for stem 1', 8);
|
1847
|
+
listMatchingPage.steps.addOption();
|
1848
|
+
listMatchingPage.steps.addInputToOptionForDragAndDropInputField('Alternate answer for stem 4', 9);
|
1849
|
+
break;
|
1850
|
+
case 'grouped':
|
1851
|
+
listMatchingPage.steps.addOptionInGroupedResponseLayout(0);
|
1852
|
+
listMatchingPage.steps.addInputToOptionForDragAndDropInputField('Alternate answer for stem 1', 4);
|
1853
|
+
listMatchingPage.steps.addOptionInGroupedResponseLayout(1);
|
1854
|
+
listMatchingPage.steps.addInputToOptionForDragAndDropInputField('Alternate answer for stem 4', 9);
|
1855
|
+
break;
|
1856
|
+
default:
|
1857
|
+
throw new Error('Invalid option layout');
|
1858
|
+
}
|
1859
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Alternate answer for stem 1', 0);
|
1860
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Alternate answer for stem 4', 3);
|
1861
|
+
listMatchingPage.steps.addPartialDifferentWeightsPoints([4.5, 1.5, 2.5, 3.5]);
|
1862
|
+
listMatchingPage.steps.navigateToCorrectTab();
|
1863
|
+
listMatchingPage.steps.addPartialDifferentWeightsPoints([5.5, 14.5, 17.5, 12.5]);
|
1864
|
+
listMatchingPage.steps.switchToPreviewTab();
|
1865
|
+
|
1866
|
+
cy.log('Overachiever case: When the user selects more number of correct options from the alternate tab than the correct tab but the score of the individual response selected from the correct tab overpowers the combined score of the alternate tab responses then green check-mark icon should be displayed for the attempted option from the correct tab, red cross-mark icon should be displayed for the attempted options from the alternate tab and points awarded should be of the correct tab, correct/incorrect answer label and its border should not be displayed and correct answer container should be displayed with the correct answers from the correct tab for the user responses marked incorrect');
|
1867
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Alternate answer for stem 1', 0);
|
1868
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Alternate answer for stem 2', 1);
|
1869
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 3', 2);
|
1870
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Alternate answer for stem 4', 3);
|
1871
|
+
listMatchingPage.previewScoreText()
|
1872
|
+
.verifyInnerText('17.5/50');
|
1873
|
+
listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
|
1874
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
1875
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
1876
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(2);
|
1877
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
|
1878
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1879
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1880
|
+
listMatchingPage.steps.verifyCorrectAnswerStemOptionsInCorrectAnswerContainerAndCount(['Common answer for stem 1', 'Correct answer for stem 2', 'Common answer for stem 4'], ['1', '2', '4']);
|
1881
|
+
listMatchingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
1882
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1883
|
+
|
1884
|
+
cy.log('Overachiever case: When the user clicks on \'Check answer\' button, green check-mark icon should be displayed for the attempted option from the correct tab, red cross-mark icon should be displayed for the attempted options from the alternate tab, correct/incorrect answer label and its border should not be displayed and correct answer container should not be displayed');
|
1885
|
+
listMatchingPage.steps.checkAnswer();
|
1886
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
1887
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
1888
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(2);
|
1889
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
|
1890
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
1891
|
+
listMatchingPage.steps.verifyCorrectIncorrectBorderNotExists();
|
1892
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
1893
|
+
});
|
1894
|
+
},
|
1895
|
+
|
1896
|
+
verifyPartialDifferentWeightWithAlternateAnswerWhenAlternatePointsMoreThanCorrectPoints: (optionLayout) => {
|
1896
1897
|
it('Alternate answer case: When Alternate Answer points are more than Correct Answer points', () => {
|
1897
1898
|
cy.log('Total points displayed besides Show correct answer checkbox should be of Alternate answer points')
|
1898
1899
|
listMatchingPage.previewScoreText()
|
@@ -2137,7 +2138,7 @@ const tests = {
|
|
2137
2138
|
});
|
2138
2139
|
},
|
2139
2140
|
|
2140
|
-
verifyPartialDifferentWeightWithAlternateAnswerWhenCorrectPointsEqualToAlternatePoints:(optionLayout) => {
|
2141
|
+
verifyPartialDifferentWeightWithAlternateAnswerWhenCorrectPointsEqualToAlternatePoints: (optionLayout) => {
|
2141
2142
|
it('Alternate answer case: When Alternate answer points and correct answer points both are equal', () => {
|
2142
2143
|
cy.log('Checking total points displayed')
|
2143
2144
|
listMatchingPage.previewScoreText()
|
@@ -2403,30 +2404,31 @@ const tests = {
|
|
2403
2404
|
},
|
2404
2405
|
|
2405
2406
|
verifyAutoScoredPartialDifferentWeightsRoundDownScore: () => {
|
2406
|
-
it('When the \'Round down score\' checkbox is selected, then in Preview tab when user
|
2407
|
-
listMatchingPage.previewScoreText()
|
2408
|
-
.verifyInnerText('0/7.4');
|
2407
|
+
it('When the \'Round down score\' checkbox is not selected, then in Preview tab when user selects partially or fully correct answers the points should be displayed in decimal points if applicable as per the options selected by the user', () => {
|
2409
2408
|
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 0);
|
2410
2409
|
listMatchingPage.previewScoreText()
|
2411
|
-
.verifyInnerText('4/7.4');
|
2412
|
-
listMatchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
2410
|
+
.verifyInnerText('4.1/7.4');
|
2413
2411
|
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 2', 1);
|
2414
2412
|
listMatchingPage.previewScoreText()
|
2415
|
-
.verifyInnerText('7/7.4');
|
2416
|
-
listMatchingPage.steps.
|
2413
|
+
.verifyInnerText('7.4/7.4');
|
2414
|
+
listMatchingPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
2417
2415
|
});
|
2418
2416
|
|
2419
|
-
it('When the \'Round down score\' checkbox is
|
2420
|
-
listMatchingPage.steps.switchToEditTab()
|
2421
|
-
listMatchingPage.steps.
|
2417
|
+
it('When the \'Round down score\' checkbox is selected, then in Preview tab when user enters partially or fully correct answers responses the points displayed should be rounded down to the nearest whole number', () => {
|
2418
|
+
listMatchingPage.steps.switchToEditTab()
|
2419
|
+
listMatchingPage.steps.expandRoundingDropdown();
|
2420
|
+
listMatchingPage.steps.selectOptionFromRoundingDropdownOption('round down if <= 0.99');
|
2422
2421
|
listMatchingPage.steps.switchToPreviewTab();
|
2422
|
+
listMatchingPage.previewScoreText()
|
2423
|
+
.verifyInnerText('0/7.4');
|
2423
2424
|
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 0);
|
2424
2425
|
listMatchingPage.previewScoreText()
|
2425
|
-
.verifyInnerText('4
|
2426
|
+
.verifyInnerText('4/7.4');
|
2427
|
+
listMatchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
2426
2428
|
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 2', 1);
|
2427
2429
|
listMatchingPage.previewScoreText()
|
2428
|
-
.verifyInnerText('7
|
2429
|
-
listMatchingPage.steps.
|
2430
|
+
.verifyInnerText('7/7.4');
|
2431
|
+
listMatchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
2430
2432
|
});
|
2431
2433
|
},
|
2432
2434
|
|