itemengine-cypress-automation 1.0.445-IEI-6684-thinksphere-cypress-fixes-718d310.0 → 1.0.445-IEI-6457-178662c.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,12 +10,13 @@ const sortEnable = ['have.class', 'have.class', 'have.class', 'not.have.class'];
|
|
10
10
|
const sortDisable = ['not.have.class', 'not.have.class', 'not.have.class', 'not.have.class'];
|
11
11
|
const allowedFilterCategories = {
|
12
12
|
'Multiple choice selection': [
|
13
|
-
'
|
14
|
-
'
|
13
|
+
'single selection',
|
14
|
+
'multiple selection'
|
15
15
|
],
|
16
16
|
'Fill in the gaps': [
|
17
17
|
'fill in the gaps with text',
|
18
|
-
'fill in the gaps with drag and drop'
|
18
|
+
'fill in the gaps with drag and drop',
|
19
|
+
'fill in the gaps over image with text'
|
19
20
|
],
|
20
21
|
'Drag and drop': [
|
21
22
|
'drag and drop into categories'
|
@@ -29,6 +30,10 @@ const allowedFilterCategories = {
|
|
29
30
|
'Math response': [
|
30
31
|
'Text Entry Math'
|
31
32
|
],
|
33
|
+
'Graph and chart': [
|
34
|
+
'Graphing',
|
35
|
+
'charts'
|
36
|
+
]
|
32
37
|
};
|
33
38
|
|
34
39
|
describe('Navigate to Think Sphere Browse Review Items page and view the page contents', () => {
|
@@ -37,11 +42,14 @@ describe('Navigate to Think Sphere Browse Review Items page and view the page co
|
|
37
42
|
randomItemName = `~zzz thinksphere item name ${uuid()}`;
|
38
43
|
cy.loginAs('admin');
|
39
44
|
cy.createThinkSphereItem(randomItemName);
|
45
|
+
cy.deleteThinkSphereItem('~zzz item name');
|
46
|
+
cy.createThinkSphereItem('~zzz item name');
|
40
47
|
browseItemsPage.steps.navigateToReviewItemsPage();
|
41
48
|
});
|
42
49
|
|
43
50
|
after(() => {
|
44
51
|
cy.deleteThinkSphereItem(randomItemName);
|
52
|
+
cy.deleteThinkSphereItem('~zzz item name');
|
45
53
|
});
|
46
54
|
|
47
55
|
describe('\'Browse ThinkSphere Review Items\' page header section', () => {
|
@@ -58,6 +66,15 @@ describe('Navigate to Think Sphere Browse Review Items page and view the page co
|
|
58
66
|
/**@TODO Add check for when user click on browse thinksphere review items create item button */
|
59
67
|
});
|
60
68
|
|
69
|
+
it('Info text above filter and search bar should be visible and contain correct information', () => {
|
70
|
+
const supportedQuestion = Object.values(allowedFilterCategories).flat().map(type => {
|
71
|
+
// Capitalize only the first letter of the string
|
72
|
+
return type.charAt(0).toUpperCase() + type.slice(1).toLowerCase();
|
73
|
+
}).join(', ');
|
74
|
+
utilities.verifyElementVisibilityState(browseItemsPage.infoText(), 'exist');
|
75
|
+
utilities.verifyInnerText(browseItemsPage.infoText(), `The list below displays only \"Check your math\" question. The supported question types included are: ${supportedQuestion}.`);
|
76
|
+
});
|
77
|
+
|
61
78
|
it('CSS of \'Browse ThinkSphere Review Items\' page header section', { tags: 'css' }, () => {
|
62
79
|
utilities.verifyCSS(browseItemsPage.browseItemPageHeaderActionWrapper(), {
|
63
80
|
'border-bottom': `1px solid ${css.color.secondaryBtnBorder}`,
|
@@ -73,7 +73,7 @@ describe('Edit Question and edit item', () => {
|
|
73
73
|
cy.deleteThinkSphereItem(uuidString);
|
74
74
|
});
|
75
75
|
|
76
|
-
describe('Edit question',
|
76
|
+
describe('Edit question', () => {
|
77
77
|
abortEarlySetup();
|
78
78
|
it('When user edits the question instructions, then the changes should be saved successfully and edited question instruction should get displayed in preview side', () => {
|
79
79
|
thinkSpherePage.steps.clickOnEditThinkSphereItem();
|
@@ -149,7 +149,7 @@ describe('Edit Question and edit item', () => {
|
|
149
149
|
});
|
150
150
|
});
|
151
151
|
|
152
|
-
describe('Edit review question',
|
152
|
+
describe('Edit review question', () => {
|
153
153
|
abortEarlySetup();
|
154
154
|
before(() => {
|
155
155
|
browseItemsPage.steps.clickOnAddReviewItem();
|
@@ -15,6 +15,7 @@ const selectors = {
|
|
15
15
|
allTableRow: () => cy.get('[data-testid*="MUIDataTableBodyRow"]'),
|
16
16
|
buttonCreateItem: () => cy.get('.browse-item-header-action-wrapper .ngie-btn-contained[role="button"]'),
|
17
17
|
buttonCancelCreateQuestion: () => cy.get('.browse-item-header-action-wrapper .ngie-btn-outlined'),
|
18
|
+
infoText: () => cy.get('[class*="ItemListstyles__InfoWrapperText"]'),
|
18
19
|
tableColumnHeader: (columnNumber) => utilities.getNthElement(cy.get('div[class*="TableHeaderstyles__FlexWrapper"]'), columnNumber),
|
19
20
|
tableRow: (rowNumber) => utilities.getNthElement(cy.get('tr[data-testid*="MUIDataTableBodyRow"]'), rowNumber),
|
20
21
|
itemCellItemTitle: () => utilities.getNthElement(cy.get('td[data-testid*="MuiDataTableBodyCell-0"]').find('button'), 0),
|
@@ -1043,7 +1044,7 @@ const tests = {
|
|
1043
1044
|
|
1044
1045
|
verifySupportedQuestionsInItemsList: (allowedFilterCategories) => {
|
1045
1046
|
it('The items list page should display items for only the supported question types', () => {
|
1046
|
-
const allowedTypes = Object.values(allowedFilterCategories).flat();
|
1047
|
+
const allowedTypes = Object.values(allowedFilterCategories).flat().map(type => type.toLowerCase());
|
1047
1048
|
browseItemsPage.browseItemQuestionItem().each(($item) => {
|
1048
1049
|
cy.wrap($item)
|
1049
1050
|
.invoke('text')
|