itemengine-cypress-automation 1.0.151-28MarchRepoUpdate-20de036.0 → 1.0.152-28th-March-fixes-6236e0e.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabScoring.js +1 -0
- package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +2 -2
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +25 -25
- package/cypress/e2e/ILC/GridFill/customizeLayoutSectionShadeCellsGridBorders.js +506 -0
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingGroupedScoring.js +155 -0
- package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +143 -0
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Matching/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Matching/draggableOptions.js +180 -0
- package/cypress/e2e/ILC/Matching/editTabScoring.js +221 -0
- package/cypress/e2e/ILC/Matching/manuallyAndNonScoredEditTab.js +68 -0
- package/cypress/e2e/ILC/Matching/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/Matching/switchingCasesBetweenOptionsLayout.js +49 -0
- package/cypress/fixtures/theme/ilc.json +7 -1
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/optionsWrapperComponent.js +1 -1
- package/cypress/pages/contentBlocksPage.js +30 -1
- package/cypress/pages/createItemPage.js +1 -1
- package/cypress/pages/essayResponsePage.js +1 -1
- package/cypress/pages/graphingPage.js +29 -29
- package/cypress/pages/gridFillPage.js +663 -15
- package/cypress/pages/itemPreviewSettingsPage.js +3 -3
- package/cypress/pages/matchingPage.js +466 -5
- package/cypress/pages/shortTextResponsePage.js +1 -0
- package/cypress/pages/textEntryMathPage.js +1 -1
- package/cypress/pages/textEntryMathWithImagePage.js +1 -1
- package/package.json +1 -1
@@ -0,0 +1,506 @@
|
|
1
|
+
import { gridFillPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create item page - Grid fill: Customize layout section - \'Shade the cell\' and \'Grid borders\'', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('\'Shade the cells\' section and Canvas title - Contents and edit tab functionality', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
});
|
17
|
+
|
18
|
+
it('By default the \'Customize layout\' accordion should be in collapsed state', () => {
|
19
|
+
gridFillPage.steps.verifyCustomizeLayoutAccordionIsCollapsed();
|
20
|
+
});
|
21
|
+
|
22
|
+
it('User should be able to expand the \'Customize layout\' accordion', () => {
|
23
|
+
gridFillPage.steps.clickOnCustomizeLayoutAccordionButton();
|
24
|
+
gridFillPage.steps.verifyCustomizeLayoutAccordionIsExpanded();
|
25
|
+
});
|
26
|
+
|
27
|
+
it('\'Shade the cells\' label, \'Shade cell\' and \'Hide cell\' toggle buttons should be displayed and \'Shade cell\' should be selected by default', () => {
|
28
|
+
utilities.verifyInnerText(gridFillPage.shadeTheCellLabel(), 'Shade the cells');
|
29
|
+
utilities.verifyElementVisibilityState(gridFillPage.shadeTheCellLabel(), 'visible');
|
30
|
+
utilities.verifyInnerText(gridFillPage.shadeCellButton(), 'Shade cell');
|
31
|
+
utilities.verifyElementVisibilityState(gridFillPage.shadeCellButton(), 'visible');
|
32
|
+
utilities.verifyInnerText(gridFillPage.hideCellButton(), 'Hide cell');
|
33
|
+
utilities.verifyElementVisibilityState(gridFillPage.hideCellButton(), 'visible');
|
34
|
+
gridFillPage.steps.verifyShadeCellButtonIsSelected();
|
35
|
+
gridFillPage.steps.verifyHideCellButtonIsNotSelected();
|
36
|
+
});
|
37
|
+
|
38
|
+
it('Default grid should be displayed in \'Shade the cells\' section', () => {
|
39
|
+
gridFillPage.steps.verifyDefaultGridInCustomizeLayoutSection();
|
40
|
+
});
|
41
|
+
|
42
|
+
it('When \'Shade cell\' toggle button is selected and user clicks on an unshaded cell, then that cell should be shaded', () => {
|
43
|
+
gridFillPage.steps.shadeCell(0, 0);
|
44
|
+
});
|
45
|
+
|
46
|
+
it('When user has shaded a cell in customize layout section, then that corresponding cell should not be shaded in \'Specify correct answer\' section grid', () => {
|
47
|
+
gridFillPage.steps.verifyCellNotSelectedSpecifyCorrectAnswerSection(0, 0);
|
48
|
+
});
|
49
|
+
|
50
|
+
it('When \'Shade cell\' toggle button is selected and user clicks on a shaded cell, then that cell should be unshaded', () => {
|
51
|
+
gridFillPage.steps.unShadeCell(0, 0);
|
52
|
+
});
|
53
|
+
|
54
|
+
it('User should be able to select \'Hide cell\' toggle button', () => {
|
55
|
+
gridFillPage.steps.selectHideCellButton();
|
56
|
+
});
|
57
|
+
|
58
|
+
it('When \'Hide cell\' toggle button is selected and user clicks on an cell, then that cell should be hidden', () => {
|
59
|
+
gridFillPage.steps.hideCell(1, 1);
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When user has hidden a cell in customize layout section, then that corresponding cell should also be hidden in \'Specify correct answer\' section grid', () => {
|
63
|
+
gridFillPage.steps.verifyHideCustomizedCellSpecifyCorrectAnswerSection(1, 1);
|
64
|
+
});
|
65
|
+
|
66
|
+
it('When \'Hide cell\' toggle button is selected and user clicks on a hidden cell, then that cell should be displayed', () => {
|
67
|
+
gridFillPage.steps.unHideCell(1, 1);
|
68
|
+
});
|
69
|
+
|
70
|
+
it('When user unhides a cell in customize layout section, then that corresponding cell should also be displayed in \'Specify correct answer\' section grid', () => {
|
71
|
+
gridFillPage.steps.verifyCellNotHiddenSpecifyCorrectAnswerSection(1, 1);
|
72
|
+
});
|
73
|
+
|
74
|
+
it('\'Lock shaded cells\' and \'Outline cell on hover\' checkbox and labels should be displayed and \'Outline cell on hover\' checkbox should be checked by default', () => {
|
75
|
+
utilities.verifyInnerText(gridFillPage.lockShadedCellsLabel(), 'Lock shaded cells');
|
76
|
+
utilities.verifyElementVisibilityState(gridFillPage.lockShadedCellsLabel(), 'visible');
|
77
|
+
utilities.verifyElementVisibilityState(gridFillPage.lockShadedCellsCheckbox(), 'exist');
|
78
|
+
utilities.verifyInnerText(gridFillPage.outlineCellOnHoverLabel(), 'Outline cell on hover');
|
79
|
+
utilities.verifyElementVisibilityState(gridFillPage.outlineCellOnHoverLabel(), 'visible');
|
80
|
+
utilities.verifyElementVisibilityState(gridFillPage.outlineCellOnHoverCheckbox(), 'exist');
|
81
|
+
gridFillPage.steps.verifyLockShadedCellsCheckboxIsUnchecked();
|
82
|
+
gridFillPage.steps.verifyOutlineCellOnHoverCheckboxIsChecked();
|
83
|
+
});
|
84
|
+
|
85
|
+
it('User should be able to check and uncheck \'Lock shaded cells\' checkbox', () => {
|
86
|
+
gridFillPage.steps.checkLockShadedCellsCheckbox();
|
87
|
+
gridFillPage.steps.uncheckLockShadedCellsCheckbox();
|
88
|
+
});
|
89
|
+
|
90
|
+
it('When the user unchecks \'Outline cell on hover\' checkbox, then hover state should not be displayed when author hovers on cells in grid of customize layout and specify correct answer section', () => {
|
91
|
+
gridFillPage.steps.uncheckOutlineCellOnHoverCheckbox();
|
92
|
+
gridFillPage.steps.verifyCellIsNotInteractiveForHoverInCustomizeLayoutSection(2, 2);
|
93
|
+
gridFillPage.steps.verifyCellIsNotInteractiveForHoverInSpecifyCorrectAnswerSection(2, 2);
|
94
|
+
});
|
95
|
+
|
96
|
+
it('When the user checks \'Outline cell on hover\' checkbox, then hover state should be displayed when author hovers on cells in grid of customize layout and specify correct answer section', () => {
|
97
|
+
gridFillPage.steps.checkOutlineCellOnHoverCheckbox();
|
98
|
+
gridFillPage.steps.verifyCellIsInteractiveForHoverInCustomizeLayoutSection(2, 2);
|
99
|
+
gridFillPage.steps.verifyCellIsInteractiveForHoverInSpecifyCorrectAnswerSection(2, 2);
|
100
|
+
});
|
101
|
+
|
102
|
+
it('\'Canvas title\' label and empty input field should be displayed and user should be able to give input in the input field', () => {
|
103
|
+
utilities.verifyInnerText(gridFillPage.canvasTitleLabel(), 'Canvas title');
|
104
|
+
utilities.verifyElementVisibilityState(gridFillPage.canvasTitleLabel(), 'visible');
|
105
|
+
utilities.verifyElementVisibilityState(gridFillPage.canvasTitleInputField(), 'visible');
|
106
|
+
utilities.verifyInputFieldValue(gridFillPage.canvasTitleInputField(), '');
|
107
|
+
gridFillPage.steps.addInputToCanvasTitleInputField('Canvas title');
|
108
|
+
});
|
109
|
+
|
110
|
+
it('When user has made changes in \'Shade the cells\' section and closes and reopens the customize layout accordion, then the changes should be retained', () => {
|
111
|
+
gridFillPage.steps.selectShadeCellButton();
|
112
|
+
gridFillPage.steps.shadeCell(0, 0);
|
113
|
+
gridFillPage.steps.selectHideCellButton();
|
114
|
+
gridFillPage.steps.hideCell(0, 1);
|
115
|
+
gridFillPage.steps.clickOnCustomizeLayoutAccordionButton();
|
116
|
+
gridFillPage.steps.verifyCustomizeLayoutAccordionIsCollapsed();
|
117
|
+
gridFillPage.steps.clickOnCustomizeLayoutAccordionButton();
|
118
|
+
gridFillPage.steps.verifyHideCellButtonIsSelected();
|
119
|
+
gridFillPage.steps.verifyCellIsShadedCustomizeLayoutSection(0, 0);
|
120
|
+
gridFillPage.steps.verifyCellNotShadedCustomizeLayoutSection(0, 1);
|
121
|
+
gridFillPage.steps.verifyOutlineCellOnHoverCheckboxIsChecked();
|
122
|
+
utilities.verifyInputFieldValue(gridFillPage.canvasTitleInputField(), 'Canvas title');
|
123
|
+
});
|
124
|
+
|
125
|
+
it('CSS of customize layout section and different grid cells in specify correct answer section', { tags: 'css' }, () => {
|
126
|
+
utilities.verifyCSS(gridFillPage.customizeLayoutLabel(), {
|
127
|
+
'color': css.color.accordionLabel,
|
128
|
+
'font-size': css.fontSize.heading,
|
129
|
+
'font-weight': css.fontWeight.bold
|
130
|
+
});
|
131
|
+
utilities.verifyCSS(gridFillPage.customizeLayoutAccordionChevronButton().find('svg'), {
|
132
|
+
'fill': css.color.activeButtons
|
133
|
+
});
|
134
|
+
utilities.verifyCSS(gridFillPage.customizeLayoutLabel(), {
|
135
|
+
'color': css.color.accordionLabel,
|
136
|
+
'font-size': css.fontSize.heading,
|
137
|
+
'font-weight': css.fontWeight.bold
|
138
|
+
});
|
139
|
+
utilities.verifyCSS(gridFillPage.shadeTheCellLabel(), {
|
140
|
+
'color': css.color.labels,
|
141
|
+
'font-size': css.fontSize.big,
|
142
|
+
'font-weight': css.fontWeight.bold
|
143
|
+
});
|
144
|
+
utilities.verifyCSS(gridFillPage.shadeCellButton(), {
|
145
|
+
'color': css.color.UnselectedToggleButton,
|
146
|
+
'font-size': css.fontSize.normal,
|
147
|
+
'font-weight': css.fontWeight.bold
|
148
|
+
});
|
149
|
+
utilities.verifyCSS(gridFillPage.hideCellButton(), {
|
150
|
+
'color': css.color.whiteText,
|
151
|
+
'font-size': css.fontSize.normal,
|
152
|
+
'font-weight': css.fontWeight.bold,
|
153
|
+
'background-color': css.color.toggleButtonSelectedBg
|
154
|
+
});
|
155
|
+
//Shaded cell
|
156
|
+
gridFillPage.steps.selectShadeCellButton();
|
157
|
+
gridFillPage.steps.shadeCell(0, 0);
|
158
|
+
utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), 0), {
|
159
|
+
'background-color': css.color.toggleButtonSelectedBg,
|
160
|
+
'border-color': css.color.gridCellSelectedStateBorder
|
161
|
+
});
|
162
|
+
utilities.verifyCSS(gridFillPage.shadedCellIcon().eq(0).find('line'), {
|
163
|
+
'stroke': css.color.gridCellIcon
|
164
|
+
});
|
165
|
+
//Hidden cell
|
166
|
+
gridFillPage.steps.selectHideCellButton();
|
167
|
+
gridFillPage.steps.hideCell(0, 1);
|
168
|
+
utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), 1), {
|
169
|
+
'border-color': css.color.gridCellHiddenStateBorder,
|
170
|
+
'background-color': css.color.defaultBackground
|
171
|
+
});
|
172
|
+
utilities.verifyCSS(gridFillPage.hiddenCellIcon().find('path'), {
|
173
|
+
'stroke': css.color.gridCellIcon
|
174
|
+
});
|
175
|
+
utilities.verifyCSS(gridFillPage.lockShadedCellsLabel(), {
|
176
|
+
'color': css.color.labels,
|
177
|
+
'font-size': css.fontSize.normal,
|
178
|
+
'font-weight': css.fontWeight.bold
|
179
|
+
});
|
180
|
+
utilities.verifyCSS(gridFillPage.outlineCellOnHoverLabel(), {
|
181
|
+
'color': css.color.labels,
|
182
|
+
'font-size': css.fontSize.normal,
|
183
|
+
'font-weight': css.fontWeight.bold
|
184
|
+
});
|
185
|
+
utilities.verifyCSS(gridFillPage.outlineCellOnHoverCheckbox().parent().find('.ngie-checkbox g').eq(1), {
|
186
|
+
'fill': css.color.activeButtons
|
187
|
+
});
|
188
|
+
utilities.verifyCSS(gridFillPage.canvasTitleLabel(), {
|
189
|
+
'color': css.color.labels,
|
190
|
+
'font-size': css.fontSize.default,
|
191
|
+
'font-weight': css.fontWeight.semibold
|
192
|
+
});
|
193
|
+
utilities.verifyCSS(gridFillPage.canvasTitleInputField(), {
|
194
|
+
'color': css.color.text,
|
195
|
+
'font-size': css.fontSize.default,
|
196
|
+
'font-weight': css.fontWeight.regular
|
197
|
+
});
|
198
|
+
});
|
199
|
+
|
200
|
+
it('Accessibility of customize layout section', { tags: 'a11y' }, () => {
|
201
|
+
cy.checkAccessibility(gridFillPage.customizeLayoutLabel().parents('.customize-layout-wrapper-cls'));
|
202
|
+
});
|
203
|
+
});
|
204
|
+
|
205
|
+
describe('\'Shade the cells\' section and \'Canvas title\' - preview tab functionality', () => {
|
206
|
+
abortEarlySetup();
|
207
|
+
before(() => {
|
208
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
209
|
+
cy.barsPreLoaderWait();
|
210
|
+
gridFillPage.steps.clickOnCustomizeLayoutAccordionButton();
|
211
|
+
gridFillPage.steps.shadeCell(0, 0);
|
212
|
+
gridFillPage.steps.switchToPreviewTab();
|
213
|
+
});
|
214
|
+
|
215
|
+
it('When \'Lock shaded cells\' checkbox is unchecked and user shades a cell in \'Customize layout\' section, then user should be able to unshade the cell in preview tab', () => {
|
216
|
+
gridFillPage.steps.unselectCellPreviewTab(0, 0);
|
217
|
+
gridFillPage.steps.verifyCellNotSelectedPreviewTab(0, 0);
|
218
|
+
});
|
219
|
+
|
220
|
+
it('When \'Lock shaded cells\' checkbox is checked and user shades a cell in \'Customize layout\' section, then user should not be able to unshade the cell in preview tab', () => {
|
221
|
+
gridFillPage.steps.switchToEditTab();
|
222
|
+
gridFillPage.steps.checkLockShadedCellsCheckbox();
|
223
|
+
gridFillPage.steps.switchToPreviewTab();
|
224
|
+
gridFillPage.steps.unselectCellPreviewTab(0, 0);
|
225
|
+
gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
|
226
|
+
});
|
227
|
+
|
228
|
+
it('When the \'Outline cell on hover\' checkbox is checked, then hover state should be displayed when author hovers on cells in preview tab', () => {
|
229
|
+
gridFillPage.steps.verifyCellIsInteractiveForHoverInPreviewTab(2, 2);
|
230
|
+
});
|
231
|
+
|
232
|
+
it('When the user unchecks \'Outline cell on hover\' checkbox, then hover state should not be displayed when author hovers on cells in preview tab', () => {
|
233
|
+
gridFillPage.steps.switchToEditTab();
|
234
|
+
gridFillPage.steps.uncheckOutlineCellOnHoverCheckbox();
|
235
|
+
gridFillPage.steps.switchToPreviewTab();
|
236
|
+
gridFillPage.steps.verifyCellIsNotInteractiveForHoverInPreviewTab(2, 2);
|
237
|
+
});
|
238
|
+
|
239
|
+
it('When user has given an input in \'Canvas title\' input field, then the provided input should be displayed in the preview tab as canvas title', () => {
|
240
|
+
gridFillPage.steps.switchToEditTab();
|
241
|
+
gridFillPage.steps.addInputToCanvasTitleInputField('Canvas title');
|
242
|
+
gridFillPage.steps.switchToPreviewTab();
|
243
|
+
utilities.verifyInnerText(gridFillPage.canvasTitlePreviewTab(), 'Canvas title');
|
244
|
+
utilities.verifyElementVisibilityState(gridFillPage.canvasTitlePreviewTab(), 'visible');
|
245
|
+
});
|
246
|
+
|
247
|
+
it('CSS of customize layout section and different grid cells in specify correct answer section', { tags: 'css' }, () => {
|
248
|
+
utilities.verifyCSS(gridFillPage.canvasTitlePreviewTab(), {
|
249
|
+
'color': css.color.text,
|
250
|
+
'font-size': css.fontSize.default,
|
251
|
+
'font-weight': css.fontWeight.bold
|
252
|
+
});
|
253
|
+
});
|
254
|
+
|
255
|
+
it('Accessibility of customize layout section', { tags: 'a11y' }, () => {
|
256
|
+
cy.checkAccessibility(gridFillPage.canvasTitlePreviewTab().parents('[class*="preview"]'));
|
257
|
+
});
|
258
|
+
});
|
259
|
+
|
260
|
+
describe('\'Grid borders\', \'Grid border style\' and \'Outer grid border\' - Contents and edit tab functionality', () => {
|
261
|
+
abortEarlySetup();
|
262
|
+
before(() => {
|
263
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
264
|
+
cy.barsPreLoaderWait();
|
265
|
+
gridFillPage.steps.clickOnCustomizeLayoutAccordionButton();
|
266
|
+
});
|
267
|
+
|
268
|
+
it('\'Grid borders\' title and its toggle buttons \'Full grid\', \'Only border\' and \'None\' should be displayed and \'Full grid\' toggle buttons should be selected', () => {
|
269
|
+
utilities.verifyInnerText(gridFillPage.gridBordersTitle(), 'Grid borders');
|
270
|
+
utilities.verifyElementVisibilityState(gridFillPage.gridBordersTitle(), 'visible');
|
271
|
+
utilities.verifyInnerText(gridFillPage.fullGridToggleButton(), 'Full grid');
|
272
|
+
utilities.verifyElementVisibilityState(gridFillPage.fullGridToggleButton(), 'visible');
|
273
|
+
utilities.verifyInnerText(gridFillPage.onlyBorderToggleButton(), 'Only border');
|
274
|
+
utilities.verifyElementVisibilityState(gridFillPage.onlyBorderToggleButton(), 'visible');
|
275
|
+
utilities.verifyInnerText(gridFillPage.noneToggleButton(), 'None');
|
276
|
+
utilities.verifyElementVisibilityState(gridFillPage.noneToggleButton(), 'visible');
|
277
|
+
gridFillPage.steps.verifyFullGridToggleButtonIsSelected();
|
278
|
+
});
|
279
|
+
|
280
|
+
it('\'Grid border style\' title and its toggle buttons \'Solid\', \'Dashed\' and \'Dotted\' should be displayed and \'Solid\' toggle buttons should be selected', () => {
|
281
|
+
utilities.verifyInnerText(gridFillPage.gridBorderStyleTitle(), 'Grid border style');
|
282
|
+
utilities.verifyElementVisibilityState(gridFillPage.gridBorderStyleTitle(), 'visible');
|
283
|
+
utilities.verifyInnerText(gridFillPage.solidToggleButton(), 'Solid');
|
284
|
+
utilities.verifyElementVisibilityState(gridFillPage.solidToggleButton(), 'visible');
|
285
|
+
utilities.verifyInnerText(gridFillPage.dashedToggleButton(), 'Dashed');
|
286
|
+
utilities.verifyElementVisibilityState(gridFillPage.dashedToggleButton(), 'visible');
|
287
|
+
utilities.verifyInnerText(gridFillPage.dottedToggleButton(), 'Dotted');
|
288
|
+
utilities.verifyElementVisibilityState(gridFillPage.dottedToggleButton(), 'visible');
|
289
|
+
gridFillPage.steps.verifySolidToggleButtonIsSelected();
|
290
|
+
});
|
291
|
+
|
292
|
+
it('\'Outer grid border\' title and switch should be displayed and it should be On', () => {
|
293
|
+
utilities.verifyInnerText(gridFillPage.outerGridBorderTitle(), 'Outer grid border');
|
294
|
+
utilities.verifyElementVisibilityState(gridFillPage.outerGridBorderTitle(), 'visible');
|
295
|
+
utilities.verifyElementVisibilityState(gridFillPage.outerGridBorderSwitch(), 'visible');
|
296
|
+
gridFillPage.steps.verifyOuterGridBorderSwitchIsEnabled();
|
297
|
+
});
|
298
|
+
|
299
|
+
it('When \'Outer grid border\' switch is enabled, then thick outer border should be displayed on the grids of customize layout section and specify correct answer section', () => {
|
300
|
+
utilities.verifyCSS(gridFillPage.gridCustomizeLayoutSection(), {
|
301
|
+
'border': `3px solid ${css.color.gridBorder}`
|
302
|
+
});
|
303
|
+
utilities.verifyCSS(gridFillPage.gridSpecifyCorrectAnswerSection(), {
|
304
|
+
'border': `3px solid ${css.color.gridBorder}`
|
305
|
+
});
|
306
|
+
});
|
307
|
+
|
308
|
+
it('When user disables \'Outer grid border\' switch, then thick outer border should not be displayed in the grids of customize layout section and specify correct answer section', () => {
|
309
|
+
gridFillPage.steps.switchOffOuterGridBorderSwitch();
|
310
|
+
gridFillPage.steps.verifyGridBorderWhenOuterBorderSwitchIsOffInEditTab();
|
311
|
+
});
|
312
|
+
|
313
|
+
it('When user has selected \'Full grid\' toggle button in \'Grid borders\', then the entire grid i.e. border of all the cells should be displayed in the grids of Customize layout section and Specify correct answer section', () => {
|
314
|
+
gridFillPage.steps.selectGridBordersToggleButton('Full grid');
|
315
|
+
gridFillPage.steps.verifyCellBorderIsDisplayedForFullGridToggleButtonInEditTab();
|
316
|
+
});
|
317
|
+
|
318
|
+
it('When user selects \'Only border\' toggle button in \'Grid borders\', then the borders for individual cells should not be displayed in the grids of Customize layout section and Specify correct answer section', () => {
|
319
|
+
gridFillPage.steps.selectGridBordersToggleButton('Only border');
|
320
|
+
gridFillPage.steps.verifyCellBorderIsDisplayedForOnlyBorderToggleButtonInEditTab();
|
321
|
+
});
|
322
|
+
|
323
|
+
it('When user selects \'None\' toggle button in \'Grid borders\' and \'Outer grid border\' switch is on, then the borders for individual cells should not be displayed in the grids of Customize layout section', () => {
|
324
|
+
gridFillPage.steps.selectGridBordersToggleButton('None');
|
325
|
+
gridFillPage.steps.verifyCellBorderNotDisplayedForNoneToggleButtonInEditTab();
|
326
|
+
});
|
327
|
+
|
328
|
+
it('When user selects \'None\' toggle button in \'Grid borders\', then \'Grid border style\' title and its toggle buttons should not be displayed', () => {
|
329
|
+
utilities.verifyElementVisibilityState(gridFillPage.gridBorderStyleTitle(), 'notExist');
|
330
|
+
utilities.verifyElementVisibilityState(gridFillPage.solidToggleButton(), 'notExist');
|
331
|
+
utilities.verifyElementVisibilityState(gridFillPage.dashedToggleButton(), 'notExist');
|
332
|
+
utilities.verifyElementVisibilityState(gridFillPage.dottedToggleButton(), 'notExist');
|
333
|
+
});
|
334
|
+
|
335
|
+
it('When user selects \'Full border\' toggle button, then \'Grid border style\' title and its toggle buttons should be displayed again', () => {
|
336
|
+
gridFillPage.steps.selectGridBordersToggleButton('Full grid');
|
337
|
+
utilities.verifyElementVisibilityState(gridFillPage.gridBorderStyleTitle(), 'visible');
|
338
|
+
utilities.verifyElementVisibilityState(gridFillPage.solidToggleButton(), 'visible');
|
339
|
+
utilities.verifyElementVisibilityState(gridFillPage.dashedToggleButton(), 'visible');
|
340
|
+
utilities.verifyElementVisibilityState(gridFillPage.dottedToggleButton(), 'visible');
|
341
|
+
});
|
342
|
+
|
343
|
+
it('When user has selected \'Solid\' toggle button in \'Grid border style\', then the border of all the cells as well as grid should be displayed in solid form in Customize layout section and Specify correct answer section', () => {
|
344
|
+
gridFillPage.steps.selectGridBorderStyleToggleButton('Solid');
|
345
|
+
gridFillPage.steps.verifySolidBorderForSolidToggleButtonInEditTab();
|
346
|
+
});
|
347
|
+
|
348
|
+
it('When user has selected \'Dashed\' toggle button in \'Grid border style\', then the border of all the cells as well as grid should be displayed in solid form in Customize layout section and Specify correct answer section', () => {
|
349
|
+
gridFillPage.steps.selectGridBorderStyleToggleButton('Dashed');
|
350
|
+
gridFillPage.steps.verifyDashedBorderForDashedToggleButtonInEditTab();
|
351
|
+
});
|
352
|
+
|
353
|
+
it('When user has selected \'Dotted\' toggle button in \'Grid border style\', then the border of all the cells as well as grid should be displayed in solid form in Customize layout section and Specify correct answer section', () => {
|
354
|
+
gridFillPage.steps.selectGridBorderStyleToggleButton('Dotted');
|
355
|
+
gridFillPage.steps.verifyDottedBorderForDottedToggleButtonInEditTab();
|
356
|
+
});
|
357
|
+
|
358
|
+
it('When user switches on the \'Outer grid border\' switch, then thicker outer border should be displayed on the grid', () => {
|
359
|
+
gridFillPage.steps.switchOnOuterGridBorderSwitch();
|
360
|
+
utilities.verifyCSS(gridFillPage.gridCustomizeLayoutSection(), {
|
361
|
+
'border': `3px solid ${css.color.gridBorder}`
|
362
|
+
});
|
363
|
+
utilities.verifyCSS(gridFillPage.gridSpecifyCorrectAnswerSection(), {
|
364
|
+
'border': `3px solid ${css.color.gridBorder}`
|
365
|
+
});
|
366
|
+
});
|
367
|
+
|
368
|
+
it('CSS of \'Grid borders\', \'Grid border style\' and \'Outer grid border\' sections', () => {
|
369
|
+
utilities.verifyCSS(gridFillPage.gridBordersTitle(), {
|
370
|
+
'color': css.color.labels,
|
371
|
+
'font-size': css.fontSize.normal,
|
372
|
+
'font-weight': css.fontWeight.semibold
|
373
|
+
});
|
374
|
+
utilities.verifyCSS(gridFillPage.fullGridToggleButton(), {
|
375
|
+
'color': css.color.whiteText,
|
376
|
+
'font-size': css.fontSize.normal,
|
377
|
+
'font-weight': css.fontWeight.bold,
|
378
|
+
'background-color': css.color.toggleButtonSelectedBg
|
379
|
+
});
|
380
|
+
utilities.verifyCSS(gridFillPage.onlyBorderToggleButton(), {
|
381
|
+
'color': css.color.UnselectedToggleButton,
|
382
|
+
'font-size': css.fontSize.normal,
|
383
|
+
'font-weight': css.fontWeight.bold,
|
384
|
+
'background-color': css.color.transparent
|
385
|
+
});
|
386
|
+
utilities.verifyCSS(gridFillPage.gridBorderStyleTitle(), {
|
387
|
+
'color': css.color.labels,
|
388
|
+
'font-size': css.fontSize.normal,
|
389
|
+
'font-weight': css.fontWeight.semibold
|
390
|
+
});
|
391
|
+
utilities.verifyCSS(gridFillPage.dottedToggleButton(), {
|
392
|
+
'color': css.color.whiteText,
|
393
|
+
'font-size': css.fontSize.normal,
|
394
|
+
'font-weight': css.fontWeight.bold,
|
395
|
+
'background-color': css.color.toggleButtonSelectedBg
|
396
|
+
});
|
397
|
+
utilities.verifyCSS(gridFillPage.solidToggleButton(), {
|
398
|
+
'color': css.color.UnselectedToggleButton,
|
399
|
+
'font-size': css.fontSize.normal,
|
400
|
+
'font-weight': css.fontWeight.bold,
|
401
|
+
'background-color': css.color.transparent
|
402
|
+
});
|
403
|
+
utilities.verifyCSS(gridFillPage.outerGridBorderTitle(), {
|
404
|
+
'color': css.color.labels,
|
405
|
+
'font-size': css.fontSize.normal,
|
406
|
+
'font-weight': css.fontWeight.semibold
|
407
|
+
});
|
408
|
+
utilities.verifyCSS(gridFillPage.outerGridBorderSwitch().find('.MuiSwitch-track'), {
|
409
|
+
'background-color': css.color.enabledSwitchBg
|
410
|
+
});
|
411
|
+
gridFillPage.steps.switchOffOuterGridBorderSwitch();
|
412
|
+
utilities.verifyCSS(gridFillPage.outerGridBorderSwitch().find('.MuiSwitch-track'), {
|
413
|
+
'background-color': css.color.disabledSwitchBg
|
414
|
+
});
|
415
|
+
});
|
416
|
+
|
417
|
+
//a11y covered in above describe
|
418
|
+
|
419
|
+
it('When user has made changes in \'Grid borders\', \'Grid border style\' and \'Outer grid border\' sections and closes and reopens the customize layout accordion, then the changes should be retained', () => {
|
420
|
+
gridFillPage.steps.selectGridBordersToggleButton('Only border');
|
421
|
+
gridFillPage.steps.selectGridBorderStyleToggleButton('Dashed');
|
422
|
+
gridFillPage.steps.clickOnCustomizeLayoutAccordionButton();
|
423
|
+
gridFillPage.steps.verifyCustomizeLayoutAccordionIsCollapsed();
|
424
|
+
gridFillPage.steps.clickOnCustomizeLayoutAccordionButton();
|
425
|
+
gridFillPage.steps.verifyCustomizeLayoutAccordionIsExpanded();
|
426
|
+
gridFillPage.steps.verifyOnlyBorderToggleButtonIsSelected();
|
427
|
+
gridFillPage.steps.verifyDashedToggleButtonIsSelected();
|
428
|
+
gridFillPage.steps.verifyOuterGridBorderSwitchIsDisabled();
|
429
|
+
});
|
430
|
+
});
|
431
|
+
|
432
|
+
describe('\'Grid borders\', \'Grid border style\' and \'Outer grid border\' -preview tab functionality', () => {
|
433
|
+
abortEarlySetup();
|
434
|
+
before(() => {
|
435
|
+
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
436
|
+
cy.barsPreLoaderWait();
|
437
|
+
gridFillPage.steps.clickOnCustomizeLayoutAccordionButton();
|
438
|
+
gridFillPage.steps.switchToPreviewTab();
|
439
|
+
});
|
440
|
+
|
441
|
+
it('When \'Outer grid border\' switch is enabled, then thick outer border should be displayed on the preview tab grid', () => {
|
442
|
+
utilities.verifyCSS(gridFillPage.gridWrapperPreviewTab(), {
|
443
|
+
'border': `3px solid ${css.color.gridBorder}`
|
444
|
+
});
|
445
|
+
});
|
446
|
+
|
447
|
+
it('When user disables \'Outer grid border\' switch, then thick outer border should be displayed on the preview tab grid', () => {
|
448
|
+
gridFillPage.steps.switchToEditTab();
|
449
|
+
gridFillPage.steps.switchOffOuterGridBorderSwitch();
|
450
|
+
gridFillPage.steps.switchToPreviewTab();
|
451
|
+
gridFillPage.steps.verifyGridBorderWhenOuterBorderSwitchIsOffInPreviewTab();
|
452
|
+
});
|
453
|
+
|
454
|
+
it('When user has selected \'Full grid\' toggle button in \'Grid borders\', then the entire grid i.e. border of all the cells should be displayed in the grids of Customize layout section and Specify correct answer section', () => {
|
455
|
+
gridFillPage.steps.verifyCellBorderIsDisplayedForFullGridToggleButtonInPreviewTab();
|
456
|
+
});
|
457
|
+
|
458
|
+
it('When user selects \'Only border\' toggle button in \'Grid borders\', then the borders for individual cells should not be displayed on the preview tab grid', () => {
|
459
|
+
gridFillPage.steps.switchToEditTab();
|
460
|
+
gridFillPage.steps.selectGridBordersToggleButton('Only border');
|
461
|
+
gridFillPage.steps.switchToPreviewTab();
|
462
|
+
gridFillPage.steps.verifyCellBorderIsDisplayedForOnlyBorderToggleButtonInPreviewTab();
|
463
|
+
});
|
464
|
+
|
465
|
+
it('When user selects \'None\' toggle button in \'Grid borders\' and \'Outer grid border\' switch is on, then the borders for individual cells should not be displayed in the displayed on the preview tab grid', () => {
|
466
|
+
gridFillPage.steps.switchToEditTab();
|
467
|
+
gridFillPage.steps.selectGridBordersToggleButton('None');
|
468
|
+
gridFillPage.steps.switchToPreviewTab();
|
469
|
+
gridFillPage.steps.verifyCellBorderNotDisplayedForNoneToggleButtonInPreviewTab();
|
470
|
+
});
|
471
|
+
|
472
|
+
it('When user has selected \'Solid\' toggle button in \'Grid border style\', then the border of all the cells as well as grid should be displayed in the displayed on the preview tab grid', () => {
|
473
|
+
gridFillPage.steps.switchToEditTab();
|
474
|
+
cy.log('Pre-step: Select \'Full grid\' toggle button');
|
475
|
+
gridFillPage.steps.selectGridBordersToggleButton('Full grid');
|
476
|
+
gridFillPage.steps.selectGridBorderStyleToggleButton('Solid');
|
477
|
+
gridFillPage.steps.switchToPreviewTab();
|
478
|
+
gridFillPage.steps.verifySolidBorderForSolidToggleButtonInPreviewTab();
|
479
|
+
});
|
480
|
+
|
481
|
+
it('When user has selected \'Dashed\' toggle button in \'Grid border style\', then the border of all the cells as well as grid should be displayed in the displayed on the preview tab grid', () => {
|
482
|
+
gridFillPage.steps.switchToEditTab();
|
483
|
+
gridFillPage.steps.selectGridBorderStyleToggleButton('Dashed');
|
484
|
+
gridFillPage.steps.switchToPreviewTab();
|
485
|
+
gridFillPage.steps.verifyDashedBorderForDashedToggleButtonInPreviewTab();
|
486
|
+
});
|
487
|
+
|
488
|
+
it('When user has selected \'Dotted\' toggle button in \'Grid border style\', then the border of all the cells as well as grid should be displayed in the displayed on the preview tab grid', () => {
|
489
|
+
gridFillPage.steps.switchToEditTab();
|
490
|
+
gridFillPage.steps.selectGridBorderStyleToggleButton('Dotted');
|
491
|
+
gridFillPage.steps.switchToPreviewTab();
|
492
|
+
gridFillPage.steps.verifyDottedBorderForDottedToggleButtonInPreviewTab();
|
493
|
+
});
|
494
|
+
|
495
|
+
it('When user switches on the \'Outer grid border\' switch, then thicker outer border should be displayed in the displayed on the preview tab grid', () => {
|
496
|
+
gridFillPage.steps.switchToEditTab();
|
497
|
+
gridFillPage.steps.switchOnOuterGridBorderSwitch();
|
498
|
+
gridFillPage.steps.switchToPreviewTab();
|
499
|
+
utilities.verifyCSS(gridFillPage.gridWrapperPreviewTab(), {
|
500
|
+
'border': `3px solid ${css.color.gridBorder}`
|
501
|
+
});
|
502
|
+
});
|
503
|
+
|
504
|
+
//a11y covered in above describe
|
505
|
+
});
|
506
|
+
});
|
@@ -177,11 +177,11 @@ describe('Create item page - Grid fill : Preview contents', () => {
|
|
177
177
|
'background-color': css.color.gridCellSelectedStateBg
|
178
178
|
});
|
179
179
|
utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInPreviewTab(), 2), {
|
180
|
-
'border-color': css.color.
|
180
|
+
'border-color': css.color.figDefaultComponentBorder,
|
181
181
|
'background-color': css.color.defaultBackground
|
182
182
|
});
|
183
183
|
utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInPreviewTab(), 7), {
|
184
|
-
'border-color': css.color.
|
184
|
+
'border-color': css.color.figDefaultComponentBorder,
|
185
185
|
'background-color': css.color.gridCellDefaultStateBg
|
186
186
|
});
|
187
187
|
break;
|
@@ -192,7 +192,7 @@ describe('Create item page - Grid fill : Preview contents', () => {
|
|
192
192
|
'background-color': css.color.gridCellCorrectAnswerBg
|
193
193
|
});
|
194
194
|
utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInPreviewTab(), 2), {
|
195
|
-
'border-color': css.color.
|
195
|
+
'border-color': css.color.figDefaultComponentBorder,
|
196
196
|
'background-color': css.color.defaultBackground
|
197
197
|
});
|
198
198
|
utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInPreviewTab(), 7), {
|