itemengine-cypress-automation 1.0.446-IEI-6684-thinksphere-cypress-fixes-6d5fbc9.0 → 1.0.446

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
- 'multiple selection',
14
- 'single selection'
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}`,
@@ -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')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.446-IEI-6684-thinksphere-cypress-fixes-6d5fbc9.0",
3
+ "version": "1.0.446",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -52,4 +52,4 @@
52
52
  "devDependencies": {
53
53
  "@applitools/eyes-cypress": "^3.47.0"
54
54
  }
55
- }
55
+ }