itemengine-cypress-automation 1.0.247 → 1.0.248

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  2. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +5 -5
  4. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +8 -0
  5. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +2 -0
  6. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneAlternateAnswerPopup.js +1 -1
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +1 -2
  8. package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationDropDown.js +166 -0
  9. package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSameList.js +1 -0
  10. package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSeperateList.js +344 -0
  11. package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +2 -2
  12. package/cypress/e2e/ILC/UploadResponse/thumbNail.smoke.js +121 -0
  13. package/cypress/e2e/ILC/VideoResponseNew/editTabBasicSection.js +6 -3
  14. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
  15. package/cypress/pages/components/imageCanvasComponent.js +2 -3
  16. package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +287 -53
  17. package/cypress/pages/fillInTheGapsDragAndDropPage.js +2 -1
  18. package/cypress/pages/listOrderingPage.js +1 -1
  19. package/cypress/pages/matchingPage.js +1 -1
  20. package/cypress/pages/uploadResponsePage.js +49 -4
  21. package/deploy/e2e/deploy.yaml +2 -2
  22. package/deploy/smoke/deploy.yaml +2 -2
  23. package/package.json +1 -1
@@ -329,7 +329,7 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
329
329
  chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
330
330
  chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 4, range: 10 });
331
331
  chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 6, range: 10 });
332
- chartsBarPage.steps.verifyPreviewScore(8, 20);
332
+ chartsBarPage.steps.verifyPreviewScore(12.5, 20);
333
333
  chartsBarPage.steps.switchToGradingView();
334
334
  chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
335
335
  chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
@@ -328,7 +328,7 @@ describe('Create item page - Charts - Bar: Partial equal weights scoring with al
328
328
 
329
329
  chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 8, range: 10 });
330
330
  chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 6, range: 10 });
331
- chartsBarPage.steps.verifyPreviewScore(8, 20);
331
+ chartsBarPage.steps.verifyPreviewScore(12.5, 20);
332
332
  chartsBarPage.steps.switchToGradingView();
333
333
  chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
334
334
  chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
