itemengine-cypress-automation 1.0.37 → 1.0.39
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/FeedbackScale/feedbackScaleAdditionalSettings.js +162 -0
- package/cypress/e2e/ILC/FeedbackScale/feedbackScaleAdditionalSettingsBasic.js +120 -0
- package/cypress/e2e/ILC/FeedbackScale/feedbackScaleColorPopup.js +237 -0
- package/cypress/e2e/ILC/FeedbackScale/feedbackScaleEditTab.js +346 -0
- package/cypress/e2e/ILC/FeedbackScale/feedbackScaleHeaderSection.js +72 -0
- package/cypress/e2e/ILC/FeedbackScale/feedbackScalePreviewTab.js +389 -0
- package/package.json +1 -1
@@ -0,0 +1,389 @@
|
|
1
|
+
import { feedbackScalePage } from "../../../pages/feedbackScalePage";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const optionsContentForButtonLayout = [
|
6
|
+
{
|
7
|
+
'labels': 'Uncomfortable',
|
8
|
+
'color': 'rgb(229, 76, 25)',
|
9
|
+
'tooltip': 'Made me uneasy and unsettled.',
|
10
|
+
'description': 'I am uncomfortable with the learning target.'
|
11
|
+
},
|
12
|
+
{
|
13
|
+
'labels': 'Somewhat comfortable',
|
14
|
+
'color': 'rgb(255, 240, 25)',
|
15
|
+
'tooltip': 'I would like some help.',
|
16
|
+
'description': 'I am somewhat comfortable with the learning target.'
|
17
|
+
},
|
18
|
+
{
|
19
|
+
'labels': 'Comfortable',
|
20
|
+
'color': 'rgb(9, 179, 33)',
|
21
|
+
'tooltip': 'I\'m feeling confident.',
|
22
|
+
'description': 'I am comfortable with the learning target.'
|
23
|
+
}
|
24
|
+
];
|
25
|
+
const optionsContentForStarLayout = [
|
26
|
+
{
|
27
|
+
'labels': '20%',
|
28
|
+
'starsCount': 1,
|
29
|
+
'tooltip': 'Needs improvement',
|
30
|
+
'description': 'Your attempt could be better. Keep practicing!'
|
31
|
+
},
|
32
|
+
{
|
33
|
+
'labels': '40%',
|
34
|
+
'starsCount': 2,
|
35
|
+
'tooltip': 'Getting there',
|
36
|
+
'description': 'You\'ve made progress, but more effort is needed to pass.'
|
37
|
+
},
|
38
|
+
{
|
39
|
+
'labels': '60%',
|
40
|
+
'starsCount': 3,
|
41
|
+
'tooltip': 'Good job',
|
42
|
+
'description': 'You tried well and made a good attempt.'
|
43
|
+
},
|
44
|
+
{
|
45
|
+
'labels': '80%',
|
46
|
+
'starsCount': 4,
|
47
|
+
'tooltip': 'Great work',
|
48
|
+
'description': 'You did an outstanding job and answered all questions correctly!'
|
49
|
+
},
|
50
|
+
{
|
51
|
+
'labels': '100%',
|
52
|
+
'starsCount': 5,
|
53
|
+
'tooltip': 'Excellent',
|
54
|
+
'description': 'Exceptional job! All answers are perfect. You\'re doing amazing!'
|
55
|
+
}
|
56
|
+
];
|
57
|
+
|
58
|
+
describe('Create item page: Feedback scale: Preview tab: \'Button\' and \'Star\' layouts, add, delete option accordion', () => {
|
59
|
+
before(() => {
|
60
|
+
cy.loginAs('admin');
|
61
|
+
});
|
62
|
+
|
63
|
+
describe('Feedback scale - \'Button\' layout style in the preview tab', () => {
|
64
|
+
abortEarlySetup();
|
65
|
+
before(() => {
|
66
|
+
cy.log('Navigate to Feedback scale question type');
|
67
|
+
feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
|
68
|
+
cy.barsPreLoaderWait();
|
69
|
+
feedbackScalePage.steps.expandOptionAccordion(2);
|
70
|
+
feedbackScalePage.steps.focusInTooltipInputField(2);
|
71
|
+
feedbackScalePage.steps.clearTooltipInputField(2);
|
72
|
+
feedbackScalePage.steps.selectImageOptionFromCKEditorToolbar();
|
73
|
+
feedbackScalePage.steps.addImageToInputField();
|
74
|
+
feedbackScalePage.steps.focusInDescriptionInputField(2);
|
75
|
+
feedbackScalePage.steps.clearDescriptionInputField(2);
|
76
|
+
feedbackScalePage.steps.selectBoldOptionFromCKEditorToolbar();
|
77
|
+
feedbackScalePage.steps.addInputToDescriptionInputField(2, 'I\'m very comfortable with the learning target');
|
78
|
+
feedbackScalePage.steps.switchToPreviewTab();
|
79
|
+
});
|
80
|
+
|
81
|
+
it('By default three feedback buttons - \'Uncomfortable\', \'Somewhat comfortable\' and \'Comfortable\' should be displayed', () => {
|
82
|
+
utilities.verifyElementCount(feedbackScalePage.feedbackButton(), 3);
|
83
|
+
optionsContentForButtonLayout.forEach((buttonContent, buttonIndex) => {
|
84
|
+
feedbackScalePage.steps.verifyFeedbackButtonInPreviewTab(buttonIndex, buttonContent.labels);
|
85
|
+
});
|
86
|
+
});
|
87
|
+
|
88
|
+
//Failing due to https://redmine.zeuslearning.com/issues/544606
|
89
|
+
it('CSS of feedback buttons - unselected state', { tags: 'css' }, () => {
|
90
|
+
utilities.verifyCSS(feedbackScalePage.feedbackButton(), {
|
91
|
+
'color': css.color.text,
|
92
|
+
'font-size': css.fontSize.default,
|
93
|
+
'font-weight': css.fontWeight.regular,
|
94
|
+
'background-color': css.color.transparent,
|
95
|
+
'border': `1px solid ${css.color.figDefaultComponentBorder}`
|
96
|
+
});
|
97
|
+
});
|
98
|
+
|
99
|
+
it('Accessibility of preview tab contents', { tags: 'a11y' }, () => {
|
100
|
+
cy.checkAccessibility(feedbackScalePage.previewTabQuestionWrapper());
|
101
|
+
});
|
102
|
+
|
103
|
+
it('When the user hovers overs a feedback button, a tooltip with a color block and tooltip text should be displayed and on moving the focus away from the button, the tooltip should disappear', () => {
|
104
|
+
feedbackScalePage.steps.verifyTooltipFeedbackButton(1, 'I would like some help.');
|
105
|
+
});
|
106
|
+
|
107
|
+
//Failing due to https://redmine.zeuslearning.com/issues/548050
|
108
|
+
it('CSS of feedback button tooltip', { tags: 'css' }, () => {
|
109
|
+
feedbackScalePage.feedbackButton()
|
110
|
+
.eq(1)
|
111
|
+
.trigger('mouseover');
|
112
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.tooltipText(), 'visible');
|
113
|
+
utilities.verifyCSS(feedbackScalePage.tooltipText(), {
|
114
|
+
'background-color': css.color.defaultBackground,
|
115
|
+
'color': css.color.labels,
|
116
|
+
'font-size': css.fontSize.normal,
|
117
|
+
'font-weight': css.fontWeight.regular
|
118
|
+
});
|
119
|
+
feedbackScalePage.feedbackButton()
|
120
|
+
.eq(1)
|
121
|
+
.trigger('mouseout')
|
122
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.tooltipText(), 'notExist');
|
123
|
+
});
|
124
|
+
|
125
|
+
it('Accessibility of feedback button tooltip', { tags: 'a11y' }, () => {
|
126
|
+
feedbackScalePage.feedbackButton()
|
127
|
+
.eq(1)
|
128
|
+
.trigger('mouseover');
|
129
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.tooltipText(), 'visible');
|
130
|
+
cy.checkAccessibility(feedbackScalePage.tooltipText());
|
131
|
+
feedbackScalePage.feedbackButton()
|
132
|
+
.eq(1)
|
133
|
+
.trigger('mouseout')
|
134
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.tooltipText(), 'notExist');
|
135
|
+
});
|
136
|
+
|
137
|
+
it('When the user has added an image in the tooltip input field, the image should be displayed on the tooltip when the user hovers over the feedback button and on moving the focus away from the button, the tooltip should disappear', () => {
|
138
|
+
feedbackScalePage.steps.verifyTooltipImageFeedbackButton(2);
|
139
|
+
});
|
140
|
+
|
141
|
+
it('A \'More info\' accordion should be present and by default it should be in collapsed state', () => {
|
142
|
+
utilities.verifyInnerText(feedbackScalePage.moreInfoButton(), 'More info');
|
143
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.moreInfoButton(), 'visible');
|
144
|
+
feedbackScalePage.steps.verifyMoreInfoAccordionInCollapsedState();
|
145
|
+
});
|
146
|
+
|
147
|
+
//Failing due to https://redmine.zeuslearning.com/issues/544612
|
148
|
+
it('When the user expands the \'More info\' accordion, additional information about the feedback buttons should be displayed', () => {
|
149
|
+
feedbackScalePage.steps.expandMoreInfoAccordion();
|
150
|
+
for (let index = 0; index < optionsContentForButtonLayout.length - 1; index++) {
|
151
|
+
feedbackScalePage.steps.verifyMoreInfoAccordionColorBlock(index, optionsContentForButtonLayout[index].color);
|
152
|
+
feedbackScalePage.steps.verifyMoreInfoAccordionOptionsListLabelTooltipAndDescription(index, [optionsContentForButtonLayout[index].labels, optionsContentForButtonLayout[index].tooltip, optionsContentForButtonLayout[index].description]);
|
153
|
+
}
|
154
|
+
feedbackScalePage.steps.verifyMoreInfoAccordionColorBlock(2, optionsContentForButtonLayout[2].color);
|
155
|
+
feedbackScalePage.steps.verifyMoreInfoOptionListLabelTooltipAndDescriptionForImageTooltipAndBoldDescription(2);
|
156
|
+
});
|
157
|
+
|
158
|
+
it('The user should be able to mark feedback by clicking on any feedback button and when the user selects a feedback button, the more info contents of the particular feedback button should get highlighted', () => {
|
159
|
+
feedbackScalePage.steps.clickOnFeedbackButton(0);
|
160
|
+
feedbackScalePage.steps.verifyFeedbackButtonSelectedState(0);
|
161
|
+
feedbackScalePage.steps.verifyMoreInfoOptionListHighlightedState(0);
|
162
|
+
});
|
163
|
+
|
164
|
+
it('CSS of feedback buttons - selected state', { tags: 'css' }, () => {
|
165
|
+
utilities.verifyCSS(feedbackScalePage.feedbackButton().eq(0), {
|
166
|
+
'color': css.color.text,
|
167
|
+
'font-size': css.fontSize.default,
|
168
|
+
'font-weight': css.fontWeight.regular,
|
169
|
+
'background-color': css.color.liTextSelectedBg,
|
170
|
+
'border-color': `${css.color.activeComponentBorder}`
|
171
|
+
});
|
172
|
+
});
|
173
|
+
|
174
|
+
it('Accessibility of feedback buttons - selected state', { tags: 'a11y' }, () => {
|
175
|
+
cy.checkAccessibility(feedbackScalePage.previewTabQuestionWrapper());
|
176
|
+
});
|
177
|
+
|
178
|
+
it('When the user clicks on any other feedback button, then the previously selected button should return to default state', () => {
|
179
|
+
feedbackScalePage.steps.clickOnFeedbackButton(1);
|
180
|
+
feedbackScalePage.steps.verifyFeedbackButtonSelectedState(1);
|
181
|
+
feedbackScalePage.steps.verifyFeedbackButtonUnselectedState(0);
|
182
|
+
feedbackScalePage.steps.verifyMoreInfoOptionListHighlightedState(1);
|
183
|
+
feedbackScalePage.steps.verifyMoreInfoOptionListHighlightedStateNotExists(0);
|
184
|
+
});
|
185
|
+
});
|
186
|
+
|
187
|
+
describe('Feedback scale - \'Star\' layout style in the preview tab', () => {
|
188
|
+
abortEarlySetup();
|
189
|
+
before(() => {
|
190
|
+
cy.log('Navigate to Feedback scale question type');
|
191
|
+
feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
|
192
|
+
cy.barsPreLoaderWait();
|
193
|
+
feedbackScalePage.steps.clickOnFeedbackStyleLayoutDropdown();
|
194
|
+
feedbackScalePage.steps.selectFeedbackStyleLayoutDropdown('Star');
|
195
|
+
feedbackScalePage.steps.expandOptionAccordion(4);
|
196
|
+
feedbackScalePage.steps.focusInTooltipInputField(4);
|
197
|
+
feedbackScalePage.steps.clearTooltipInputField(4);
|
198
|
+
feedbackScalePage.steps.selectBoldOptionFromCKEditorToolbar();
|
199
|
+
feedbackScalePage.steps.addInputToTooltipInputField(4, 'Keep up the good work!');
|
200
|
+
feedbackScalePage.steps.focusInDescriptionInputField(4);
|
201
|
+
feedbackScalePage.steps.clearDescriptionInputField(4);
|
202
|
+
feedbackScalePage.steps.selectImageOptionFromCKEditorToolbar();
|
203
|
+
feedbackScalePage.steps.addImageToInputField();
|
204
|
+
feedbackScalePage.steps.switchToPreviewTab();
|
205
|
+
});
|
206
|
+
|
207
|
+
it('By default five stars should be displayed in the preview tab', () => {
|
208
|
+
utilities.verifyElementCount(feedbackScalePage.feedbackStarButton(), 5);
|
209
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.feedbackStarButton(), 'visible');
|
210
|
+
});
|
211
|
+
|
212
|
+
it('CSS of feedback stars - unselected state', { tags: 'css' }, () => {
|
213
|
+
utilities.verifyCSS(feedbackScalePage.feedbackStarButton().find('svg'), {
|
214
|
+
'fill': css.color.defaultBackground,
|
215
|
+
'stroke': css.color.feedbackStar,
|
216
|
+
});
|
217
|
+
});
|
218
|
+
|
219
|
+
it('Accessibility of preview tab contents', { tags: 'a11y' }, () => {
|
220
|
+
cy.checkAccessibility(feedbackScalePage.previewTabQuestionWrapper());
|
221
|
+
});
|
222
|
+
|
223
|
+
it('When the user hovers overs a feedback star button, a tooltip with text should be displayed and on moving the focus away from the button, the tooltip should disappear', () => {
|
224
|
+
feedbackScalePage.steps.verifyTooltipFeedbackStarButton(1, 'Getting there');
|
225
|
+
});
|
226
|
+
|
227
|
+
//Failing due to https://redmine.zeuslearning.com/issues/548050
|
228
|
+
it('CSS of feedback star button tooltip', { tags: 'css' }, () => {
|
229
|
+
feedbackScalePage.feedbackStarButton()
|
230
|
+
.eq(1)
|
231
|
+
.trigger('mouseover');
|
232
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.tooltipText(), 'visible');
|
233
|
+
utilities.verifyCSS(feedbackScalePage.tooltipText(), {
|
234
|
+
'background-color': css.color.defaultBackground,
|
235
|
+
'color': css.color.labels,
|
236
|
+
'font-size': css.fontSize.normal,
|
237
|
+
'font-weight': css.fontWeight.regular
|
238
|
+
});
|
239
|
+
feedbackScalePage.feedbackStarButton()
|
240
|
+
.eq(1)
|
241
|
+
.trigger('mouseout')
|
242
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.tooltipText(), 'notExist');
|
243
|
+
|
244
|
+
});
|
245
|
+
|
246
|
+
it('Accessibility of feedback star button tooltip', { tags: 'a11y' }, () => {
|
247
|
+
feedbackScalePage.feedbackStarButton()
|
248
|
+
.eq(1)
|
249
|
+
.trigger('mouseover');
|
250
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.tooltipText(), 'visible');
|
251
|
+
cy.checkAccessibility(feedbackScalePage.tooltipText());
|
252
|
+
feedbackScalePage.feedbackStarButton()
|
253
|
+
.eq(1)
|
254
|
+
.trigger('mouseout')
|
255
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.tooltipText(), 'notExist');
|
256
|
+
});
|
257
|
+
|
258
|
+
it('When the user has added bold text in the tooltip input field, the bold text should be displayed on the tooltip when the user hovers over the feedback star button, and on moving the focus away from the button, the tooltip should disappear', () => {
|
259
|
+
feedbackScalePage.steps.verifyTooltipBoldTextFeedbackStarButton(4, 'Keep up the good work!');
|
260
|
+
});
|
261
|
+
|
262
|
+
it('A \'More info\' accordion should be present and by default it should be in collapsed state', () => {
|
263
|
+
utilities.verifyInnerText(feedbackScalePage.moreInfoButton(), 'More info');
|
264
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.moreInfoButton(), 'visible');
|
265
|
+
feedbackScalePage.steps.verifyMoreInfoAccordionInCollapsedState();
|
266
|
+
});
|
267
|
+
|
268
|
+
it('When the user expands the \'More info\' accordion, additional information about the feedback star buttons should be displayed', () => {
|
269
|
+
feedbackScalePage.steps.expandMoreInfoAccordion();
|
270
|
+
for (let index = 0; index < optionsContentForStarLayout.length - 1; index++) {
|
271
|
+
feedbackScalePage.steps.verifyMoreInfoAccordionStarIcons(index, optionsContentForStarLayout[index].starsCount);
|
272
|
+
feedbackScalePage.steps.verifyMoreInfoAccordionOptionsListLabelTooltipAndDescription(index, [optionsContentForStarLayout[index].labels, optionsContentForStarLayout[index].tooltip, optionsContentForStarLayout[index].description]);
|
273
|
+
}
|
274
|
+
feedbackScalePage.steps.verifyMoreInfoAccordionStarIcons(4, optionsContentForStarLayout[4].starsCount);
|
275
|
+
feedbackScalePage.steps.verifyMoreInfoOptionListLabelTooltipAndDescriptionForBoldTooltipAndImageDescription(4);
|
276
|
+
});
|
277
|
+
|
278
|
+
//TODO: Need to update selected state function for feedback star when https://redmine.zeuslearning.com/issues/538420 gets resolved
|
279
|
+
it('The user should be able to mark feedback by clicking on any feedback star button and when the user selects a feedback star button, the more info contents of the particular feedback star button should get highlighted', () => {
|
280
|
+
feedbackScalePage.steps.clickOnFeedbackStarButton(3);
|
281
|
+
feedbackScalePage.steps.verifyFeedbackStarButtonSelectedState([0, 1, 2, 3], css.color.feedbackStar);
|
282
|
+
feedbackScalePage.steps.verifyFeedbackStarButtonUnselectedState([4]);
|
283
|
+
feedbackScalePage.steps.verifyMoreInfoOptionListHighlightedState(3);
|
284
|
+
});
|
285
|
+
|
286
|
+
it('CSS of feedback stars - selected state', { tags: 'css' }, () => {
|
287
|
+
utilities.verifyCSS(feedbackScalePage.feedbackStarButton().find('svg'), {
|
288
|
+
'fill': css.color.feedbackStar,
|
289
|
+
'stroke': css.color.feedbackStar,
|
290
|
+
});
|
291
|
+
});
|
292
|
+
|
293
|
+
it('Accessibility of feedback stars - selected state', { tags: 'a11y' }, () => {
|
294
|
+
cy.checkAccessibility(feedbackScalePage.previewTabQuestionWrapper());
|
295
|
+
});
|
296
|
+
|
297
|
+
it('When the user clicks on any other feedback star, then the selected state of feedback stars should get updated accordingly', () => {
|
298
|
+
feedbackScalePage.steps.clickOnFeedbackStarButton(2);
|
299
|
+
feedbackScalePage.steps.verifyFeedbackStarButtonSelectedState([0, 1, 2], css.color.feedbackStar);
|
300
|
+
feedbackScalePage.steps.verifyFeedbackStarButtonUnselectedState([3, 4]);
|
301
|
+
feedbackScalePage.steps.verifyMoreInfoOptionListHighlightedState(2);
|
302
|
+
feedbackScalePage.steps.verifyMoreInfoOptionListHighlightedStateNotExists(3);
|
303
|
+
});
|
304
|
+
});
|
305
|
+
|
306
|
+
describe('Feedback scale - Add, delete option accordions - preview tab for \'Button\' layout style', () => {
|
307
|
+
abortEarlySetup();
|
308
|
+
before(() => {
|
309
|
+
cy.log('Navigate to Feedback scale question type');
|
310
|
+
feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
|
311
|
+
cy.barsPreLoaderWait();
|
312
|
+
});
|
313
|
+
|
314
|
+
it('When the user adds a new option, a new feedback button should be displayed in the preview tab', () => {
|
315
|
+
feedbackScalePage.steps.addOption();
|
316
|
+
feedbackScalePage.steps.switchToPreviewTab();
|
317
|
+
utilities.verifyElementCount(feedbackScalePage.feedbackButton(), 4);
|
318
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.feedbackButton(), 'visible');
|
319
|
+
});
|
320
|
+
|
321
|
+
it('CSS of the newly added feedback button', { tags: 'css' }, () => {
|
322
|
+
utilities.verifyCSS(feedbackScalePage.feedbackButton().eq(3), {
|
323
|
+
'color': css.color.text,
|
324
|
+
'font-size': css.fontSize.default,
|
325
|
+
'font-weight': css.fontWeight.regular,
|
326
|
+
'background-color': css.color.transparent,
|
327
|
+
'border': `1px solid ${css.color.figDefaultComponentBorder}`
|
328
|
+
});
|
329
|
+
});
|
330
|
+
|
331
|
+
it('When the user hovers over the new feedback button, a tooltip with #00007C color block should be displayed on the tooltip', () => {
|
332
|
+
feedbackScalePage.steps.verifyTooltipFeedbackButton(3, '');
|
333
|
+
});
|
334
|
+
|
335
|
+
it('When the user deletes an option accordion, then the corresponding feedback star should get removed from the preview tab', () => {
|
336
|
+
feedbackScalePage.steps.switchToEditTab();
|
337
|
+
feedbackScalePage.steps.deleteOptionAccordion(3);
|
338
|
+
feedbackScalePage.steps.switchToPreviewTab();
|
339
|
+
utilities.verifyElementCount(feedbackScalePage.feedbackButton(), 3);
|
340
|
+
feedbackScalePage.steps.expandMoreInfoAccordion();
|
341
|
+
for (let index = 0; index < 3; index++) {
|
342
|
+
feedbackScalePage.steps.verifyMoreInfoAccordionColorBlock(index, optionsContentForButtonLayout[index].color);
|
343
|
+
feedbackScalePage.steps.verifyMoreInfoAccordionOptionsListLabelTooltipAndDescription(index, [optionsContentForButtonLayout[index].labels, optionsContentForButtonLayout[index].tooltip, optionsContentForButtonLayout[index].description]);
|
344
|
+
}
|
345
|
+
});
|
346
|
+
});
|
347
|
+
|
348
|
+
describe('Feedback scale - Add, delete option accordions- preview tab for \'Star\' layout style', () => {
|
349
|
+
abortEarlySetup();
|
350
|
+
before(() => {
|
351
|
+
cy.log('Navigate to Feedback scale question type');
|
352
|
+
feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
|
353
|
+
cy.barsPreLoaderWait();
|
354
|
+
feedbackScalePage.steps.clickOnFeedbackStyleLayoutDropdown();
|
355
|
+
feedbackScalePage.steps.selectFeedbackStyleLayoutDropdown('Star');
|
356
|
+
});
|
357
|
+
|
358
|
+
it('When the user adds a new option, a new feedback star should be displayed in the preview tab', () => {
|
359
|
+
feedbackScalePage.steps.addOption();
|
360
|
+
feedbackScalePage.steps.switchToPreviewTab();
|
361
|
+
utilities.verifyElementCount(feedbackScalePage.feedbackStarButton(), 6);
|
362
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.feedbackStarButton(), 'visible');
|
363
|
+
});
|
364
|
+
|
365
|
+
it('CSS of the newly added feedback star', { tags: 'css' }, () => {
|
366
|
+
utilities.verifyCSS(feedbackScalePage.feedbackStarButton().eq(5).find('svg'), {
|
367
|
+
'fill': css.color.defaultBackground,
|
368
|
+
'stroke': css.color.secondaryBtn,
|
369
|
+
});
|
370
|
+
});
|
371
|
+
|
372
|
+
it('When the user hovers over the new feedback star, a blank tooltip should be displayed', () => {
|
373
|
+
feedbackScalePage.steps.verifyTooltipFeedbackStarButton(5, '');
|
374
|
+
});
|
375
|
+
|
376
|
+
//Failing due to https://redmine.zeuslearning.com/issues/544612
|
377
|
+
it('When the user deletes an option accordion, then the corresponding feedback star should get removed from the preview tab', () => {
|
378
|
+
feedbackScalePage.steps.switchToEditTab();
|
379
|
+
feedbackScalePage.steps.deleteOptionAccordion(5);
|
380
|
+
feedbackScalePage.steps.switchToPreviewTab();
|
381
|
+
utilities.verifyElementCount(feedbackScalePage.feedbackStarButton(), 5);
|
382
|
+
feedbackScalePage.steps.expandMoreInfoAccordion();
|
383
|
+
for (let index = 0; index < 5; index++) {
|
384
|
+
feedbackScalePage.steps.verifyMoreInfoAccordionStarIcons(index, optionsContentForStarLayout[index].starsCount);
|
385
|
+
feedbackScalePage.steps.verifyMoreInfoAccordionOptionsListLabelTooltipAndDescription(index, [optionsContentForStarLayout[index].labels, optionsContentForStarLayout[index].tooltip, optionsContentForStarLayout[index].description]);
|
386
|
+
}
|
387
|
+
});
|
388
|
+
});
|
389
|
+
});
|