itemengine-cypress-automation 1.0.90 → 1.0.92
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/Desmos/desmosGeometryToolPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +3 -3
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +418 -0
- package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponseBasic/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +79 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/conditionalCheckboxScoring.js +335 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +64 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +334 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +180 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +55 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +257 -0
- package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +68 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +773 -0
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +1 -1
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +50 -50
- package/cypress/fixtures/theme/ilc.json +1 -1
- package/cypress/pages/components/commonComponents.js +1 -1
- package/cypress/pages/components/desmosToolComponent.js +1 -1
- package/cypress/pages/components/equationEditorFlyout.js +118 -7
- package/cypress/pages/components/essayResponseCommonComponents.js +26 -1
- package/cypress/pages/components/figOverImageCanvasComponent.js +1 -1
- package/cypress/pages/drawingResponsePage.js +1 -1
- package/cypress/pages/essayResponsePage.js +106 -1
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +270 -8
- package/cypress/pages/readingRulerPage.js +64 -5
- package/cypress/pages/textEntryMathPage.js +112 -8
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +1 -1
@@ -464,7 +464,7 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
|
|
464
464
|
cy.log('Pre-step: Selecting \'Value is equivalent\' evaluation method');
|
465
465
|
textEntryMathPage.steps.selectEvaluationMethod(evaluationMethods[1].name);
|
466
466
|
utilities.verifyCSS(textEntryMathPage.customSettingsCheckboxContainer(customSettingsIds.caseSensitive).find('[class*="MuiFormControlLabel-label"]'), {
|
467
|
-
'color': css.color.
|
467
|
+
'color': css.color.checkboxLabel,
|
468
468
|
'font-size': css.fontSize.normal,
|
469
469
|
'font-weight': css.fontWeight.regular,
|
470
470
|
});
|
@@ -161,8 +161,8 @@ export const equationEditorCategoriesAndSymbols = {
|
|
161
161
|
},
|
162
162
|
sqrt: {
|
163
163
|
title: 'Square Root',
|
164
|
-
|
165
|
-
ariaLabel: '
|
164
|
+
text: null,
|
165
|
+
ariaLabel: 'Sqrt',
|
166
166
|
displayText: null,
|
167
167
|
},
|
168
168
|
cubeRoot: {
|
@@ -1698,91 +1698,91 @@ export const equationEditorCategoriesAndSymbols = {
|
|
1698
1698
|
symbols: {
|
1699
1699
|
sin: {
|
1700
1700
|
title: 'sin',
|
1701
|
-
textElement:
|
1701
|
+
textElement: null,
|
1702
1702
|
ariaLabel: 'Sine',
|
1703
1703
|
displayText: 'sin'
|
1704
1704
|
},
|
1705
1705
|
cos: {
|
1706
1706
|
title: 'cos',
|
1707
|
-
textElement:
|
1707
|
+
textElement: null,
|
1708
1708
|
ariaLabel: 'CosineT',
|
1709
1709
|
displayText: 'cos'
|
1710
1710
|
},
|
1711
1711
|
tan: {
|
1712
1712
|
title: 'tan',
|
1713
|
-
textElement:
|
1713
|
+
textElement: null,
|
1714
1714
|
ariaLabel: 'TangentT',
|
1715
1715
|
displayText: 'tan'
|
1716
1716
|
},
|
1717
1717
|
sec: {
|
1718
1718
|
title: 'sec',
|
1719
|
-
textElement:
|
1719
|
+
textElement: null,
|
1720
1720
|
ariaLabel: 'Sec',
|
1721
1721
|
displayText: 'sec'
|
1722
1722
|
},
|
1723
1723
|
cosec: {
|
1724
1724
|
title: 'cosec',
|
1725
|
-
textElement:
|
1725
|
+
textElement: null,
|
1726
1726
|
ariaLabel: 'Cosec',
|
1727
1727
|
displayText: 'cosec'
|
1728
1728
|
},
|
1729
1729
|
cot: {
|
1730
1730
|
title: 'cot',
|
1731
|
-
textElement:
|
1731
|
+
textElement: null,
|
1732
1732
|
ariaLabel: 'Cot',
|
1733
1733
|
displayText: 'cot'
|
1734
1734
|
},
|
1735
1735
|
sinInverse: {
|
1736
1736
|
title: 'sin inverse',
|
1737
|
-
textElement:
|
1737
|
+
textElement: null,
|
1738
1738
|
ariaLabel: 'SinInverse',
|
1739
1739
|
displayText: 'sin−1'
|
1740
1740
|
},
|
1741
1741
|
cosInverse: {
|
1742
1742
|
title: 'cos inverse',
|
1743
|
-
textElement:
|
1743
|
+
textElement: null,
|
1744
1744
|
ariaLabel: 'CosInverse',
|
1745
1745
|
displayText: 'cos−1'
|
1746
1746
|
},
|
1747
1747
|
TanInverse: {
|
1748
1748
|
title: 'tan inverse',
|
1749
|
-
textElement:
|
1749
|
+
textElement: null,
|
1750
1750
|
ariaLabel: 'TanInverse',
|
1751
1751
|
displayText: 'tan−1'
|
1752
1752
|
},
|
1753
1753
|
secInverse: {
|
1754
1754
|
title: 'sec inverse',
|
1755
|
-
textElement:
|
1755
|
+
textElement: null,
|
1756
1756
|
ariaLabel: 'SecInverse',
|
1757
1757
|
displayText: 'sec−1'
|
1758
1758
|
},
|
1759
1759
|
cosecInverse: {
|
1760
1760
|
title: 'cosec inverse',
|
1761
|
-
textElement:
|
1761
|
+
textElement: null,
|
1762
1762
|
ariaLabel: 'CosecInverse',
|
1763
1763
|
displayText: 'csc−1'
|
1764
1764
|
},
|
1765
1765
|
cotInverse: {
|
1766
1766
|
title: 'cot inverse',
|
1767
|
-
textElement:
|
1767
|
+
textElement: null,
|
1768
1768
|
ariaLabel: 'CotInverse',
|
1769
1769
|
displayText: 'cot−1'
|
1770
1770
|
},
|
1771
1771
|
arcsin: {
|
1772
1772
|
title: 'arcsin',
|
1773
|
-
textElement:
|
1773
|
+
textElement: null,
|
1774
1774
|
ariaLabel: 'Arcsin',
|
1775
1775
|
displayText: 'arcsin'
|
1776
1776
|
},
|
1777
1777
|
arccos: {
|
1778
1778
|
title: 'arccos',
|
1779
|
-
textElement:
|
1779
|
+
textElement: null,
|
1780
1780
|
ariaLabel: 'Arccos',
|
1781
1781
|
displayText: 'arccos'
|
1782
1782
|
},
|
1783
1783
|
arctan: {
|
1784
1784
|
title: 'arctan',
|
1785
|
-
textElement:
|
1785
|
+
textElement: null,
|
1786
1786
|
ariaLabel: 'Arctan',
|
1787
1787
|
displayText: 'arctan'
|
1788
1788
|
}
|
@@ -1794,187 +1794,187 @@ export const equationEditorCategoriesAndSymbols = {
|
|
1794
1794
|
symbols: {
|
1795
1795
|
gram: {
|
1796
1796
|
title: 'Gram',
|
1797
|
-
textElement:
|
1797
|
+
textElement: null,
|
1798
1798
|
ariaLabel: 'Gram',
|
1799
1799
|
displayText: 'g'
|
1800
1800
|
},
|
1801
1801
|
meter: {
|
1802
1802
|
title: 'Meter',
|
1803
|
-
textElement:
|
1803
|
+
textElement: null,
|
1804
1804
|
ariaLabel: 'Meter',
|
1805
1805
|
displayText: 'm'
|
1806
1806
|
},
|
1807
1807
|
litre: {
|
1808
1808
|
title: 'Litre',
|
1809
|
-
textElement:
|
1809
|
+
textElement: null,
|
1810
1810
|
ariaLabel: 'Litre',
|
1811
1811
|
displayText: 'L'
|
1812
1812
|
},
|
1813
1813
|
second: {
|
1814
1814
|
title: 'Second',
|
1815
|
-
textElement:
|
1815
|
+
textElement: null,
|
1816
1816
|
ariaLabel: 'Second',
|
1817
1817
|
displayText: 's'
|
1818
1818
|
},
|
1819
1819
|
kilogram: {
|
1820
1820
|
title: 'Kilogram',
|
1821
|
-
textElement:
|
1821
|
+
textElement: null,
|
1822
1822
|
ariaLabel: 'Kilogram',
|
1823
1823
|
displayText: 'kg'
|
1824
1824
|
},
|
1825
1825
|
centigram: {
|
1826
1826
|
title: 'Centigram',
|
1827
|
-
textElement:
|
1827
|
+
textElement: null,
|
1828
1828
|
ariaLabel: 'Centigram',
|
1829
1829
|
displayText: 'cg'
|
1830
1830
|
},
|
1831
1831
|
milligram: {
|
1832
1832
|
title: 'Milligram',
|
1833
|
-
textElement:
|
1833
|
+
textElement: null,
|
1834
1834
|
ariaLabel: 'Milligram',
|
1835
1835
|
displayText: 'mg'
|
1836
1836
|
},
|
1837
1837
|
microgram: {
|
1838
1838
|
title: 'Microgram',
|
1839
|
-
textElement:
|
1839
|
+
textElement: null,
|
1840
1840
|
ariaLabel: 'Microgram',
|
1841
1841
|
displayText: 'µg'
|
1842
1842
|
},
|
1843
1843
|
nanogram: {
|
1844
1844
|
title: 'Nanogram',
|
1845
|
-
textElement:
|
1845
|
+
textElement: null,
|
1846
1846
|
ariaLabel: 'Nanogram',
|
1847
1847
|
displayText: 'ng'
|
1848
1848
|
},
|
1849
1849
|
kilometer: {
|
1850
1850
|
title: 'Kilometer',
|
1851
|
-
textElement:
|
1851
|
+
textElement: null,
|
1852
1852
|
ariaLabel: 'Kilometer',
|
1853
1853
|
displayText: 'km'
|
1854
1854
|
},
|
1855
1855
|
centimeter: {
|
1856
1856
|
title: 'Centimeter',
|
1857
|
-
textElement:
|
1857
|
+
textElement: null,
|
1858
1858
|
ariaLabel: 'Centimeter',
|
1859
1859
|
displayText: 'cm'
|
1860
1860
|
},
|
1861
1861
|
millimeter: {
|
1862
1862
|
title: 'Millimeter',
|
1863
|
-
textElement:
|
1863
|
+
textElement: null,
|
1864
1864
|
ariaLabel: 'Millimeter',
|
1865
1865
|
displayText: 'mm'
|
1866
1866
|
},
|
1867
1867
|
micrometer: {
|
1868
1868
|
title: 'Micrometer',
|
1869
|
-
textElement:
|
1869
|
+
textElement: null,
|
1870
1870
|
ariaLabel: 'Micrometer',
|
1871
1871
|
displayText: 'µm'
|
1872
1872
|
},
|
1873
1873
|
nanometer: {
|
1874
1874
|
title: 'Nanometer',
|
1875
|
-
textElement:
|
1875
|
+
textElement: null,
|
1876
1876
|
ariaLabel: 'Nanometer',
|
1877
1877
|
displayText: 'nm'
|
1878
1878
|
},
|
1879
1879
|
millilitre: {
|
1880
1880
|
title: 'Millilitre',
|
1881
|
-
textElement:
|
1881
|
+
textElement: null,
|
1882
1882
|
ariaLabel: 'Millilitre',
|
1883
1883
|
displayText: 'mL'
|
1884
1884
|
},
|
1885
1885
|
microlitre: {
|
1886
1886
|
title: 'Microlitre',
|
1887
|
-
textElement:
|
1887
|
+
textElement: null,
|
1888
1888
|
ariaLabel: 'Microlitre',
|
1889
1889
|
displayText: 'µL'
|
1890
1890
|
},
|
1891
1891
|
kilosecond: {
|
1892
1892
|
title: 'Kilosecond',
|
1893
|
-
textElement:
|
1893
|
+
textElement: null,
|
1894
1894
|
ariaLabel: 'Kilosecond',
|
1895
1895
|
displayText: 'ks'
|
1896
1896
|
},
|
1897
1897
|
centisecond: {
|
1898
1898
|
title: 'Centisecond',
|
1899
|
-
textElement:
|
1899
|
+
textElement: null,
|
1900
1900
|
ariaLabel: 'Centisecond',
|
1901
1901
|
displayText: 'cs'
|
1902
1902
|
},
|
1903
1903
|
millisecond: {
|
1904
1904
|
title: 'Millisecond',
|
1905
|
-
textElement:
|
1905
|
+
textElement: null,
|
1906
1906
|
ariaLabel: 'Millisecond',
|
1907
1907
|
displayText: 'ms'
|
1908
1908
|
},
|
1909
1909
|
microsecond: {
|
1910
1910
|
title: 'Microsecond',
|
1911
|
-
textElement:
|
1911
|
+
textElement: null,
|
1912
1912
|
ariaLabel: 'Microsecond',
|
1913
1913
|
displayText: 'µs'
|
1914
1914
|
},
|
1915
1915
|
nanosecond: {
|
1916
1916
|
title: 'Nanosecond',
|
1917
|
-
textElement:
|
1917
|
+
textElement: null,
|
1918
1918
|
ariaLabel: 'Nanosecond',
|
1919
1919
|
displayText: 'ns'
|
1920
1920
|
},
|
1921
1921
|
ounce: {
|
1922
1922
|
title: 'Ounce',
|
1923
|
-
textElement:
|
1923
|
+
textElement: null,
|
1924
1924
|
ariaLabel: 'Ounce',
|
1925
1925
|
displayText: 'oz'
|
1926
1926
|
},
|
1927
1927
|
Pound: {
|
1928
1928
|
title: 'Pound',
|
1929
|
-
textElement:
|
1929
|
+
textElement: null,
|
1930
1930
|
ariaLabel: 'Pound',
|
1931
1931
|
displayText: 'lb'
|
1932
1932
|
},
|
1933
1933
|
inch: {
|
1934
1934
|
title: 'Inch',
|
1935
|
-
textElement:
|
1935
|
+
textElement: null,
|
1936
1936
|
ariaLabel: 'Inch',
|
1937
1937
|
displayText: 'in'
|
1938
1938
|
},
|
1939
1939
|
foot: {
|
1940
1940
|
title: 'Foot',
|
1941
|
-
textElement:
|
1941
|
+
textElement: null,
|
1942
1942
|
ariaLabel: 'Foot',
|
1943
1943
|
displayText: 'ft'
|
1944
1944
|
},
|
1945
1945
|
mile: {
|
1946
1946
|
title: 'Mile',
|
1947
|
-
textElement:
|
1947
|
+
textElement: null,
|
1948
1948
|
ariaLabel: 'Mile',
|
1949
1949
|
displayText: 'mi'
|
1950
1950
|
},
|
1951
1951
|
fluidOunce: {
|
1952
1952
|
title: 'Fluid Ounce',
|
1953
|
-
textElement:
|
1953
|
+
textElement: null,
|
1954
1954
|
ariaLabel: 'FluidOunce',
|
1955
1955
|
displayText: 'fl oz'
|
1956
1956
|
},
|
1957
1957
|
cup: {
|
1958
1958
|
title: 'Cup',
|
1959
|
-
textElement:
|
1959
|
+
textElement: null,
|
1960
1960
|
ariaLabel: 'Cup',
|
1961
1961
|
displayText: 'cup'
|
1962
1962
|
},
|
1963
1963
|
pint: {
|
1964
1964
|
title: 'Pint',
|
1965
|
-
textElement:
|
1965
|
+
textElement: null,
|
1966
1966
|
ariaLabel: 'Pint',
|
1967
1967
|
displayText: 'pt'
|
1968
1968
|
},
|
1969
1969
|
quart: {
|
1970
1970
|
title: 'Quart',
|
1971
|
-
textElement:
|
1971
|
+
textElement: null,
|
1972
1972
|
ariaLabel: 'Quart',
|
1973
1973
|
displayText: 'qt'
|
1974
1974
|
},
|
1975
1975
|
gallon: {
|
1976
1976
|
title: 'Gallon',
|
1977
|
-
textElement:
|
1977
|
+
textElement: null,
|
1978
1978
|
ariaLabel: 'Gallon',
|
1979
1979
|
displayText: 'gal'
|
1980
1980
|
}
|
@@ -1986,7 +1986,7 @@ export const equationEditorCategoriesAndSymbols = {
|
|
1986
1986
|
symbols: {
|
1987
1987
|
limit: {
|
1988
1988
|
title: 'Limit x to',
|
1989
|
-
textElement:
|
1989
|
+
textElement: null,
|
1990
1990
|
ariaLabel: 'LimitXTo',
|
1991
1991
|
displayText: 'limx→'
|
1992
1992
|
},
|
@@ -1998,7 +1998,7 @@ export const equationEditorCategoriesAndSymbols = {
|
|
1998
1998
|
},
|
1999
1999
|
eulersNumber: {
|
2000
2000
|
title: 'Euler\'s number',
|
2001
|
-
textElement:
|
2001
|
+
textElement: null,
|
2002
2002
|
ariaLabel: 'EulersNumber',
|
2003
2003
|
displayText: 'e'
|
2004
2004
|
},
|
@@ -106,7 +106,7 @@
|
|
106
106
|
"unSelectedEvaluationMethodTitle": "rgb(82, 0, 255)",
|
107
107
|
"evaluationMethodContainerBorder": "rgb(186, 201, 255)",
|
108
108
|
"selectedEvaluationMethodContainerBg": "rgb(0, 0, 124)",
|
109
|
-
"
|
109
|
+
"checkboxLabel": "rgb(34, 34, 76)",
|
110
110
|
"separatorsUnselectedOption": "rgb(68, 68, 97)"
|
111
111
|
},
|
112
112
|
"fontSize": {
|
@@ -7,7 +7,7 @@ const selectors = {
|
|
7
7
|
tooltipText: () => cy.get('[class*="MuiTooltip-tooltip"]'),
|
8
8
|
snackbar: () => cy.get('.MuiSnackbarContent-message'),
|
9
9
|
snackbarCloseButton: () => cy.get('.MuiSnackbarContent-action'),
|
10
|
-
errorMessage: () => cy.get('.error-text-message'),
|
10
|
+
errorMessage: () => cy.get('[role="alert"].error-text-message'),
|
11
11
|
nextGenCreateItemWrapper: () => cy.get('#nextgen-assess-create-item'),
|
12
12
|
dropdownList: () => cy.get('.dropdown-list'),
|
13
13
|
dragHandleButton: () => cy.get('.dragicon-button'),
|
@@ -10,7 +10,7 @@ const selectors = {
|
|
10
10
|
previewTabDesmosToolSidebar: () => cy.get('.dcg-sidebar'),
|
11
11
|
previewTabDesmosToolSidebarButton: (ariaLabel = null) => {
|
12
12
|
if (ariaLabel) {
|
13
|
-
return cy.get(`.dcg-sidebar [role="button"][aria-label*="${ariaLabel}"]`)
|
13
|
+
return cy.get(`.dcg-sidebar [role="button"][aria-label*="${ariaLabel}"]`).eq(0)
|
14
14
|
} else {
|
15
15
|
return cy.get('.dcg-sidebar [role="button"]')
|
16
16
|
}
|
@@ -18,7 +18,7 @@ const selectors = {
|
|
18
18
|
categoryCharactersWrapper: () => cy.get('.subtools-container'),
|
19
19
|
categoryCharacters: (ariaLabel = null) => {
|
20
20
|
if (ariaLabel) {
|
21
|
-
return cy.get(`.subtools-icon-wrapper[tabindex="0"][aria-label
|
21
|
+
return cy.get(`.subtools-icon-wrapper[tabindex="0"][aria-label*="${ariaLabel}"]`).eq(0)
|
22
22
|
} else {
|
23
23
|
return cy.get('.subtools-icon-wrapper[tabindex="0"]')
|
24
24
|
}
|
@@ -31,7 +31,7 @@ const selectors = {
|
|
31
31
|
inputFieldCursor: () => cy.get('.mq-hasCursor'),
|
32
32
|
inputFieldFirstEmptyBox: () => cy.get('.mq-empty').eq(0),
|
33
33
|
categoryTooltip: () => cy.get('.__react_component_tooltip'),
|
34
|
-
dialogBoxTitle: () => cy.get('
|
34
|
+
dialogBoxTitle: () => cy.get('#alert-dialog-title')
|
35
35
|
}
|
36
36
|
|
37
37
|
const steps = {
|
@@ -107,15 +107,15 @@ const steps = {
|
|
107
107
|
* @description Select category and enter the equations in equation editor input field
|
108
108
|
* @param {Object[]} responses - An array of objects containing the categoryName and symbolName
|
109
109
|
* @param {string} responses[].categoryName Name of the category
|
110
|
-
* @param {string} responses[].
|
110
|
+
* @param {string} responses[].symbolAriaLabel Aria-label of the symbol from the selected category
|
111
111
|
*/
|
112
112
|
enterEquation: (responses) => {
|
113
|
-
responses.forEach(({ categoryName,
|
113
|
+
responses.forEach(({ categoryName, symbolAriaLabel }) => {
|
114
114
|
equationEditorFlyout.categoryTab()
|
115
|
-
.contains(
|
115
|
+
.contains(categoryName, { matchCase: false })
|
116
116
|
.click();
|
117
|
-
|
118
|
-
equationEditorFlyout.categoryCharacters(
|
117
|
+
symbolAriaLabel.forEach((individualSymbol) => {
|
118
|
+
equationEditorFlyout.categoryCharacters(individualSymbol)
|
119
119
|
.click();
|
120
120
|
});
|
121
121
|
});
|
@@ -157,6 +157,63 @@ const steps = {
|
|
157
157
|
.type(text)
|
158
158
|
},
|
159
159
|
|
160
|
+
verifyDefaultEquationEditorInputFieldWithCursor: () => {
|
161
|
+
equationEditorFlyout.previewInputField()
|
162
|
+
.verifyInnerText('')
|
163
|
+
.should('be.visible')
|
164
|
+
.and('have.class', 'mq-focused');
|
165
|
+
},
|
166
|
+
|
167
|
+
/**
|
168
|
+
* Verify category tiles displayed in equation editor flyout
|
169
|
+
* @param {string[]} equationCategoriesNameArray Array of names of categories in equation editor
|
170
|
+
*/
|
171
|
+
verifyEquationEditorCategoryTiles: (equationCategoriesNameArray) => {
|
172
|
+
equationEditorFlyout.categoryTab()
|
173
|
+
.each(($el, index) => {
|
174
|
+
utilities.verifyInnerText(cy.wrap($el), equationCategoriesNameArray[index]);
|
175
|
+
cy.wrap($el)
|
176
|
+
.within(() => {
|
177
|
+
utilities.verifyElementVisibilityState(equationEditorFlyout.categoryTabIcon(), 'exist');
|
178
|
+
});
|
179
|
+
});
|
180
|
+
},
|
181
|
+
|
182
|
+
/**
|
183
|
+
* Verify category not displayed in equation editor flyout
|
184
|
+
* @param {string[]} categoryName Name of category
|
185
|
+
*/
|
186
|
+
verifyCategoryNotDisplayedInEquationEditor: (categoryName) => {
|
187
|
+
utilities.verifyElementVisibilityState(equationEditorFlyout.categoryTab().contains(categoryName, { matchCase: false }), 'notExist');
|
188
|
+
},
|
189
|
+
|
190
|
+
/**
|
191
|
+
* Verify category is displayed in equation editor flyout
|
192
|
+
* @param {string[]} categoryName Name of category
|
193
|
+
*/
|
194
|
+
verifyCategoryIsDisplayedInEquationEditor: (categoryName) => {
|
195
|
+
utilities.verifyElementVisibilityState(equationEditorFlyout.categoryTab().contains(categoryName, { matchCase: false }), 'visible');
|
196
|
+
},
|
197
|
+
|
198
|
+
verifyCategoryTileSelectedInEquationEditor: (categoryName) => {
|
199
|
+
equationEditorFlyout.categoryTab(categoryName)
|
200
|
+
.should('have.class', 'selected-tool-content-color');
|
201
|
+
},
|
202
|
+
|
203
|
+
clickOnEquationEditorCancelButton: () => {
|
204
|
+
equationEditorFlyout.buttonCancel()
|
205
|
+
.click();
|
206
|
+
},
|
207
|
+
|
208
|
+
clickOnEquationEditorButtonNext: () => {
|
209
|
+
equationEditorFlyout.buttonNext()
|
210
|
+
.click();
|
211
|
+
},
|
212
|
+
|
213
|
+
clickOnEquationEditorButtonPrevious: () => {
|
214
|
+
equationEditorFlyout.buttonPrevious()
|
215
|
+
.click();
|
216
|
+
},
|
160
217
|
///Old
|
161
218
|
addGenericEquationUsingEquationEditorToCKEditorInputField: () => {
|
162
219
|
equationEditorFlyout.categoryTab(equationEditorCategoriesAndSymbols['basic'].displayName)
|
@@ -179,6 +236,60 @@ const steps = {
|
|
179
236
|
.contains(constants.CKEditorEquationEditorPopupInputFieldEnteredEquationText);
|
180
237
|
equationEditorFlyout.buttonOk()
|
181
238
|
.click();
|
239
|
+
},
|
240
|
+
|
241
|
+
/**
|
242
|
+
* @description Select category and enter the equations in equation editor input field
|
243
|
+
* @param {Object[]} responses - An array of objects containing the categoryName and symbolName
|
244
|
+
* @param {string} responses[].categoryName Name of the category
|
245
|
+
* @param {string} responses[].symbolName Name of the symbol from the selected category
|
246
|
+
*/
|
247
|
+
enterEquation: (responses) => {
|
248
|
+
responses.forEach(({ categoryName, symbolName }) => {
|
249
|
+
equationEditorFlyout.categoryTab()
|
250
|
+
.contains(equationEditorCategoriesAndSymbols[categoryName].displayName, { matchCase: false })
|
251
|
+
.click();
|
252
|
+
symbolName.forEach((individualSymbol) => {
|
253
|
+
equationEditorFlyout.categoryCharacters(equationEditorCategoriesAndSymbols[categoryName].symbols[individualSymbol].ariaLabel)
|
254
|
+
.click();
|
255
|
+
});
|
256
|
+
});
|
257
|
+
},
|
258
|
+
|
259
|
+
/**
|
260
|
+
* @description type in the equation editor input field
|
261
|
+
* @param {string} text - text to be entered in the input field
|
262
|
+
*/
|
263
|
+
enterTextInPreviewInputField: (text) => {
|
264
|
+
equationEditorFlyout.previewInputField()
|
265
|
+
.type(text);
|
266
|
+
},
|
267
|
+
|
268
|
+
clickOnOkButton: () => {
|
269
|
+
equationEditorFlyout.buttonOk()
|
270
|
+
.click();
|
271
|
+
},
|
272
|
+
|
273
|
+
/**
|
274
|
+
* @description type in the equation editor input field first empty box
|
275
|
+
* @param {string} text - text to be entered in the first empty box of field
|
276
|
+
*/
|
277
|
+
enterTextInFirstEmptyBox: (textArray) => {
|
278
|
+
textArray.forEach((text) => {
|
279
|
+
equationEditorFlyout.inputFieldFirstEmptyBox()
|
280
|
+
.click()
|
281
|
+
.type(text)
|
282
|
+
});
|
283
|
+
},
|
284
|
+
|
285
|
+
/**
|
286
|
+
* @description type in the equation editor cursor input field
|
287
|
+
* @param {string} text - text to be entered at the cursor
|
288
|
+
*/
|
289
|
+
enterTextAtInputFieldCursor: (text) => {
|
290
|
+
equationEditorFlyout.inputFieldCursor()
|
291
|
+
.click()
|
292
|
+
.type(text)
|
182
293
|
}
|
183
294
|
}
|
184
295
|
|
@@ -48,6 +48,7 @@ const selectors = {
|
|
48
48
|
//Preview tab
|
49
49
|
responseField: () => cy.get('[title="Enter your response to the question here."]'),
|
50
50
|
responseFieldWordCount: () => cy.get('[class*="InputLimitLabelWrapper"]'),
|
51
|
+
responseFieldEquation: () => cy.get('.cke_widget_element'),
|
51
52
|
}
|
52
53
|
|
53
54
|
const steps = {
|
@@ -155,7 +156,31 @@ const steps = {
|
|
155
156
|
.should('be.checked');
|
156
157
|
},
|
157
158
|
|
158
|
-
|
159
|
+
/**
|
160
|
+
* verify response field equation text content
|
161
|
+
* @param {number} equationIndex index of equation
|
162
|
+
* @param {string} equationText equation text content
|
163
|
+
*/
|
164
|
+
verifyResponseFieldEquationText: (equationIndex, equationText) => {
|
165
|
+
essayResponseCommonComponents.responseField()
|
166
|
+
.within(() => {
|
167
|
+
utilities.verifyTextContent(utilities.getNthElement(essayResponseCommonComponents.responseFieldEquation(), equationIndex), equationText)
|
168
|
+
});
|
169
|
+
},
|
170
|
+
|
171
|
+
/**
|
172
|
+
* Open response field equation container equation editor
|
173
|
+
* @param {string} equationText equation text content
|
174
|
+
* @param {number} equationIndex index of equation
|
175
|
+
*/
|
176
|
+
openResponseFieldEquationContainerEquationEditor: (equationIndex) => {
|
177
|
+
essayResponseCommonComponents.responseField()
|
178
|
+
.within(() => {
|
179
|
+
utilities.getNthElement(essayResponseCommonComponents.responseFieldEquation(), equationIndex)
|
180
|
+
.dblclick();
|
181
|
+
});
|
182
|
+
},
|
183
|
+
|
159
184
|
///OLD
|
160
185
|
|
161
186
|
//TODO: need to improve this, we are passing two parameters here, only one should suffice
|
@@ -4,7 +4,7 @@ import { commonComponents } from "./commonComponents";
|
|
4
4
|
import { createQuestionBasePage } from "./createQuestionBasePage";
|
5
5
|
|
6
6
|
const selectors = {
|
7
|
-
insertResponseAreaButton: () => cy.get('
|
7
|
+
insertResponseAreaButton: () => cy.get('[class*="ControlsBtnWrapper"] button').eq(1),
|
8
8
|
selectResponseAreaButton: () => cy.get('button[aria-label*="select"]').eq(0),
|
9
9
|
insertTextAreaButton: () => cy.get('button[aria-label*="insert text"]').eq(0),
|
10
10
|
canvas: () => cy.get('[class*="Canvasstyle__DragAndDropCanvas"]'),
|
@@ -237,7 +237,7 @@ const selectors = {
|
|
237
237
|
//TODO: Student view: Need to remove once https://redmine.zeuslearning.com/issues/556302 is fixed
|
238
238
|
studentAndGradingViewDrawingToolbarOption: (drawingOption = null) => {
|
239
239
|
if (drawingOption) {
|
240
|
-
return cy.get(`.drawing-tool__button[aria-label
|
240
|
+
return cy.get(`.drawing-tool__button[aria-label*="${drawingOption}"]`).eq(0)
|
241
241
|
} else {
|
242
242
|
return cy.get('.drawing-tool__button')
|
243
243
|
}
|