@@ -123,12 +123,12 @@ describe('Create item page - Drag and drop into categories: All or nothing with
123
123
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Flying squirrel': 0, 'Eagle': 1, 'Peacock': 1, 'Platypus': 4 });
124
124
  dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(0, 20);
125
125
  dragAndDropIntoCategoriesPage.steps.switchToGradingView();
126
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(0);
126
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(0);
127
127
  dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
128
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
129
- dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(3);
128
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(2);
129
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(3);
130
130
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
131
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus']], ['1', '2', '4', '5']);
131
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale']], ['1', '2', '3', '4', '5']);
132
132
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
133
133
  /*cy.log('When the user has attempted the question with partially correct with all the cells correct as per the alternative accordion but one cell incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the correct accordion, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
134
134
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -149,7 +149,7 @@ describe('Create item page - Drag and drop into categories: All or nothing with
149
149
  dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
150
150
  dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
151
151
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
152
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus']], ['1', '2', '4', '5']);
152
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale']], ['1', '2', '3', '4', '5']);
153
153
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
154
154
  /*cy.log('When the user has attempted the question with partially correct with more number of options exclusively from the alternative accordion but with one option common across both accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the responses from the alternative accordion response as well as common response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
155
155
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -37,6 +37,8 @@ describe('Create item page - Drawing response: Customize special characters, Cus
37
37
  //Add this verification once https://redmine.zeuslearning.com/issues/555008 is resolved
38
38
  cy.log('Post-step: Switching to edit tab');
39
39
  drawingResponsePage.steps.switchToEditTab();
40
+ //Need to remove this once https://redmine.zeuslearning.com/issues/577356 is resolved
41
+ drawingResponsePage.steps.expandCustomizeToolbarOptionsAndControlsAccordion();
40
42
  });
41
43
 
42
44
  it('When the user checks the \'Show only custom special characters\' radio button, \'Custom special characters\' label and input field should be displayed. A \'Preview\' hyperlink should be displayed next to the label', () => {
@@ -62,6 +64,8 @@ describe('Create item page - Drawing response: Customize special characters, Cus
62
64
  drawingResponsePage.steps.verifyCustomSpecialCharactersDisplayedInPreviewTab(customSpecialCharacters);
63
65
  cy.log('Post-step: Switching to edit tab');
64
66
  drawingResponsePage.steps.switchToEditTab();
67
+ //Need to remove this once https://redmine.zeuslearning.com/issues/577356 is resolved
68
+ drawingResponsePage.steps.expandCustomizeToolbarOptionsAndControlsAccordion();
65
69
  });
66
70
 
67
71
  it('CSS of Customize special characters', { tags: 'css' }, () => {
@@ -231,6 +235,8 @@ describe('Create item page - Drawing response: Customize special characters, Cus
231
235
  drawingResponsePage.steps.verifyMathCharactersPopupCategoriesAndSymbols(newSelectedCategoryList);
232
236
  cy.log('Post-step: Switching to edit tab');
233
237
  drawingResponsePage.steps.switchToEditTab();
238
+ //Need to remove this once https://redmine.zeuslearning.com/issues/577356 is resolved
239
+ drawingResponsePage.steps.expandCustomizeToolbarOptionsAndControlsAccordion();
234
240
  });
235
241
 
236
242
  it('CSS of Customize math characters', { tags: 'css' }, () => {
@@ -412,6 +418,8 @@ describe('Create item page - Drawing response: Customize special characters, Cus
412
418
  cy.log('Post-step: Closing stroke color color popup, switching to edit tab and deselecting polygon toolbar option');
413
419
  drawingResponsePage.steps.closeSecondaryPopup();
414
420
  drawingResponsePage.steps.switchToEditTab();
421
+ //Need to remove this once https://redmine.zeuslearning.com/issues/577356 is resolved
422
+ drawingResponsePage.steps.expandCustomizeToolbarOptionsAndControlsAccordion();
415
423
  drawingResponsePage.steps.deselectToolbarOptionsAndControlsFormattingOptionsTiles([`${drawingToolbarOptionsAndAdditionalOptions.drawingToolbarOptions[11].displayName}`]);
416
424
  });
417
425
 
@@ -293,6 +293,8 @@ describe('Create question page - Essay Response: Equation Editor functionality',
293
293
  utilities.verifyElementVisibilityState(equationEditorFlyout.categoryCharactersWrapper(), 'notExist');
294
294
  cy.log('Post step: Switching to Edit tab')
295
295
  essayResponsePage.steps.switchToEditTab();
296
+ //Need to remove this once https://redmine.zeuslearning.com/issues/577356 is resolved
297
+ essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
296
298
  });
297
299
 
298
300
  //https://redmine.zeuslearning.com/issues/530205
@@ -153,7 +153,7 @@ describe('Create item page - Fill in the gaps with text: Dropzone level alternat
153
153
 
154
154
  it('When user opens the alternate answer popup for another dropzone, then alternate answer popup with the title and options as per the corresponding dropzone should be displayed', () => {
155
155
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Leaves': 1 });
156
- fillInTheGapsDragAndDropPage.steps.clickOnAddAlternateButton(1);
156
+ fillInTheGapsDragAndDropPage.steps.clickOnAddAlternateButton(2);
157
157
  utilities.verifyInnerText(fillInTheGapsDragAndDropPage.alternateAnswerPopupTitle(), 'Dropzone 2 alternate answer(s)');
158
158
  utilities.verifyInnerText(fillInTheGapsDragAndDropPage.alternateAnswerPopupHelpText(), 'Select alternate answer(s).');
159
159
  fillInTheGapsDragAndDropPage.steps.verifyDropzoneAlternateAnswerPopupOptions(['Petals', 'Roots', 'Stem']);
@@ -282,7 +282,6 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
282
282
  fillInTheGapsOverImageDropdownPage.steps.verifyTextColorOfTextBoxInPreviewTab('rgb(0, 0, 46)');
283
283
  fillInTheGapsOverImageDropdownPage.steps.verifyTextOfTextBoxInPreviewTab('Inserted text');
284
284
  });
285
-
286
285
  //remove the following skips when https://redmine.zeuslearning.com/issues/574944 is resolved.
287
286
  it.skip('When the user clicks on the undo button in edit tab, then previous action should be reversed and same should reflect in preview tab', () => {
288
287
  fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
@@ -424,4 +423,4 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
424
423
 
425
424
  fillInTheGapsOverImageDropdownPage.tests.verifyImageNotExistPreviewTab();
426
425
  });
427
- })
426
+ });
@@ -0,0 +1,166 @@
1
+ import { listOrderingPage } from "../../../pages";
2
+ import { colorPopupComponent } from "../../../pages/components";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ const css = Cypress.env('css');
6
+
7
+
8
+ describe('Create item page - List ordering: Style and layout Component', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Style and layout Component - Options - Fill color, border color, border style', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
17
+ cy.barsPreLoaderWait();
18
+ listOrderingPage.steps.selectOrderingLayoutOption('Dropdown menu');
19
+ });
20
+
21
+ listOrderingPage.tests.verifyStyleAndLayoutCustomizationAccordionProperties();
22
+
23
+ listOrderingPage.tests.verifyFillColorSectionContents();
24
+
25
+ listOrderingPage.tests.verifyBorderColorSectionContents();
26
+
27
+ listOrderingPage.tests.verifyBorderStyleSectionContents('Solid');
28
+
29
+ listOrderingPage.tests.verifyFillColorTooltips();
30
+
31
+ listOrderingPage.tests.verifyBorderColorTooltips();
32
+
33
+ it('When user clicks on edit color then color pop up panel will be visible', () => {
34
+ listOrderingPage.steps.editColor(0);
35
+ colorPopupComponent.steps.verifyColorPopupIsDisplayed();
36
+ colorPopupComponent.tests.verifyColorPopupSelectColorTitle();
37
+ colorPopupComponent.tests.verifySaturationAndOpacityGradientPalette('rgb(255, 255, 255)');
38
+ colorPopupComponent.tests.verifyColorHuePaletteAndHexInputField('rgb(255, 0, 0)', '#ffffff');
39
+ colorPopupComponent.tests.verifyColorPopupFunctionality();
40
+ });
41
+
42
+ it('When the user moves the color picker in the color saturation palette, color in the selected color block and the hex code should change, color in the hue color palette and the opacity value should not change', () => {
43
+ colorPopupComponent.steps.clickInColorSaturationPalette();
44
+ colorPopupComponent.steps.verifySelectedColorBlock('rgb(121, 60, 60)');
45
+ colorPopupComponent.steps.verifySaturationPaletteColor('rgb(119, 60, 60)');
46
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
47
+ colorPopupComponent.steps.verifyHexValue('#793c3c');
48
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(119, 60, 60)');
49
+ });
50
+
51
+ it('When the user moves the color picker in the color hue palette, color in the selected color block, the hex code and the saturation color palette should change and the opacity value should not change', () => {
52
+ colorPopupComponent.steps.clickInColorHuePalette();
53
+ colorPopupComponent.steps.verifySelectedColorBlock('rgb(60, 121, 121)');
54
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(0, 255, 255)');
55
+ colorPopupComponent.steps.verifyHexValue('#3c7979');
56
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(60, 119, 119)');
57
+ });
58
+
59
+ it('When the user changes the color using hex code, the color in color saturation palette and color hue palette should change and the opacity value should not change', () => {
60
+ colorPopupComponent.steps.addInputToHexInputField('#ff0000');
61
+ colorPopupComponent.steps.verifyHexValue('#ff0000');
62
+ colorPopupComponent.steps.verifySaturationPaletteColor('rgb(255, 0, 0)');
63
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
64
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(255, 0, 0)');
65
+ });
66
+ });
67
+
68
+ describe('Style and Layout customization accordion: Options - Fill color, border color, border style - Edit Tab', () => {
69
+ abortEarlySetup();
70
+ before(() => {
71
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
72
+ cy.barsPreLoaderWait();
73
+ listOrderingPage.steps.selectOrderingLayoutOption('Dropdown menu');
74
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
75
+ });
76
+
77
+ listOrderingPage.tests.verifyFillColorFunctionalityEditTab('DropDown');
78
+
79
+ listOrderingPage.tests.verifyBorderColorFunctionalityEditTab('DropDown');
80
+
81
+ listOrderingPage.tests.verifyBorderStyleFunctionalityEditTab('DropDown');
82
+ });
83
+
84
+ describe('Style and Layout customization accordion: Options - Fill color, border color, border style - Preview Tab', () => {
85
+ abortEarlySetup();
86
+ before(() => {
87
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
88
+ cy.barsPreLoaderWait();
89
+ listOrderingPage.steps.selectOrderingLayoutOption('Dropdown menu');
90
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
91
+ });
92
+
93
+ listOrderingPage.tests.verifyFillColorFunctionalityPreviewTab('DropDown');
94
+
95
+ listOrderingPage.tests.verifyBorderColorFunctionalityPreviewTab('DropDown');
96
+
97
+ listOrderingPage.tests.verifyBorderStyleFunctionalityPreviewTab('DropDown');
98
+ });
99
+
100
+ describe('Style and Layout customization accordion: Options - Drop Down - Edit Tab', () => {
101
+ abortEarlySetup();
102
+ before(() => {
103
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
104
+ cy.barsPreLoaderWait();
105
+ listOrderingPage.steps.selectOrderingLayoutOption('Dropdown menu');
106
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
107
+ });
108
+
109
+ it('\'List container\' label will be displayed', () => {
110
+ utilities.verifyElementVisibilityState(listOrderingPage.listContainerAndDropDownLabel(), 'visible');
111
+ utilities.verifyInnerText(listOrderingPage.listContainerAndDropDownLabel(), 'Dropdown');
112
+ });
113
+
114
+ it('"Fill color" label and two color blocks and an "Edit color" button should be displayed. The selected color block should be of color "rgb(245, 248, 255)" and the other color block should have "No color"', () => {
115
+ utilities.verifyInnerText(listOrderingPage.fillColorLabelListContainerAndDropDown(), 'Fill color');
116
+ listOrderingPage.steps.verifyColorBlockColor(4, 'rgb(245, 248, 255)');
117
+ listOrderingPage.steps.verifyColorBlockSelectedState(4);
118
+ listOrderingPage.steps.verifyColorBlockColor(5, css.color.none);
119
+ utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.editColorButton(), 2), 'Edit color');
120
+ utilities.verifyElementVisibilityState(listOrderingPage.editColorButton().eq(2), 'visible');
121
+ listOrderingPage.steps.selectPositionForAllOptionsSpecifyCorrectAnswerSection([{ optionIndex: 0, position: '2' }, { optionIndex: 1, position: '3' }, { optionIndex: 2, position: '4' }, { optionIndex: 3, position: '1' }])
122
+ });
123
+
124
+ listOrderingPage.tests.verifyFillColorFunctionalityOfListContainerOrDropDownEditTab('DropDown');
125
+
126
+ it('"Border color" label and two color blocks and an "Edit color" button should be displayed. The selected color block should be of color "rgb(82, 0, 255)" and the other color block should have "No color"', () => {
127
+ utilities.verifyInnerText(listOrderingPage.borderColorLabelListContainerAndDropDown(), 'Border color');
128
+ utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.editColorButton(), 3), 'Edit color');
129
+ utilities.verifyElementVisibilityState(listOrderingPage.editColorButton().eq(3), 'visible');
130
+ listOrderingPage.steps.verifyColorBlockColor(6, 'rgb(82, 0, 255)');
131
+ listOrderingPage.steps.verifyColorBlockSelectedState(6);
132
+ listOrderingPage.steps.verifyColorBlockColor(7, css.color.none);
133
+ });
134
+
135
+ listOrderingPage.tests.verifyBorderColorFunctionalityOfListOrDropDownContainerEditTab('DropDown');
136
+
137
+ it(`"Border style" label and three toggle buttons should be displayed - "Dotted", "Solid", "None". By default "Solid" button should be in selected state`, () => {
138
+ utilities.verifyInnerText(listOrderingPage.borderStyleLabel(), 'Border style');
139
+ utilities.verifyElementVisibilityState(listOrderingPage.dottedBorderStyleToggleButtonListContainerAndDropDown(), 'visible');
140
+ utilities.verifyInnerText(listOrderingPage.dottedBorderStyleToggleButtonListContainerAndDropDown(), 'Dotted');
141
+ utilities.verifyElementVisibilityState(listOrderingPage.solidBorderStyleToggleButtonListContainerAndDropDown(), 'visible');
142
+ utilities.verifyInnerText(listOrderingPage.solidBorderStyleToggleButtonListContainerAndDropDown(), 'Solid');
143
+ utilities.verifyElementVisibilityState(listOrderingPage.noneBorderStyleToggleButton(), 'visible');
144
+ utilities.verifyInnerText(listOrderingPage.noneBorderStyleToggleButton(), 'None');
145
+ listOrderingPage.steps.verifyBorderStyleToggleButtonSelectedStateListContainer('Solid');
146
+ });
147
+
148
+ listOrderingPage.tests.verifyBorderStyleFunctionalityOfListContainerOrDropDownContainerEditTab('DropDown');
149
+ });
150
+
151
+ describe('Style and Layout customization accordion: Options - Drop Down - Preview Tab', () => {
152
+ abortEarlySetup();
153
+ before(() => {
154
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
155
+ cy.barsPreLoaderWait();
156
+ listOrderingPage.steps.selectOrderingLayoutOption('Dropdown menu');
157
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
158
+ });
159
+
160
+ listOrderingPage.tests.verifyFillColorFunctionalityOfDropDownContainerPreviewTab('DropDown');
161
+
162
+ listOrderingPage.tests.verifyBorderColorFunctionalityOfDropDownContainerPreviewTab('DropDown');
163
+
164
+ listOrderingPage.tests.verifyBorderStyleFunctionalityOfDropDownPreviewTab('DropDown');
165
+ });
166
+ });
@@ -190,6 +190,7 @@ describe('Create item page - List ordering: Style and layout Component', () => {
190
190
  it('When user selects \'Without Border\' option style like \'Fill color\', \'Border color\', \'Border style\' and \'Connector settings\' will be removed from style and Layout customization accordion', () => {
191
191
  utilities.verifyElementVisibilityState(listOrderingPage.fillAndBorderColorWrapper(), 'notExist');
192
192
  utilities.verifyElementVisibilityState(listOrderingPage.borderStyleLabel(), 'notExist');
193
+ utilities.verifyElementVisibilityState(listOrderingPage.connectorSettingLabel(), 'notExist');
193
194
  });
194
195
  });
195
196
 
@@ -0,0 +1,344 @@
1
+ import { listOrderingPage } from "../../../pages";
2
+ import { colorPopupComponent } from "../../../pages/components";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ const css = Cypress.env('css');
6
+
7
+
8
+ describe('Create item page - List ordering: Style and layout Component', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Style and layout Component - Options - Fill color, border color, border style', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
17
+ cy.barsPreLoaderWait();
18
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
19
+ });
20
+
21
+ listOrderingPage.tests.verifyStyleAndLayoutCustomizationAccordionProperties();
22
+
23
+ listOrderingPage.tests.verifyFillColorSectionContents();
24
+
25
+ listOrderingPage.tests.verifyBorderColorSectionContents();
26
+
27
+ listOrderingPage.tests.verifyBorderStyleSectionContents('Solid');
28
+
29
+ listOrderingPage.tests.verifyFillColorTooltips();
30
+
31
+ listOrderingPage.tests.verifyBorderColorTooltips();
32
+
33
+ it('When user clicks on edit color then color pop up panel will be visible', () => {
34
+ listOrderingPage.steps.editColor(0);
35
+ colorPopupComponent.steps.verifyColorPopupIsDisplayed();
36
+ colorPopupComponent.tests.verifyColorPopupSelectColorTitle();
37
+ colorPopupComponent.tests.verifySaturationAndOpacityGradientPalette('rgb(255, 255, 255)');
38
+ colorPopupComponent.tests.verifyColorHuePaletteAndHexInputField('rgb(255, 0, 0)', '#ffffff');
39
+ colorPopupComponent.tests.verifyColorPopupFunctionality();
40
+ });
41
+
42
+ it('When the user moves the color picker in the color saturation palette, color in the selected color block and the hex code should change, color in the hue color palette and the opacity value should not change', () => {
43
+ colorPopupComponent.steps.clickInColorSaturationPalette();
44
+ colorPopupComponent.steps.verifySelectedColorBlock('rgb(121, 60, 60)');
45
+ colorPopupComponent.steps.verifySaturationPaletteColor('rgb(119, 60, 60)');
46
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
47
+ colorPopupComponent.steps.verifyHexValue('#793c3c');
48
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(119, 60, 60)');
49
+ });
50
+
51
+ it('When the user moves the color picker in the color hue palette, color in the selected color block, the hex code and the saturation color palette should change and the opacity value should not change', () => {
52
+ colorPopupComponent.steps.clickInColorHuePalette();
53
+ colorPopupComponent.steps.verifySelectedColorBlock('rgb(60, 121, 121)');
54
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(0, 255, 255)');
55
+ colorPopupComponent.steps.verifyHexValue('#3c7979');
56
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(60, 119, 119)');
57
+ });
58
+
59
+ it('When the user changes the color using hex code, the color in color saturation palette and color hue palette should change and the opacity value should not change', () => {
60
+ colorPopupComponent.steps.addInputToHexInputField('#ff0000');
61
+ colorPopupComponent.steps.verifyHexValue('#ff0000');
62
+ colorPopupComponent.steps.verifySaturationPaletteColor('rgb(255, 0, 0)');
63
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
64
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(255, 0, 0)');
65
+ });
66
+ });
67
+
68
+ describe('Style and Layout customization accordion: Options - Fill color, border color, border style - Edit Tab', () => {
69
+ abortEarlySetup();
70
+ before(() => {
71
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
72
+ cy.barsPreLoaderWait();
73
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
74
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
75
+ });
76
+
77
+ listOrderingPage.tests.verifyFillColorFunctionalityEditTab('SeperateList');
78
+
79
+ listOrderingPage.tests.verifyBorderColorFunctionalityEditTab('SeperateList');
80
+
81
+ listOrderingPage.tests.verifyBorderStyleFunctionalityEditTab('SeperateList');
82
+ });
83
+
84
+ describe('Style and Layout customization accordion: Options - Fill color, border color, border style - Preview Tab', () => {
85
+ abortEarlySetup();
86
+ before(() => {
87
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
88
+ cy.barsPreLoaderWait();
89
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
90
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
91
+ });
92
+
93
+ listOrderingPage.tests.verifyFillColorFunctionalityPreviewTab('SeperateList');
94
+
95
+ listOrderingPage.tests.verifyBorderColorFunctionalityPreviewTab('SeperateList');
96
+
97
+ listOrderingPage.tests.verifyBorderStyleFunctionalityPreviewTab('SeperateList');
98
+ });
99
+
100
+ describe('Style and Layout customization accordion: Options - Drag handle icon - Edit Tab', () => {
101
+ abortEarlySetup();
102
+ before(() => {
103
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
104
+ cy.barsPreLoaderWait();
105
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
106
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
107
+ });
108
+
109
+ it('\'Options\' label will be displayed', () => {
110
+ utilities.verifyElementVisibilityState(listOrderingPage.optionsLabel(), 'visible');
111
+ utilities.verifyInnerText(listOrderingPage.optionsLabel(), 'Options');
112
+ });
113
+
114
+ it('Drag handle icon label will be displayed with 3 options and by default the first option will be selected draggable options', () => {
115
+ utilities.verifyInnerText(listOrderingPage.dragHandleIconLabel(), 'Drag handle icon');
116
+ utilities.verifyElementCount(listOrderingPage.dragHandleOptions(), 3);
117
+ listOrderingPage.steps.verifyDragHandleOptionSelected(0);
118
+ });
119
+
120
+ it('By default, the default selected drag handle will be displayed in the specify correct answer section draggable options', () => {
121
+ listOrderingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('drag icon', 'SeperateList');
122
+ });
123
+
124
+ it('When user selects arrows drag handle icon then arrow icons will be displayed the specify correct answer section draggable options', () => {
125
+ listOrderingPage.steps.selectDragHandleOption(1);
126
+ listOrderingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('arrow icon', 'SeperateList');
127
+ });
128
+
129
+ it('When user selects none option then drag handles will not be displayed for the specify correct answer section draggable options', () => {
130
+ listOrderingPage.steps.selectDragHandleOption(2);
131
+ listOrderingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('none', 'SeperateList');
132
+ });
133
+ });
134
+
135
+ describe('Style and Layout customization accordion: Options - Drag handle icon - Preview Tab', () => {
136
+ abortEarlySetup();
137
+ before(() => {
138
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
139
+ cy.barsPreLoaderWait();
140
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
141
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
142
+ });
143
+
144
+ it('By default, the default selected drag handle will be displayed in the preview tab', () => {
145
+ listOrderingPage.steps.switchToPreviewTab();
146
+ listOrderingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('drag icon', 'SeperateList');
147
+ });
148
+
149
+ it('When user selects arrows drag handle icon then arrow icons will be displayed in preview tab', () => {
150
+ listOrderingPage.steps.switchToEditTab();
151
+ listOrderingPage.steps.selectDragHandleOption(1);
152
+ listOrderingPage.steps.switchToPreviewTab();
153
+ listOrderingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('arrow icon', 'SeperateList');
154
+ });
155
+
156
+ it('When user selects none option then drag handles will not be displayed in the preview tab', () => {
157
+ listOrderingPage.steps.switchToEditTab();
158
+ listOrderingPage.steps.selectDragHandleOption(2);
159
+ listOrderingPage.steps.switchToPreviewTab();
160
+ listOrderingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('none', 'SeperateList');
161
+ });
162
+ });
163
+
164
+ describe('Style and Layout customization accordion: Options - Options Style - Edit Tab', () => {
165
+ abortEarlySetup();
166
+ before(() => {
167
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
168
+ cy.barsPreLoaderWait();
169
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
170
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
171
+ });
172
+
173
+ it('\'Options style\' label will be displayed', () => {
174
+ utilities.verifyElementVisibilityState(listOrderingPage.optionStyleLabel(), 'visible');
175
+ utilities.verifyInnerText(listOrderingPage.optionStyleLabel(), 'Option style');
176
+ });
177
+
178
+ it('\'With Border\' and \'Without Border\' option style button will be present', () => {
179
+ utilities.verifyElementVisibilityState(listOrderingPage.withBorderOptionStyleButton(), 'visible');
180
+ utilities.verifyInnerText(listOrderingPage.withBorderOptionStyleButton(), 'With border');
181
+ utilities.verifyElementVisibilityState(listOrderingPage.withoutBorderOptionStyleButton(), 'visible');
182
+ utilities.verifyInnerText(listOrderingPage.withoutBorderOptionStyleButton(), 'Without border');
183
+ });
184
+
185
+ it('By default, \'With Border\' option style will be selected and the borders will be present in the specify correct answer section', () => {
186
+ listOrderingPage.steps.verifyWithBorderOptionStyleButtonSelected();
187
+ listOrderingPage.steps.verifyBorderStyleInSpecifyCorrectAnswerForSeperateList("1px solid rgb(107, 139, 255)");
188
+ });
189
+
190
+ it('When user selects \'Without Border\' option style the borders will not be present in the specify correct answer section', () => {
191
+ listOrderingPage.steps.selectWithoutBorderOptionStyleButton();
192
+ listOrderingPage.steps.verifyWithoutBorderOptionStyleButtonSelected();
193
+ listOrderingPage.steps.verifyBorderStyleInSpecifyCorrectAnswerForSeperateList("0px none rgba(0, 0, 0, 0.87)");
194
+ });
195
+
196
+ it('When user selects \'Without Border\' option style like \'Fill color\', \'Border color\' and \'Border style\' will be removed from style and Layout customization accordion', () => {
197
+ utilities.verifyElementVisibilityState(listOrderingPage.fillAndBorderColorWrapper(), 'notExist');
198
+ });
199
+ });
200
+
201
+ describe('Style and Layout customization accordion: Options - Options Style - Preview Tab', () => {
202
+ abortEarlySetup();
203
+ before(() => {
204
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
205
+ cy.barsPreLoaderWait();
206
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
207
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
208
+ });
209
+
210
+ it('By default, \'With Border\' option style will be selected and the borders will be present in the preview tab', () => {
211
+ listOrderingPage.steps.verifyWithBorderOptionStyleButtonSelected();
212
+ listOrderingPage.steps.switchToPreviewTab();
213
+ listOrderingPage.steps.verifyBorderStyleInSpecifyCorrectAnswerForSeperateList("1px solid rgb(107, 139, 255)");
214
+ });
215
+
216
+ it('When user selects \'Without Border\' option style the borders will not be present in the preview tab', () => {
217
+ listOrderingPage.steps.switchToEditTab();
218
+ listOrderingPage.steps.selectWithoutBorderOptionStyleButton();
219
+ listOrderingPage.steps.verifyWithoutBorderOptionStyleButtonSelected();
220
+ listOrderingPage.steps.switchToPreviewTab();
221
+ listOrderingPage.steps.verifyBorderStyleInSpecifyCorrectAnswerForSeperateList("0px none rgb(0, 0, 46)");
222
+ });
223
+ });
224
+
225
+ describe('Style and Layout customization accordion: Options - List Container - Edit Tab', () => {
226
+ abortEarlySetup();
227
+ before(() => {
228
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
229
+ cy.barsPreLoaderWait();
230
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
231
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
232
+ });
233
+
234
+ it('\'List container\' label will be displayed', () => {
235
+ utilities.verifyElementVisibilityState(listOrderingPage.listContainerAndDropDownLabel(), 'visible');
236
+ utilities.verifyInnerText(listOrderingPage.listContainerAndDropDownLabel(), 'List container');
237
+ });
238
+
239
+ it('"Fill color" label and two color blocks and an "Edit color" button should be displayed. The selected color block should be of color "rgb(245, 248, 255)" and the other color block should have "No color"', () => {
240
+ utilities.verifyInnerText(listOrderingPage.fillColorLabelListContainerAndDropDown(), 'Fill color');
241
+ listOrderingPage.steps.verifyColorBlockColor(4, "rgb(245, 248, 255)");
242
+ listOrderingPage.steps.verifyColorBlockSelectedState(4);
243
+ listOrderingPage.steps.verifyColorBlockColor(5, css.color.none);
244
+ utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.editColorButton(), 2), 'Edit color');
245
+ utilities.verifyElementVisibilityState(listOrderingPage.editColorButton().eq(2), 'visible');
246
+ });
247
+
248
+ listOrderingPage.tests.verifyFillColorFunctionalityOfListContainerOrDropDownEditTab("ListContainer");
249
+
250
+ it('"Border color" label and two color blocks and an "Edit color" button should be displayed. The selected color block should be of color "rgb(82, 0, 255)" and the other color block should have "No color"', () => {
251
+ utilities.verifyInnerText(listOrderingPage.borderColorLabelListContainerAndDropDown(), 'Border color');
252
+ utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.editColorButton(), 3), 'Edit color');
253
+ utilities.verifyElementVisibilityState(listOrderingPage.editColorButton().eq(3), 'visible');
254
+ listOrderingPage.steps.verifyColorBlockColor(6, "rgb(82, 0, 255)");
255
+ listOrderingPage.steps.verifyColorBlockSelectedState(6);
256
+ listOrderingPage.steps.verifyColorBlockColor(7, css.color.none);
257
+ });
258
+
259
+ listOrderingPage.tests.verifyBorderColorFunctionalityOfListOrDropDownContainerEditTab("ListContainer");
260
+
261
+ it(`"Border style" label and three toggle buttons should be displayed - "Dotted", "Solid", "None". By default "Dotted" button should be in selected state`, () => {
262
+ utilities.verifyInnerText(listOrderingPage.borderStyleLabelListContainer(), 'Border style');
263
+ utilities.verifyElementVisibilityState(listOrderingPage.dottedBorderStyleToggleButtonListContainerAndDropDown(), 'visible');
264
+ utilities.verifyInnerText(listOrderingPage.dottedBorderStyleToggleButtonListContainerAndDropDown(), 'Dotted');
265
+ utilities.verifyElementVisibilityState(listOrderingPage.solidBorderStyleToggleButtonListContainerAndDropDown(), 'visible');
266
+ utilities.verifyInnerText(listOrderingPage.solidBorderStyleToggleButtonListContainerAndDropDown(), 'Solid');
267
+ utilities.verifyElementVisibilityState(listOrderingPage.noneBorderStyleToggleButton(), 'visible');
268
+ utilities.verifyInnerText(listOrderingPage.noneBorderStyleToggleButton(), 'None');
269
+ listOrderingPage.steps.verifyBorderStyleToggleButtonSelectedStateListContainer('Dotted');
270
+ });
271
+
272
+ listOrderingPage.tests.verifyBorderStyleFunctionalityOfListContainerOrDropDownContainerEditTab("ListContainer");
273
+ });
274
+
275
+ describe('Style and Layout customization accordion: Options - List Container - Preview Tab', () => {
276
+ abortEarlySetup();
277
+ before(() => {
278
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
279
+ cy.barsPreLoaderWait();
280
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
281
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
282
+ });
283
+
284
+ listOrderingPage.tests.verifyFillColorFunctionalityOfListContainerPreviewTab("ListContainer");
285
+
286
+ listOrderingPage.tests.verifyBorderColorFunctionalityOfListConatinerPreviewTab("ListContainer");
287
+
288
+ listOrderingPage.tests.verifyBorderStyleFunctionalityOfListContainerPreviewTab("ListContainer");
289
+ });
290
+
291
+ describe('Style and Layout customization accordion: Options - Draggable Option Panel - Edit Tab', () => {
292
+ abortEarlySetup();
293
+ before(() => {
294
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
295
+ cy.barsPreLoaderWait();
296
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
297
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
298
+ });
299
+
300
+ it('\'Draggable Option Panel\' label and \'Panel placement\' label will be displayed', () => {
301
+ utilities.verifyElementVisibilityState(listOrderingPage.draggableOptionPanelLabel(), 'visible');
302
+ utilities.verifyInnerText(listOrderingPage.draggableOptionPanelLabel(), 'Draggable option panel');
303
+ utilities.verifyElementVisibilityState(listOrderingPage.panelPlacementLabel(), 'visible');
304
+ utilities.verifyInnerText(listOrderingPage.panelPlacementLabel(), 'Panel placement');
305
+ });
306
+
307
+ it('\'Left\' toggle button and \'Right\' toggle button should be visible and by default \'Left\' toggle button is selected', () => {
308
+ utilities.verifyElementVisibilityState(listOrderingPage.leftToggleButton(), 'visible');
309
+ utilities.verifyElementVisibilityState(listOrderingPage.rightToggleButton(), 'visible');
310
+ listOrderingPage.steps.verifyLeftToggleButtonSelected();
311
+ utilities.verifyElementVisibilityState(listOrderingPage.pannelPlacementRightToggle(), 'notExist');
312
+ });
313
+
314
+ it('When \'Right\' toggle button is selected then the options should shift to the right side of the container in specify correct answer section', () => {
315
+ listOrderingPage.steps.selectRightToggleButton();
316
+ listOrderingPage.steps.verifyRightToggleButtonSelected();
317
+ utilities.verifyElementVisibilityState(listOrderingPage.pannelPlacementRightToggle(), 'visible');
318
+ });
319
+ });
320
+
321
+ describe('Style and Layout customization accordion: Options - Draggable Option Panel - Preview Tab', () => {
322
+ abortEarlySetup();
323
+ before(() => {
324
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
325
+ cy.barsPreLoaderWait();
326
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
327
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
328
+ });
329
+
330
+ it('By default \'Left\' toggle button is selected and options should be at left side of the container in preview tab', () => {
331
+ listOrderingPage.steps.verifyLeftToggleButtonSelected();
332
+ listOrderingPage.steps.switchToPreviewTab();
333
+ utilities.verifyElementVisibilityState(listOrderingPage.pannelPlacementRightToggle(), 'notExist');
334
+ });
335
+
336
+ it('When \'Right\' toggle button is selected then the options should shift to the right side of the container in preview tab', () => {
337
+ listOrderingPage.steps.switchToEditTab();
338
+ listOrderingPage.steps.selectRightToggleButton();
339
+ listOrderingPage.steps.verifyRightToggleButtonSelected();
340
+ listOrderingPage.steps.switchToPreviewTab();
341
+ utilities.verifyElementVisibilityState(listOrderingPage.pannelPlacementRightToggle(), 'visible');
342
+ });
343
+ });
344
+ });