itemengine-cypress-automation 1.0.387-IEI-6273-6d750cf.0 → 1.0.387-IEI-6274-d9be2a2.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.
@@ -0,0 +1,140 @@
1
+ import uuid from 'react-uuid';
2
+ import { thinkSpherePage } from "../../../pages";
3
+ import { browseItemsPage } from "../../../pages/components/browseItemsPage";
4
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
5
+ import utilities from "../../../support/helpers/utilities";
6
+ const css = Cypress.env('css');
7
+
8
+ describe('Grading view : ThinkSphere Question - Review Section', () => {
9
+ const uuidString = uuid();
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ cy.createThinkSphereItem(uuidString, true);
13
+ thinkSpherePage.steps.visitThinksphereBrowseItemsPage();
14
+ browseItemsPage.steps.clickOnItemReferenceId(uuidString);
15
+ browseItemsPage.steps.clickOnAddReviewItem();
16
+ thinkSpherePage.steps.createReviewQuestion();
17
+ thinkSpherePage.steps.visitThinksphereBrowseItemsPage();
18
+ browseItemsPage.steps.clickOnActionButton();
19
+ browseItemsPage.steps.clickOnActionMenuItem(0);
20
+ thinkSpherePage.steps.submitResponseAndGotoGradingView();
21
+ thinkSpherePage.steps.clickOnReviewTab();
22
+
23
+ });
24
+
25
+ describe('\'Question instruction\' section', () => {
26
+ abortEarlySetup();
27
+ it('\'Question instruction\' section should be present', () => {
28
+ thinkSpherePage.steps.verifyQuestionInstructionPreviewTexWrapperVisibility('question instruction text');
29
+ });
30
+
31
+ it('CSS of \'Question instruction\' section', { tags: 'css' }, () => {
32
+ utilities.verifyCSS(thinkSpherePage.questionInstructionPreviewTexWrapper(), {
33
+ 'border-radius': '12px',
34
+ 'background-color': css.color.questionInstructionBG,
35
+ 'padding': '10px 170px 10px 27px',
36
+ 'font-size': css.fontSize.default,
37
+ 'font-weight': css.fontWeight.regular,
38
+ });
39
+ });
40
+
41
+ it('Question instruction image should visibile in the preview', () => {
42
+ thinkSpherePage.steps.verifyQuestionInstructionPreviewImageWrapperVisibility();
43
+ });
44
+
45
+ it('CSS of question instruction image section', { tags: 'css' }, () => {
46
+ utilities.verifyCSS(thinkSpherePage.questionInstructionPreviewImageWrapper(), {
47
+ 'width': '143px',
48
+ 'height': '110px',
49
+ 'border': `1px solid ${css.color.secondaryBtnBorder}`,
50
+ 'background-color': css.color.primaryBtn,
51
+ });
52
+ utilities.verifyCSS(thinkSpherePage.questionInstructionPreviewImageExpandButton(), {
53
+ 'width': '24px',
54
+ 'height': '24px',
55
+ 'box-shadow': `${css.color.boxShadow} 0px 2px 8px 0px`,
56
+ 'border': `1px solid ${css.color.figDefaultComponentBorder}`,
57
+ 'border-radius': '4px',
58
+ 'background-color': css.color.primaryBtn,
59
+ });
60
+ });
61
+
62
+ it('When user clicks on expand question instruction image then it should open in the popup', () => {
63
+ thinkSpherePage.steps.clickOnQuestionInstructionExpandImageButton();
64
+ utilities.verifyElementVisibilityState(thinkSpherePage.dialogBoxRoot(), 'visible');
65
+ thinkSpherePage.steps.verifyQuestionImagePopup();
66
+ });
67
+
68
+ it('CSS of question instruction image popup', { tags: 'css' }, () => {
69
+ utilities.verifyCSS(thinkSpherePage.dialogBoxRoot(), {
70
+ 'border-radius': '8px',
71
+ 'border': `1px solid ${css.color.secondaryBtnBorder}`,
72
+ 'box-shadow': `${css.color.dialogBoxBoxShadow} 0px 0px 10px 0px`,
73
+ });
74
+ utilities.verifyCSS(thinkSpherePage.closeExpandImagePopupButton(), {
75
+ 'background-color': css.color.primaryBtn,
76
+ 'font-size': css.fontSize.normal,
77
+ 'font-weight': css.fontWeight.semibold,
78
+ 'border': `1px solid ${css.color.secondaryBtnBorder}`,
79
+ 'color': css.color.primaryBtnBorder,
80
+ });
81
+ });
82
+
83
+ it('When user clicks on close expand image popup button then it should remove the popup', () => {
84
+ thinkSpherePage.steps.clickOnCloseExpandImagePopupButton();
85
+ utilities.verifyElementVisibilityState(thinkSpherePage.dialogBoxRoot(), 'notExist');
86
+ });
87
+ });
88
+
89
+ describe('Verify the Your plan Button', () => {
90
+ abortEarlySetup();
91
+ it('Your Plan button should be visible and display the correct disabled styles', () => {
92
+ utilities.verifyElementVisibilityState(thinkSpherePage.yourPlanButton(), 'visible');
93
+ utilities.verifyCSS(thinkSpherePage.yourPlanButton(), {
94
+ 'background-color' : css.color.boxShadow,
95
+ 'color': css.color.primaryBtnDisabled,
96
+ });
97
+ });
98
+
99
+ it('Your Plan button should have disabled attribute', () => {
100
+ thinkSpherePage.steps.verifyYourPlanButtonInDisableState();
101
+ });
102
+ });
103
+
104
+ describe('\'Check your math\' section', () => {
105
+ abortEarlySetup();
106
+ it('\'Check your math\' section header should be present', () => {
107
+ utilities.verifyElementVisibilityState(thinkSpherePage.checkYourMathHeading(), 'visible');
108
+ utilities.verifyInnerText(thinkSpherePage.checkYourMathHeading(), 'Check your math');
109
+ });
110
+
111
+ it('CSS of \'Check your math\' section header', { tags: 'css' }, () => {
112
+ utilities.verifyCSS(thinkSpherePage.checkYourMathHeading(), {
113
+ 'color': css.color.primaryBtnBorder,
114
+ 'font-size': css.fontSize.heading,
115
+ 'font-weight': css.fontWeight.semibold,
116
+ });
117
+ });
118
+
119
+ it('\'The problem is asking me to\' section should be present', () => {
120
+ utilities.verifyElementVisibilityState(thinkSpherePage.problemAskingToMeTextWrapper(), 'visible');
121
+ utilities.verifyInnerText(thinkSpherePage.problemAskingToMeTextWrapper(), 'The problem is asking me to...');
122
+ });
123
+
124
+ it('Review question should be present', () => {
125
+ utilities.verifyElementVisibilityState(thinkSpherePage.reviewQuestionWrapper(), 'visible');
126
+ });
127
+
128
+ it('CSS of \'The problem is asking me to\' section', { tags: 'css' }, () => {
129
+ utilities.verifyCSS(thinkSpherePage.problemAskingToMeTextWrapper(), {
130
+ 'color': css.color.primaryBtnBorder,
131
+ 'font-size': css.fontSize.normal,
132
+ 'font-weight': css.fontWeight.bold,
133
+ });
134
+ utilities.verifyCSS(thinkSpherePage.reviewComponentWrapper(), {
135
+ 'border': `1px solid ${css.color.secondaryBtnBorder}`,
136
+ 'border-radius': '12px'
137
+ });
138
+ });
139
+ });
140
+ });
@@ -94,4 +94,9 @@ describe('Preview question : ThinkSphere Question - Plan Section - preview tab',
94
94
  utilities.verifyElementVisibilityState(thinkSpherePage.dialogBoxRoot(), 'notExist');
95
95
  });
96
96
  });
97
+
98
+ describe('Verify the Your plan Section', () => {
99
+ abortEarlySetup();
100
+ thinkSpherePage.tests.verifyYourPlanSection();
101
+ });
97
102
  });
@@ -86,6 +86,11 @@ describe('Student view : ThinkSphere Question - Review Section', () => {
86
86
  });
87
87
  });
88
88
 
89
+ describe('Verify the Your plan Section', () => {
90
+ abortEarlySetup();
91
+ thinkSpherePage.tests.verifyYourPlanSection();
92
+ });
93
+
89
94
  describe('\'Check your math\' section', () => {
90
95
  abortEarlySetup();
91
96
  it('\'Check your math\' section header should be present', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.387-IEI-6273-6d750cf.0",
3
+ "version": "1.0.387-IEI-6274-d9be2a2.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {