itemengine-cypress-automation 1.0.252 → 1.0.253
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerEditTabAddFeatureRadioButton.js +231 -0
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerEditTabAddTranscriptRadioButton .js +213 -0
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerEditTabAudioPlayerStyle.js +148 -0
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerEditTabStudentViewSettings.js +249 -0
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerHeaderSectionAndButtons.js +164 -0
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTab.js +444 -0
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTabSupportedFileTypes.js +102 -0
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTabTranscript.js +134 -0
- package/cypress/e2e/ILC/CkEditorEquationEditor/equationEditorBasicFile.js +46 -0
- package/cypress/e2e/ILC/CkEditorInsertTable/insertTableEditorBasicFile.js +98 -0
- package/cypress/e2e/ILC/CkEditorInsertTable/tableDimension&FooterProperties.js +147 -0
- package/cypress/e2e/ILC/CkEditorInsertTable/tableHeaders.js +127 -0
- package/cypress/e2e/ILC/CkEditorInsertTable/tableRowAndColumn.js +71 -0
- package/cypress/e2e/ILC/CkEditorInsertTable/tableStyle.js +154 -0
- package/cypress/e2e/ILC/Compass/compassPreviewContent.smoke.js +1 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +41 -17
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +24 -12
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +47 -20
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +43 -16
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/manuallyAndNonScoredScoring.js +5 -5
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +52 -21
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionBasic.js +23 -11
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +55 -21
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +53 -21
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +48 -19
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneBasic.js +23 -11
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +47 -17
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +50 -19
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +0 -2
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +3 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +0 -3
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +2 -1
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +4 -4
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions4.js +261 -0
- package/cypress/e2e/ILC/EssayResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +4 -2
- package/cypress/e2e/ILC/EssayResponseBasic/gradingViewAndCorrectAnswerViewContents.smoke.js +4 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneAlternateAnswerPopup.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +5 -3
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAlternateAnswerPopup.js +1 -0
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillColor.js +3 -0
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +15 -0
- package/cypress/e2e/ILC/GridFill/customizeLayoutSectionShadeCellsGridBorders.js +10 -0
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -1
- package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +3 -2
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +56 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +3 -3
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +2 -2
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +16 -16
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +4 -5
- package/cypress/e2e/ILC/TextEntryMath/customSettings.js +8 -22
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +19 -19
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -2
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +5 -5
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +1 -4
- package/cypress/e2e/ILC/ToolAudioPlayerNew/studentViewSettings.js +8 -2
- package/cypress/fixtures/theme/ilc.json +9 -5
- package/cypress/pages/components/ckEditorAudioPlayerComponent.js +615 -0
- package/cypress/pages/components/ckEditorEquationEditorComponent.js +41 -0
- package/cypress/pages/components/ckEditorInsertTableComponent.js +741 -0
- package/cypress/pages/components/essayResponseCommonComponents.js +145 -7
- package/cypress/pages/components/imageCanvasComponent.js +2 -2
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/layoutSectionComponent.js +25 -4
- package/cypress/pages/components/numberLineCommonComponent.js +39 -0
- package/cypress/pages/components/optionsWrapperComponent.js +1 -1
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +28 -0
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -1
- package/cypress/pages/graphingPage.js +8 -8
- package/cypress/pages/gridFillPage.js +11 -11
- package/cypress/pages/multipleSelectionPage.js +12 -0
- package/cypress/pages/singleSelectionPage.js +1 -1
- package/cypress/pages/textEntryMathPage.js +18 -0
- package/cypress/pages/textEntryMathWithImagePage.js +15 -2
- package/cypress/pages/textSelectionPage.js +7 -1
- package/package.json +1 -1
@@ -0,0 +1,134 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { multipleSelectionPage } from "../../../pages";
|
3
|
+
import constants from "../../../fixtures/constants";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
|
7
|
+
describe('Audio player: Edit tab', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Transcript : Preview tab', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
18
|
+
multipleSelectionPage.steps.selectAudioPlayerOptionFromCKEditorToolbar();
|
19
|
+
multipleSelectionPage.steps.clickOnUploadAudioFileRadioButton();
|
20
|
+
multipleSelectionPage.steps.uploadFile('sample.mp3');
|
21
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.fileUploadProgressBar(), 'hidden');
|
22
|
+
multipleSelectionPage.steps.clickOnOKButton();
|
23
|
+
multipleSelectionPage.steps.focusInAndFocusOutOfQuestionInstructionsInputField();
|
24
|
+
multipleSelectionPage.steps.switchToPreviewTab();
|
25
|
+
});
|
26
|
+
|
27
|
+
it('When the user has not set any transcript, then the transcript button should not be for audio player in the preview tab', () => {
|
28
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.transcriptButton(), 'notExist');
|
29
|
+
});
|
30
|
+
|
31
|
+
it('When user uploads transcript file in txt format, then the transcript button should be enabled for audio player in the preview tab.', () => {
|
32
|
+
multipleSelectionPage.steps.switchToEditTab();
|
33
|
+
multipleSelectionPage.steps.clickOnAudioPlayerBlock();
|
34
|
+
multipleSelectionPage.steps.uploadTranscriptFile('sample.txt');
|
35
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.transcriptFileUploadProgressBar(), 'visible');
|
36
|
+
multipleSelectionPage.steps.clickOnOKButton();
|
37
|
+
multipleSelectionPage.steps.focusInAndFocusOutOfQuestionInstructionsInputField();
|
38
|
+
multipleSelectionPage.steps.switchToPreviewTab();
|
39
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.transcriptButton(), 'visible');
|
40
|
+
multipleSelectionPage.steps.verifyPlaybackTranscriptButtonEnabledState();
|
41
|
+
});
|
42
|
+
|
43
|
+
it('When the user hovers over the \'Transcript\' button, a tooltip \'Show transcript\' should be displayed and on moving away the focus, the tooltip should disappear', () => {
|
44
|
+
multipleSelectionPage.transcriptButton()
|
45
|
+
.verifyTooltip('Show transcript');
|
46
|
+
});
|
47
|
+
|
48
|
+
it('When user has entered transcript or subtitles for uploaded audio file, then the transcript button should be enabled for audio player in the preview tab', () => {
|
49
|
+
multipleSelectionPage.steps.switchToEditTab();
|
50
|
+
multipleSelectionPage.steps.clickOnAudioPlayerBlock();
|
51
|
+
multipleSelectionPage.steps.clickOnTypeInTranscriptRadioButton();
|
52
|
+
multipleSelectionPage.steps.enterTextInTranscriptInputField('In triangle ABC,m ∠ ABC = (4x-12) ° and m ∠ ACB = (2x + 26) °');
|
53
|
+
multipleSelectionPage.steps.clickOnOKButton();
|
54
|
+
multipleSelectionPage.steps.focusInAndFocusOutOfQuestionInstructionsInputField();
|
55
|
+
multipleSelectionPage.steps.switchToPreviewTab();
|
56
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.transcriptButton(), 'visible');
|
57
|
+
multipleSelectionPage.steps.verifyPlaybackTranscriptButtonEnabledState();
|
58
|
+
});
|
59
|
+
|
60
|
+
it('Accessibility of transcript section inline with audio player in preview tab if transcript icon is enabled', { tags: 'a11y' }, () => {
|
61
|
+
cy.checkAccessibility(multipleSelectionPage.playbackPlayer());
|
62
|
+
});
|
63
|
+
});
|
64
|
+
|
65
|
+
describe('Transcript Modal content', () => {
|
66
|
+
abortEarlySetup();
|
67
|
+
before(() => {
|
68
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
69
|
+
cy.barsPreLoaderWait();
|
70
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
71
|
+
multipleSelectionPage.steps.selectAudioPlayerOptionFromCKEditorToolbar();
|
72
|
+
multipleSelectionPage.steps.clickOnUploadAudioFileRadioButton();
|
73
|
+
multipleSelectionPage.steps.uploadFile('sample.mp3');
|
74
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.fileUploadProgressBar(), 'hidden');
|
75
|
+
multipleSelectionPage.steps.clickOnTypeInTranscriptRadioButton();
|
76
|
+
multipleSelectionPage.steps.enterTextInTranscriptInputField('In triangle ABC,m ∠ ABC = (4x-12) ° and m ∠ ACB = (2x + 26) °');
|
77
|
+
multipleSelectionPage.steps.clickOnOKButton();
|
78
|
+
});
|
79
|
+
|
80
|
+
it('When the user clicks on the transcript button, a transcript modal should appear', () => {
|
81
|
+
multipleSelectionPage.steps.focusInAndFocusOutOfQuestionInstructionsInputField();
|
82
|
+
multipleSelectionPage.steps.switchToPreviewTab();
|
83
|
+
multipleSelectionPage.steps.clickOnTranscriptButton();
|
84
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.transcriptModal(), 'visible');
|
85
|
+
});
|
86
|
+
|
87
|
+
it('\'Transcript\' title should be displayed in the transcript modal', () => {
|
88
|
+
utilities.verifyInnerText(multipleSelectionPage.transcriptModalTitle(), 'Transcript');
|
89
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.transcriptModalTitle(), 'visible');
|
90
|
+
});
|
91
|
+
|
92
|
+
it('A \'X\' close button should be displayed in the transcript modal', () => {
|
93
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.transcriptModalCloseButton(), 'visible');
|
94
|
+
});
|
95
|
+
|
96
|
+
it('When the user hovers over the \'Close\' button, a tooltip \'Close\' should be displayed and on moving away the focus, the tooltip should disappear', () => {
|
97
|
+
multipleSelectionPage.transcriptModalCloseButton()
|
98
|
+
.verifyTooltip('Close');
|
99
|
+
});
|
100
|
+
|
101
|
+
it('The text entered in the transcript input field should be displayed in the transcript modal', () => {
|
102
|
+
utilities.verifyInnerText(multipleSelectionPage.transcriptModalContent(), 'In triangle ABC,m ∠ ABC = (4x-12) ° and m ∠ ACB = (2x + 26) °');
|
103
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.transcriptModalContent(), 'visible');
|
104
|
+
});
|
105
|
+
|
106
|
+
it('CSS of transcript modal', { tags: 'css' }, () => {
|
107
|
+
utilities.verifyCSS(multipleSelectionPage.transcriptModal(), {
|
108
|
+
'background-color': 'rgb(245, 248, 255)'
|
109
|
+
});
|
110
|
+
utilities.verifyCSS(multipleSelectionPage.transcriptModalTitle(), {
|
111
|
+
'color': 'rgb(0, 0, 48)',
|
112
|
+
'font-size': '16px',
|
113
|
+
'font-weight': '600'
|
114
|
+
});
|
115
|
+
utilities.verifyCSS(multipleSelectionPage.transcriptModalCloseButton().find('svg path'), {
|
116
|
+
'fill': 'rgb(82, 0, 255)'
|
117
|
+
});
|
118
|
+
utilities.verifyCSS(multipleSelectionPage.transcriptModalContent(), {
|
119
|
+
'color': 'rgb(0, 0, 46)',
|
120
|
+
'font-size': '14px',
|
121
|
+
'font-weight': '400'
|
122
|
+
});
|
123
|
+
});
|
124
|
+
|
125
|
+
it('Accessibility of transcript modal', { tags: 'a11y' }, () => {
|
126
|
+
cy.checkAccessibility(multipleSelectionPage.transcriptModal());
|
127
|
+
});
|
128
|
+
|
129
|
+
it('The user should be able to close the transcript modal', () => {
|
130
|
+
multipleSelectionPage.steps.closeTranscriptModal();
|
131
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.transcriptModal(), 'notExist')
|
132
|
+
});
|
133
|
+
});
|
134
|
+
});
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { multipleSelectionPage } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Equation Editor: Edit tab', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Header and Base section', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
17
|
+
multipleSelectionPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
18
|
+
});
|
19
|
+
|
20
|
+
it('\'Equation Editor\' label, \'Ok\' and \'Cancel\' button should be displayed.', () => {
|
21
|
+
utilities.verifyInnerText(multipleSelectionPage.equationEditorLabel(), 'Equation Editor');
|
22
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.equationEditorLabel(), 'visible');
|
23
|
+
utilities.verifyInnerText(multipleSelectionPage.buttonOk(), 'OK');
|
24
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.buttonOk(), 'visible');
|
25
|
+
utilities.verifyInnerText(multipleSelectionPage.buttonCancel(), 'Cancel');
|
26
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.buttonCancel(), 'visible');
|
27
|
+
});
|
28
|
+
|
29
|
+
it('\'Select Mode\' label with \'Editor\', \'LaTex code\' and \'MathML\' radio button should be displayed. Also \'ARIA label\' label should be displayed with Chevron Down Icon. By default \'Editor\' should be selected', () => {
|
30
|
+
utilities.verifyInnerText(multipleSelectionPage.selectModeLabel(), 'Select Mode');
|
31
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.selectModeLabel(), 'visible');
|
32
|
+
utilities.verifyInnerText(multipleSelectionPage.editorLabel(), 'Editor');
|
33
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.editorLabel(), 'visible');
|
34
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.editorButton(), 'visible');
|
35
|
+
utilities.verifyInnerText(multipleSelectionPage.latexCodeLabel(), 'LaTex code');
|
36
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.latexCodeLabel(), 'visible');
|
37
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.latexCodeButton(), 'visible');
|
38
|
+
utilities.verifyInnerText(multipleSelectionPage.mathMLLabel(), 'MathML');
|
39
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.mathMLLabel(), 'visible');
|
40
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.mathMLButton(), 'visible');
|
41
|
+
utilities.verifyInnerText(multipleSelectionPage.ariaLabelText(), 'ARIA label');
|
42
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.ariaLabelText(), 'visible');
|
43
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.chevronDownIcon(), 'visible');
|
44
|
+
});
|
45
|
+
});
|
46
|
+
});
|
@@ -0,0 +1,98 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { multipleSelectionPage } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Insert Table: Edit tab', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Header and Base section', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
17
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
18
|
+
});
|
19
|
+
|
20
|
+
it('\'Table Properties\' label, \'Ok\' and \'Cancel\' button should be displayed.', () => {
|
21
|
+
utilities.verifyInnerText(multipleSelectionPage.tablePropertyLabel(), 'Table Properties');
|
22
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.tablePropertyLabel(), 'visible');
|
23
|
+
utilities.verifyInnerText(multipleSelectionPage.buttonOk(), 'OK');
|
24
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.buttonOk(), 'visible');
|
25
|
+
utilities.verifyInnerText(multipleSelectionPage.buttonCancel(), 'Cancel');
|
26
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.buttonCancel(), 'visible');
|
27
|
+
});
|
28
|
+
|
29
|
+
it('CSS of \'Table Properties\' label, \'Ok\' and \'Cancel\' button', { tags: 'css' }, () => {
|
30
|
+
utilities.verifyCSS(multipleSelectionPage.tablePropertyLabel(), {
|
31
|
+
'color': 'rgb(72, 72, 72)',
|
32
|
+
'font-size': '12px',
|
33
|
+
'font-weight': '700'
|
34
|
+
});;
|
35
|
+
utilities.verifyCSS(multipleSelectionPage.buttonOk(), {
|
36
|
+
'color': 'rgb(255, 255, 255)',
|
37
|
+
'font-size': '12px',
|
38
|
+
'background-color': 'rgb(13, 71, 161)'
|
39
|
+
});
|
40
|
+
utilities.verifyCSS(multipleSelectionPage.buttonCancel(), {
|
41
|
+
'color': 'rgb(72, 72, 72)',
|
42
|
+
'font-size': '12px',
|
43
|
+
'background-color': 'rgb(248, 248, 248)'
|
44
|
+
});
|
45
|
+
});
|
46
|
+
|
47
|
+
it('Accessibility of \'Table Properties\' section', { tags: 'a11y' }, () => {
|
48
|
+
cy.checkAccessibility(multipleSelectionPage.tablePropertyWrapper());
|
49
|
+
});
|
50
|
+
});
|
51
|
+
|
52
|
+
describe('Cancel Button', () => {
|
53
|
+
abortEarlySetup();
|
54
|
+
before(() => {
|
55
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
56
|
+
cy.barsPreLoaderWait();
|
57
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
58
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
59
|
+
});
|
60
|
+
|
61
|
+
it('When the user clicks on \'Cancel\' button without making any change, then question instruction section should not contain a table', () => {
|
62
|
+
multipleSelectionPage.steps.selectCancelButtonFromCKEditorToolbar();
|
63
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.tableInQuestionInstructionSection(), 'notExist');
|
64
|
+
});
|
65
|
+
|
66
|
+
it('When the user makes any change in row count and clicks on cancel button, then the changes should not be displayed', () => {
|
67
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
68
|
+
multipleSelectionPage.steps.incrementRowCount();
|
69
|
+
multipleSelectionPage.steps.selectCancelButtonFromCKEditorToolbar();
|
70
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.tableInQuestionInstructionSection(), 'notExist');
|
71
|
+
});
|
72
|
+
});
|
73
|
+
|
74
|
+
describe('Ok Button', () => {
|
75
|
+
abortEarlySetup();
|
76
|
+
before(() => {
|
77
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
78
|
+
cy.barsPreLoaderWait();
|
79
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
80
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
81
|
+
});
|
82
|
+
|
83
|
+
it('When the user clicks on \'Ok\' button without making any change, then question instruction section should contain a table according to the updated row count', () => {
|
84
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
85
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.tableInQuestionInstructionSection(), 'visible');
|
86
|
+
multipleSelectionPage.steps.checkNumberOfRowsAndColumnsPresentInTable(3, 2);
|
87
|
+
});
|
88
|
+
|
89
|
+
it('When the user clicks on \'ok\' button after increasing the row count by one the table should be visible according to the update rows ad columns', () => {
|
90
|
+
multipleSelectionPage.steps.clearInPromptInputField();
|
91
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
92
|
+
multipleSelectionPage.steps.incrementRowCount();
|
93
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
94
|
+
multipleSelectionPage.steps.checkNumberOfRowsAndColumnsPresentInTable(4, 2);
|
95
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.tableInQuestionInstructionSection(), 'visible');
|
96
|
+
});
|
97
|
+
});
|
98
|
+
});
|
@@ -0,0 +1,147 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { multipleSelectionPage } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const alignmentStyle = ['left', 'center', 'right'];
|
6
|
+
|
7
|
+
describe('Insert Table: Edit tab', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Table Dimension', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
18
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
19
|
+
});
|
20
|
+
|
21
|
+
it('\'Table dimensions\' label, 2 radio button named \'Full width\', \'Auto adjust width as per content\' should be displayed along with \'Width (px)\', \'Height (px)\' label with input field', () => {
|
22
|
+
utilities.verifyInnerText(multipleSelectionPage.tableDimensionsLabel(), 'Table dimensions');
|
23
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.tableDimensionsLabel(), 'visible');
|
24
|
+
utilities.verifyInnerText(multipleSelectionPage.fullWidthLabel(), 'Full width');
|
25
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.fullWidthLabel(), 'visible');
|
26
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.fullWidthRadioButton(), 'visible');
|
27
|
+
utilities.verifyInnerText(multipleSelectionPage.autoAdjustLabel(), 'Auto adjust width as per content');
|
28
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.autoAdjustLabel(), 'visible');
|
29
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.autoAdjustRadioButton(), 'visible');
|
30
|
+
utilities.verifyInnerText(multipleSelectionPage.widthPxLabel(), 'Width (px)');
|
31
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.widthPxLabel(), 'visible');
|
32
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.widthPxInput(), 'visible');
|
33
|
+
utilities.verifyInnerText(multipleSelectionPage.heightPxLabel(), 'Height (px)');
|
34
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.heightPxLabel(), 'visible');
|
35
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.heightPxInput(), 'visible');
|
36
|
+
});
|
37
|
+
|
38
|
+
it('CSS of \'Border size\' label and input field, \'Striped\' label and strip options and \'Add hover state\' label and dropdown', { tags: 'css' }, () => {
|
39
|
+
utilities.verifyCSS(multipleSelectionPage.tableDimensionsLabel(), {
|
40
|
+
'color': 'rgb(0, 0, 0)',
|
41
|
+
'font-size': '12px',
|
42
|
+
'font-weight': '400'
|
43
|
+
});
|
44
|
+
utilities.verifyCSS(multipleSelectionPage.fullWidthLabel(), {
|
45
|
+
'color': 'rgb(0, 0, 0)',
|
46
|
+
'font-size': '12px',
|
47
|
+
'font-weight': '400'
|
48
|
+
});
|
49
|
+
utilities.verifyCSS(multipleSelectionPage.autoAdjustLabel(), {
|
50
|
+
'color': 'rgb(0, 0, 0)',
|
51
|
+
'font-size': '12px',
|
52
|
+
'font-weight': '400'
|
53
|
+
});
|
54
|
+
utilities.verifyCSS(multipleSelectionPage.widthPxLabel(), {
|
55
|
+
'color': 'rgb(0, 0, 0)',
|
56
|
+
'font-size': '12px',
|
57
|
+
'font-weight': '400'
|
58
|
+
});
|
59
|
+
utilities.verifyCSS(multipleSelectionPage.heightPxLabel(), {
|
60
|
+
'color': 'rgb(0, 0, 0)',
|
61
|
+
'font-size': '12px',
|
62
|
+
'font-weight': '400'
|
63
|
+
});
|
64
|
+
});
|
65
|
+
|
66
|
+
it('By default \'Full Width\' would be selected and user should be able to enter value in the width and height input field. Pressing on ok should reflect the properties on the table', () => {
|
67
|
+
multipleSelectionPage.steps.verifyFullWidthRadioButtonChecked();
|
68
|
+
multipleSelectionPage.steps.verifyAutoAdjustRadioButtonUnchecked();
|
69
|
+
utilities.verifyElementNotDisabled(multipleSelectionPage.widthPxInput());
|
70
|
+
utilities.verifyElementNotDisabled(multipleSelectionPage.heightPxInput());
|
71
|
+
multipleSelectionPage.steps.enterWidthPx('500');
|
72
|
+
multipleSelectionPage.steps.enterHeightPx('400');
|
73
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
74
|
+
multipleSelectionPage.steps.verifyWidthOfTheTable('500');
|
75
|
+
multipleSelectionPage.steps.verifyHeightOfTheTable('400');
|
76
|
+
});
|
77
|
+
|
78
|
+
it('When user select \'Auto adjust width as per content\' radio button, the width input field becomes disabled and user should only be able to enter the height in the height input field', () => {
|
79
|
+
multipleSelectionPage.steps.clearInPromptInputField();
|
80
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
81
|
+
multipleSelectionPage.steps.clickOnAutoAdjustRadioButton();
|
82
|
+
multipleSelectionPage.steps.verifyFullWidthRadioButtonUnchecked();
|
83
|
+
multipleSelectionPage.steps.verifyAutoAdjustRadioButtonChecked();
|
84
|
+
utilities.verifyElementDisabled(multipleSelectionPage.widthPxInput());
|
85
|
+
utilities.verifyElementNotDisabled(multipleSelectionPage.heightPxInput());
|
86
|
+
multipleSelectionPage.steps.enterHeightPx('400');
|
87
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
88
|
+
multipleSelectionPage.steps.verifyHeightOfTheTable('400');
|
89
|
+
});
|
90
|
+
});
|
91
|
+
|
92
|
+
describe('Alignment, Caption and Summary', () => {
|
93
|
+
abortEarlySetup();
|
94
|
+
before(() => {
|
95
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
96
|
+
cy.barsPreLoaderWait();
|
97
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
98
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
99
|
+
});
|
100
|
+
|
101
|
+
it('\'Alignment\' label with drop down, \'Caption\' label with input field and \'Summary\' label with input field should be displayed', () => {
|
102
|
+
multipleSelectionPage.steps.scrollingDownToAlignmentLabel();
|
103
|
+
utilities.verifyInnerText(multipleSelectionPage.alignmentLabel(), 'Alignment');
|
104
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.alignmentLabel(), 'visible');
|
105
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.alignmentDropDown(), 'visible');
|
106
|
+
utilities.verifyInnerText(multipleSelectionPage.captionLabel(), 'Caption');
|
107
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.captionLabel(), 'visible');
|
108
|
+
utilities.verifyInnerText(multipleSelectionPage.captionInputField(), '');
|
109
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.captionInputField(), 'visible');
|
110
|
+
utilities.verifyInnerText(multipleSelectionPage.summaryLabel(), 'Summary');
|
111
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.summaryLabel(), 'visible');
|
112
|
+
utilities.verifyInnerText(multipleSelectionPage.summaryInputField(), '');
|
113
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.summaryInputField(), 'visible');
|
114
|
+
});
|
115
|
+
|
116
|
+
it('CSS of \'Border size\' label and input field, \'Striped\' label and strip options and \'Add hover state\' label and dropdown', { tags: 'css' }, () => {
|
117
|
+
utilities.verifyCSS(multipleSelectionPage.alignmentLabel(), {
|
118
|
+
'color': 'rgb(0, 0, 0)',
|
119
|
+
'font-size': '12px',
|
120
|
+
'font-weight': '400'
|
121
|
+
});
|
122
|
+
utilities.verifyCSS(multipleSelectionPage.captionLabel(), {
|
123
|
+
'color': 'rgb(0, 0, 0)',
|
124
|
+
'font-size': '12px',
|
125
|
+
'font-weight': '400'
|
126
|
+
});
|
127
|
+
utilities.verifyCSS(multipleSelectionPage.summaryLabel(), {
|
128
|
+
'color': 'rgb(0, 0, 0)',
|
129
|
+
'font-size': '12px',
|
130
|
+
'font-weight': '400'
|
131
|
+
});
|
132
|
+
});
|
133
|
+
|
134
|
+
it('When user enters caption and summary it should reflect in the table', () => {
|
135
|
+
multipleSelectionPage.steps.enterCaption('Table');
|
136
|
+
multipleSelectionPage.steps.enterSummary('Table For Zeus');
|
137
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
138
|
+
utilities.verifyInnerText(multipleSelectionPage.captionOfTheTable(), 'Table');
|
139
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.captionOfTheTable(), 'visible');
|
140
|
+
multipleSelectionPage.steps.verifySummaryOfTheTable('Table For Zeus');
|
141
|
+
});
|
142
|
+
|
143
|
+
//Unable to click on dropdown using click/realclick need to test manually
|
144
|
+
it('User should be able to select different and alignment option and it should reflect in the table', () => {
|
145
|
+
});
|
146
|
+
});
|
147
|
+
});
|
@@ -0,0 +1,127 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { multipleSelectionPage } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Insert Table: Edit tab', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Header section', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
17
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
18
|
+
});
|
19
|
+
|
20
|
+
it('\'Headers\' label, \'Rows\' label with input field and \'Columns\' label with input field should be displayed.', () => {
|
21
|
+
utilities.verifyInnerText(multipleSelectionPage.headerLabel(), 'Headers');
|
22
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.headerLabel(), 'visible');
|
23
|
+
utilities.verifyInnerText(multipleSelectionPage.rowHeaderLabel(), 'Rows');
|
24
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.rowHeaderLabel(), 'visible');
|
25
|
+
utilities.verifyInnerText(multipleSelectionPage.rowHeaderInput(), '');
|
26
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.rowHeaderInput(), 'visible');
|
27
|
+
utilities.verifyInnerText(multipleSelectionPage.columnHeaderLabel(), 'Columns');
|
28
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.columnHeaderLabel(), 'visible');
|
29
|
+
utilities.verifyInnerText(multipleSelectionPage.columnHeaderInput(), '');
|
30
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.columnHeaderInput(), 'visible');
|
31
|
+
});
|
32
|
+
|
33
|
+
it('CSS of \'Border size\' label and input field, \'Striped\' label and strip options and \'Add hover state\' label and dropdown', { tags: 'css' }, () => {
|
34
|
+
utilities.verifyCSS(multipleSelectionPage.headerLabel(), {
|
35
|
+
'color': 'rgb(0, 0, 0)',
|
36
|
+
'font-size': '12px',
|
37
|
+
'font-weight': '700'
|
38
|
+
});
|
39
|
+
utilities.verifyCSS(multipleSelectionPage.rowHeaderLabel(), {
|
40
|
+
'color': 'rgb(0, 0, 0)',
|
41
|
+
'font-size': '12px',
|
42
|
+
'font-weight': '400'
|
43
|
+
});
|
44
|
+
utilities.verifyCSS(multipleSelectionPage.rowHeaderInput(), {
|
45
|
+
'color': 'rgb(0, 0, 0)',
|
46
|
+
'font-size': '12px',
|
47
|
+
'font-weight': '400'
|
48
|
+
});
|
49
|
+
utilities.verifyCSS(multipleSelectionPage.columnHeaderLabel(), {
|
50
|
+
'color': 'rgb(0, 0, 0)',
|
51
|
+
'font-size': '12px',
|
52
|
+
'font-weight': '400'
|
53
|
+
});
|
54
|
+
utilities.verifyCSS(multipleSelectionPage.columnHeaderInput(), {
|
55
|
+
'color': 'rgb(0, 0, 0)',
|
56
|
+
'font-size': '12px',
|
57
|
+
'font-weight': '400'
|
58
|
+
});
|
59
|
+
});
|
60
|
+
|
61
|
+
it('When the user increases row and column header by one using increment operator, then on clicking Ok the changes should be reflected on the table', () => {
|
62
|
+
multipleSelectionPage.steps.incrementRowHeaderCount();
|
63
|
+
multipleSelectionPage.steps.incrementColumnHeaderCount();
|
64
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
65
|
+
multipleSelectionPage.steps.checkHeaderForContainerNumber('0');
|
66
|
+
multipleSelectionPage.steps.checkHeaderForContainerNumber('1');
|
67
|
+
multipleSelectionPage.steps.checkHeaderForContainerNumber('2');
|
68
|
+
multipleSelectionPage.steps.checkHeaderForContainerNumber('4');
|
69
|
+
});
|
70
|
+
|
71
|
+
it('When the user increases row and column header by one using keyboard, then on clicking Ok the changes should be reflected on the table', () => {
|
72
|
+
multipleSelectionPage.steps.clearInPromptInputField();
|
73
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
74
|
+
multipleSelectionPage.steps.typeRowHeaderValue('1');
|
75
|
+
multipleSelectionPage.steps.typeColumnHeaderValue('1');
|
76
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
77
|
+
multipleSelectionPage.steps.checkHeaderForContainerNumber('0');
|
78
|
+
multipleSelectionPage.steps.checkHeaderForContainerNumber('1');
|
79
|
+
multipleSelectionPage.steps.checkHeaderForContainerNumber('2');
|
80
|
+
multipleSelectionPage.steps.checkHeaderForContainerNumber('4');
|
81
|
+
});
|
82
|
+
|
83
|
+
it('When user has made header row count either equal or more then the total number of rows then an error message \'Value must be less than the total number of rows.\' should be visible below row header section', () => {
|
84
|
+
multipleSelectionPage.steps.clearInPromptInputField();
|
85
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
86
|
+
multipleSelectionPage.steps.typeRowHeaderValue('3');
|
87
|
+
utilities.verifyInnerText(multipleSelectionPage.rowHeaderErrorMessage(), 'Value must be less than the\ntotal number of rows.');
|
88
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.rowHeaderErrorMessage(), 'visible');
|
89
|
+
multipleSelectionPage.steps.typeRowHeaderValue('4');
|
90
|
+
utilities.verifyInnerText(multipleSelectionPage.rowHeaderErrorMessage(), 'Value must be less than the\ntotal number of rows.');
|
91
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.rowHeaderErrorMessage(), 'visible');
|
92
|
+
multipleSelectionPage.steps.typeRowHeaderValue('2');
|
93
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.rowHeaderErrorMessage(), 'hidden');
|
94
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
95
|
+
});
|
96
|
+
|
97
|
+
it('When user has made header column count either equal or more then the total number of columns then an error message \'Value must be less than the total number of columns.\' should be visible below column header section', () => {
|
98
|
+
multipleSelectionPage.steps.clearInPromptInputField();
|
99
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
100
|
+
multipleSelectionPage.steps.typeColumnHeaderValue('2');
|
101
|
+
utilities.verifyInnerText(multipleSelectionPage.columnHeaderErrorMessage(), 'Value must be less than the\ntotal number of columns.');
|
102
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.columnHeaderErrorMessage(), 'visible');
|
103
|
+
multipleSelectionPage.steps.typeColumnHeaderValue('3');
|
104
|
+
utilities.verifyInnerText(multipleSelectionPage.columnHeaderErrorMessage(), 'Value must be less than the\ntotal number of columns.');
|
105
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.columnHeaderErrorMessage(), 'visible');
|
106
|
+
multipleSelectionPage.steps.typeColumnHeaderValue('1');
|
107
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.columnHeaderErrorMessage(), 'hidden');
|
108
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
109
|
+
});
|
110
|
+
|
111
|
+
it('\'Make first row a title header\' label should be displayed but in disable state', () => {
|
112
|
+
multipleSelectionPage.steps.clearInPromptInputField();
|
113
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
114
|
+
utilities.verifyInnerText(multipleSelectionPage.firstRowHeaderLabel(), ' Make first row a title header');
|
115
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.firstRowHeaderLabel(), 'visible');
|
116
|
+
utilities.verifyElementDisabled(multipleSelectionPage.firstRowHeaderCheckBox());
|
117
|
+
});
|
118
|
+
|
119
|
+
it('When row header is set the \'Make first row a title header\' checkbox gets enabled, selecting it should make the 1st row a title row merging all the columns present in 1st row', () => {
|
120
|
+
multipleSelectionPage.steps.typeRowHeaderValue('2');
|
121
|
+
utilities.verifyElementNotDisabled(multipleSelectionPage.firstRowHeaderCheckBox());
|
122
|
+
multipleSelectionPage.steps.clickOnFirstRowHeaderCheckBox();
|
123
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
124
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.firstRowHeaderInTable(), 'visible');
|
125
|
+
});
|
126
|
+
});
|
127
|
+
});
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { multipleSelectionPage } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Insert Table: Edit tab', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Row and Column Of Table', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
17
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
18
|
+
});
|
19
|
+
|
20
|
+
it('\'Row\' label with input field and \'Column\' label with input field should be visible', () => {
|
21
|
+
utilities.verifyInnerText(multipleSelectionPage.rowLabel(), 'Rows');
|
22
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.rowLabel(), 'visible');
|
23
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.rowInputField(), 'visible');
|
24
|
+
utilities.verifyInnerText(multipleSelectionPage.columnLabel(), 'Columns');
|
25
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.columnLabel(), 'visible');
|
26
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.columnInputField(), 'visible');
|
27
|
+
});
|
28
|
+
|
29
|
+
it('CSS of \'Border size\' label and input field, \'Striped\' label and strip options and \'Add hover state\' label and dropdown', { tags: 'css' }, () => {
|
30
|
+
utilities.verifyCSS(multipleSelectionPage.rowLabel(), {
|
31
|
+
'color': 'rgb(0, 0, 0)',
|
32
|
+
'font-size': '12px',
|
33
|
+
'font-weight': '400'
|
34
|
+
});
|
35
|
+
utilities.verifyCSS(multipleSelectionPage.columnLabel(), {
|
36
|
+
'color': 'rgb(0, 0, 0)',
|
37
|
+
'font-size': '12px',
|
38
|
+
'font-weight': '400'
|
39
|
+
});
|
40
|
+
});
|
41
|
+
|
42
|
+
it('User should be able to increase and decrease rows and columns using buttons and it should be visible on the table', () => {
|
43
|
+
multipleSelectionPage.steps.incrementRowCount();
|
44
|
+
multipleSelectionPage.steps.incrementColumnCount();
|
45
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
46
|
+
multipleSelectionPage.steps.checkNumberOfRowsAndColumnsPresentInTable(4, 3);
|
47
|
+
multipleSelectionPage.steps.clearInPromptInputField();
|
48
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
49
|
+
multipleSelectionPage.steps.decrementRowCount();
|
50
|
+
multipleSelectionPage.steps.decrementColumnCount();
|
51
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
52
|
+
multipleSelectionPage.steps.checkNumberOfRowsAndColumnsPresentInTable(2, 1);
|
53
|
+
});
|
54
|
+
|
55
|
+
it('User should be able to type value in row and column input field and it should reflect on table', () => {
|
56
|
+
multipleSelectionPage.steps.clearInPromptInputField();
|
57
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
58
|
+
multipleSelectionPage.steps.typeRowValue('5');
|
59
|
+
multipleSelectionPage.steps.typeColumnValue('6');
|
60
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
61
|
+
multipleSelectionPage.steps.checkNumberOfRowsAndColumnsPresentInTable(5, 6);
|
62
|
+
});
|
63
|
+
|
64
|
+
it('When user empties the row and column input field and error message should display \'Value must be greater than zero.\' below both row and column input field', () => {
|
65
|
+
multipleSelectionPage.steps.clearInPromptInputField();
|
66
|
+
multipleSelectionPage.steps.selectTableButtonOptionFromCKEditorToolbar();
|
67
|
+
multipleSelectionPage.steps.emptyRowAndCheckErrorMessage();
|
68
|
+
multipleSelectionPage.steps.emptyColumnAndCheckErrorMessage();
|
69
|
+
});
|
70
|
+
});
|
71
|
+
});
|