itemengine-cypress-automation 1.0.256-updatingToOTKV2-5b0ef53.0 → 1.0.257
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTab.js +21 -21
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTabSupportedFileTypes.js +6 -6
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTabTranscript.js +4 -4
- package/cypress/e2e/ILC/CkEditorEquationEditor/equationEditorBasicFile.js +86 -5
- package/cypress/e2e/ILC/CkEditorEquationEditor/selectModeEditorBasic.js +114 -0
- package/cypress/e2e/ILC/CkEditorInsertImage/imageInfo.js +160 -0
- package/cypress/e2e/ILC/CkEditorInsertImage/insertImageBasicFile.js +83 -0
- package/cypress/e2e/ILC/CkEditorInsertImage/upload.js +53 -0
- package/cypress/e2e/ILC/CkEditorLink/linkBasic.js +85 -0
- package/cypress/e2e/ILC/CkEditorLink/linkInfoSection.js +94 -0
- package/cypress/e2e/ILC/CkEditorLink/linkPreview.js +38 -0
- package/cypress/e2e/ILC/CkEditorLink/uploadSection.js +59 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +14 -279
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +78 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +2 -2
- package/cypress/e2e/ILC/Graphing/acceptRepeatedPoints.js +75 -0
- package/cypress/e2e/ILC/TextEntryMath/additionalSettingsBasic.js +84 -0
- package/cypress/e2e/ILC/TextEntryMath/additionalSettingsForAnswerInputFields.js +286 -0
- package/cypress/e2e/ILC/TextEntryMath/customSettingsSeparators.ts +107 -0
- package/cypress/e2e/ILC/TextEntryMath/equationEditor.smoke.js +99 -0
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +336 -0
- package/cypress/pages/components/ariaLabelSectionComponent.js +1 -1
- package/cypress/pages/components/ckEditorAudioPlayerComponent.js +0 -11
- package/cypress/pages/components/ckEditorEquationEditorComponent.js +175 -7
- package/cypress/pages/components/ckEditorInsertImageComponent.js +272 -0
- package/cypress/pages/components/ckEditorLinkComponent.js +142 -0
- package/cypress/pages/components/customSettingsSeparatorsComponent.ts +97 -0
- package/cypress/pages/components/equationEditorSectionCommonComponent.js +528 -0
- package/cypress/pages/components/gradingViewEnumerationComponent.js +11 -6
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/questionInstructionsComponent.js +10 -0
- package/cypress/pages/essayResponsePage.js +4 -121
- package/cypress/pages/graphingPage.js +24 -2
- package/cypress/pages/multipleSelectionPage.js +8 -0
- package/cypress/pages/textEntryMathPage.js +125 -18
- package/cypress/support/index.d.ts +7 -0
- package/cypress/tsconfig.json +11 -0
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +6 -6
@@ -0,0 +1,160 @@
|
|
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
|
+
const alignmentStyle = ['Left', 'Align Center', 'Right'];
|
7
|
+
|
8
|
+
describe('Insert Image: Edit tab', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Image Info Section: Basic Details', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
19
|
+
multipleSelectionPage.steps.selectImageInsertOptionFromCKEditorToolbar();
|
20
|
+
});
|
21
|
+
|
22
|
+
it('\'Image Info\' and \'Upload\' section should be present in the pop up and by default \'Image Info\' should be selected', () => {
|
23
|
+
utilities.verifyInnerText(multipleSelectionPage.imageInfoButton(), 'Image Info');
|
24
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.imageInfoButton(), 'visible');
|
25
|
+
multipleSelectionPage.steps.verifyImageInfoButtonSelected();
|
26
|
+
utilities.verifyInnerText(multipleSelectionPage.uploadButton(), 'Upload');
|
27
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.uploadButton(), 'visible');
|
28
|
+
});
|
29
|
+
|
30
|
+
it('\'URL\', \'Alternative Text\', \'Width\', \'Height\', \'Border\', \'HSpace\', \'VSpace\' label with input field for each individual label and \'Preview\' label with image preview box should be visible ', () => {
|
31
|
+
utilities.verifyInnerText(multipleSelectionPage.urlLabel(), 'URL');
|
32
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.urlLabel(), 'visible');
|
33
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.urlInputField(), 'visible');
|
34
|
+
utilities.verifyInnerText(multipleSelectionPage.alternateTextLabel(), 'Alternative Text');
|
35
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.alternateTextLabel(), 'visible');
|
36
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.alternateTextInputField(), 'visible');
|
37
|
+
utilities.verifyInnerText(multipleSelectionPage.widthLabel(), 'Width');
|
38
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.widthLabel(), 'visible');
|
39
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.widthInputField(), 'visible');
|
40
|
+
utilities.verifyInnerText(multipleSelectionPage.heightLabel(), 'Height');
|
41
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.heightLabel(), 'visible');
|
42
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.heightInputField(), 'visible');
|
43
|
+
utilities.verifyInnerText(multipleSelectionPage.borderLabel(), 'Border');
|
44
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.borderLabel(), 'visible');
|
45
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.borderInputField(), 'visible');
|
46
|
+
utilities.verifyInnerText(multipleSelectionPage.hSpaceLabel(), 'HSpace');
|
47
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.hSpaceLabel(), 'visible');
|
48
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.hSpaceInputField(), 'visible');
|
49
|
+
utilities.verifyInnerText(multipleSelectionPage.vSpaceLabel(), 'VSpace');
|
50
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.vSpaceLabel(), 'visible');
|
51
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.vSpaceInputField(), 'visible');
|
52
|
+
});
|
53
|
+
|
54
|
+
it('\'Image Responsiveness\' label with 2 radio button \'Responsive\' and \'Fixed\' should be present and by default \'Responsive\' should be selected. Also \'Alignment\' with drop down containing different alignment options should be visible.', () => {
|
55
|
+
utilities.verifyInnerText(multipleSelectionPage.imageResponsivenessLabel(), 'Image Responsiveness');
|
56
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.imageResponsivenessLabel(), 'visible');
|
57
|
+
utilities.verifyInnerText(multipleSelectionPage.responsiveRadioLabel(), 'Responsive');
|
58
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.responsiveRadioLabel(), 'visible');
|
59
|
+
multipleSelectionPage.steps.verifyResponsiveRadioButtonChecked();
|
60
|
+
utilities.verifyInnerText(multipleSelectionPage.fixedRadioLabel(), 'Fixed');
|
61
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.fixedRadioLabel(), 'visible');
|
62
|
+
utilities.verifyInnerText(multipleSelectionPage.alignmentLabel(), 'Alignment');
|
63
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.alignmentLabel(), 'visible');
|
64
|
+
// Unable to click on dropdown using click/realclick need to test manually
|
65
|
+
// multipleSelectionPage.steps.selectAlignmentOptionDropdown(alignmentStyle[0]);
|
66
|
+
});
|
67
|
+
|
68
|
+
it('\'Lock Ratio\' and \'Reset Size\' button should be visible and \'Lock Ratio\' should be checked by default', () => {
|
69
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.lockRatioButton(), 'visible');
|
70
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.resetSizeButton(), 'visible');
|
71
|
+
multipleSelectionPage.steps.verifyLockRatioButtonChecked();
|
72
|
+
});
|
73
|
+
|
74
|
+
it('CSS of label and input field', { tags: 'css' }, () => {
|
75
|
+
utilities.verifyCSS(multipleSelectionPage.imageInfoButton(), {
|
76
|
+
'color': 'rgb(72, 72, 72)',
|
77
|
+
'font-size': '12px',
|
78
|
+
'font-weight': '400'
|
79
|
+
});
|
80
|
+
utilities.verifyCSS(multipleSelectionPage.uploadButton(), {
|
81
|
+
'color': 'rgb(72, 72, 72)',
|
82
|
+
'font-size': '12px',
|
83
|
+
'font-weight': '400'
|
84
|
+
});
|
85
|
+
utilities.verifyCSS(multipleSelectionPage.urlLabel(), {
|
86
|
+
'color': 'rgb(0, 0, 0)',
|
87
|
+
'font-size': '12px',
|
88
|
+
'font-weight': '400'
|
89
|
+
});
|
90
|
+
utilities.verifyCSS(multipleSelectionPage.urlInputField(), {
|
91
|
+
'color': 'rgb(0, 0, 0)',
|
92
|
+
'font-size': '12px',
|
93
|
+
'font-weight': '400'
|
94
|
+
});
|
95
|
+
utilities.verifyCSS(multipleSelectionPage.lockRatioButton(), {
|
96
|
+
'color': 'rgb(0, 0, 0)',
|
97
|
+
'background-color': 'rgba(0, 0, 0, 0)',
|
98
|
+
'height': '16px',
|
99
|
+
'width': '16px'
|
100
|
+
});
|
101
|
+
});
|
102
|
+
});
|
103
|
+
|
104
|
+
describe('Image Info: Image Properties', () => {
|
105
|
+
abortEarlySetup();
|
106
|
+
before(() => {
|
107
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
108
|
+
cy.barsPreLoaderWait();
|
109
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
110
|
+
multipleSelectionPage.steps.selectImageInsertOptionFromCKEditorToolbar();
|
111
|
+
});
|
112
|
+
|
113
|
+
it('User should be able to enters url and alternate text of the image, and the image should exist inside \'Preview Box\' and height and width of the image should automatically gets filled', () => {
|
114
|
+
multipleSelectionPage.steps.addURLInImagePopUp(constants.foxImageLink);
|
115
|
+
multipleSelectionPage.steps.addTextInAlternateText('Fox Image Link');
|
116
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.imageInPreviewBox(), 'exist');
|
117
|
+
multipleSelectionPage.steps.verifyWidthAndHeightInInputField('960', '639');
|
118
|
+
});
|
119
|
+
|
120
|
+
it('When the \'Lock Ratio\' is in checked state and if user changes either width/height of the image, the height/width should automatically gets adjusted in the ratio.', () => {
|
121
|
+
multipleSelectionPage.steps.insertWidth('100');
|
122
|
+
multipleSelectionPage.steps.verifyWidthAndHeightInInputField('100', '67');
|
123
|
+
multipleSelectionPage.steps.insertHeight('200');
|
124
|
+
multipleSelectionPage.steps.verifyWidthAndHeightInInputField('300', '200');
|
125
|
+
});
|
126
|
+
|
127
|
+
it('When the \'Lock Ratio\' is in un-checked state and if user changes either width/height of the image, the height/width should not change', () => {
|
128
|
+
multipleSelectionPage.steps.selectLockRatioButton();
|
129
|
+
multipleSelectionPage.steps.insertWidth('300');
|
130
|
+
multipleSelectionPage.steps.verifyWidthAndHeightInInputField('300', '200');
|
131
|
+
multipleSelectionPage.steps.insertHeight('150');
|
132
|
+
multipleSelectionPage.steps.verifyWidthAndHeightInInputField('300', '150');
|
133
|
+
});
|
134
|
+
|
135
|
+
it('When the user clicks on \'Reset Size\' button then the width and height of the image should be back to its original size', () => {
|
136
|
+
multipleSelectionPage.steps.selectResetSizeButton();
|
137
|
+
multipleSelectionPage.steps.verifyWidthAndHeightInInputField('960', '639');
|
138
|
+
});
|
139
|
+
|
140
|
+
it('When the user adds \'Border\', \'HSpace\' and \'VSpace\' it should be reflected on the image inside the preview box and on question instruction', () => {
|
141
|
+
multipleSelectionPage.steps.insertWidth('300');
|
142
|
+
multipleSelectionPage.steps.insertHeight('150');
|
143
|
+
multipleSelectionPage.steps.insertBorder('5');
|
144
|
+
multipleSelectionPage.steps.insertHSpace('3');
|
145
|
+
multipleSelectionPage.steps.insertVSpace('10');
|
146
|
+
multipleSelectionPage.steps.verifyCssOfImageInDifferentViews('300', '150', '5', '3', '10', 'Preview Box');
|
147
|
+
});
|
148
|
+
|
149
|
+
it('When the user after doing the changes press \'Ok\' the same changes should be visible on the question instruction section', () => {
|
150
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
151
|
+
multipleSelectionPage.steps.verifyCssOfImageInDifferentViews('300', '150', '5', '3', '10', 'Question Instruction');
|
152
|
+
});
|
153
|
+
|
154
|
+
it('The changes and the pic should also be visible in the \'Preview Tab\'', () => {
|
155
|
+
multipleSelectionPage.steps.focusInAndFocusOutOfQuestionInstructionsInputField();
|
156
|
+
multipleSelectionPage.steps.switchToPreviewTab();
|
157
|
+
multipleSelectionPage.steps.verifyCssOfImageInDifferentViews('300', '150', '5', '3', '10', 'Preview Tab');
|
158
|
+
});
|
159
|
+
});
|
160
|
+
});
|
@@ -0,0 +1,83 @@
|
|
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('Insert Image: Edit tab', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Header and Footer Section', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
18
|
+
multipleSelectionPage.steps.selectImageInsertOptionFromCKEditorToolbar();
|
19
|
+
});
|
20
|
+
|
21
|
+
it('\'Image Properties\' label, \'Ok\' and \'Cancel\' button should be displayed.', () => {
|
22
|
+
utilities.verifyInnerText(multipleSelectionPage.imagePropertiesLabel(), 'Image Properties');
|
23
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.imagePropertiesLabel(), 'visible');
|
24
|
+
utilities.verifyInnerText(multipleSelectionPage.buttonOk(), 'OK');
|
25
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.buttonOk(), 'visible');
|
26
|
+
utilities.verifyInnerText(multipleSelectionPage.buttonCancel(), 'Cancel');
|
27
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.buttonCancel(), 'visible');
|
28
|
+
});
|
29
|
+
|
30
|
+
it('CSS of \'Image Properties\' label, \'Ok\' and \'Cancel\' button', { tags: 'css' }, () => {
|
31
|
+
utilities.verifyCSS(multipleSelectionPage.imagePropertiesLabel(), {
|
32
|
+
'color': 'rgb(72, 72, 72)',
|
33
|
+
'font-size': '12px',
|
34
|
+
'font-weight': '700'
|
35
|
+
});;
|
36
|
+
utilities.verifyCSS(multipleSelectionPage.buttonOk(), {
|
37
|
+
'color': 'rgb(255, 255, 255)',
|
38
|
+
'font-size': '12px',
|
39
|
+
'background-color': 'rgb(13, 71, 161)'
|
40
|
+
});
|
41
|
+
utilities.verifyCSS(multipleSelectionPage.buttonCancel(), {
|
42
|
+
'color': 'rgb(72, 72, 72)',
|
43
|
+
'font-size': '12px',
|
44
|
+
'background-color': 'rgb(248, 248, 248)'
|
45
|
+
});
|
46
|
+
});
|
47
|
+
|
48
|
+
it('Accessibility of \'Image Properties\' section', { tags: 'a11y' }, () => {
|
49
|
+
cy.checkAccessibility(multipleSelectionPage.imagePropertyWrapper());
|
50
|
+
});
|
51
|
+
});
|
52
|
+
|
53
|
+
describe('Cancel Button and Ok button', () => {
|
54
|
+
abortEarlySetup();
|
55
|
+
before(() => {
|
56
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
57
|
+
cy.barsPreLoaderWait();
|
58
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
59
|
+
multipleSelectionPage.steps.selectImageInsertOptionFromCKEditorToolbar();
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the user clicks on \'Cancel\' button without making any change, then question instruction section should not contain any image ', () => {
|
63
|
+
multipleSelectionPage.steps.selectCancelButtonFromCKEditorToolbar();
|
64
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.imageInQuestionInstruction(), 'notExist');
|
65
|
+
});
|
66
|
+
|
67
|
+
it('When the user clicks on \'Cancel\' button after adding an image still there should be no image visible in question instruction', () => {
|
68
|
+
multipleSelectionPage.steps.selectImageInsertOptionFromCKEditorToolbar();
|
69
|
+
multipleSelectionPage.steps.addURLInImagePopUp(constants.foxImageLink);
|
70
|
+
multipleSelectionPage.steps.selectCancelButtonFromCKEditorToolbar();
|
71
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.imageInQuestionInstruction(), 'notExist');
|
72
|
+
});
|
73
|
+
|
74
|
+
it('When the user clicks on \'Ok\' button after adding value in url link and alternate text then that image should be visible', () => {
|
75
|
+
multipleSelectionPage.steps.selectImageInsertOptionFromCKEditorToolbar();
|
76
|
+
multipleSelectionPage.steps.addURLInImagePopUp(constants.foxImageLink);
|
77
|
+
multipleSelectionPage.steps.addTextInAlternateText('Fox Image Link');
|
78
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbar();
|
79
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.imageInQuestionInstruction(), 'visible');
|
80
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.foxImageLinkUrlValueCheck(), 'visible');
|
81
|
+
});
|
82
|
+
});
|
83
|
+
});
|
@@ -0,0 +1,53 @@
|
|
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('Insert Image: Edit tab', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Upload Section', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
18
|
+
multipleSelectionPage.steps.selectImageInsertOptionFromCKEditorToolbar();
|
19
|
+
multipleSelectionPage.steps.selectUploadButton();
|
20
|
+
});
|
21
|
+
|
22
|
+
it('\'Send it to the Server\' label and button with \'Choose File\' button should be visible', () => {
|
23
|
+
utilities.verifyInnerText(multipleSelectionPage.sendItToTheServerLabel(), 'Send it to the Server');
|
24
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.sendItToTheServerLabel(), 'visible');
|
25
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.chooseFileButton(), 'visible');
|
26
|
+
utilities.verifyInnerText(multipleSelectionPage.sendItToTheServerButton(), 'Send it to the Server');
|
27
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.sendItToTheServerButton(), 'visible');
|
28
|
+
});
|
29
|
+
|
30
|
+
it('CSS of \'Image Properties\' label, \'Ok\' and \'Cancel\' button', { tags: 'css' }, () => {
|
31
|
+
utilities.verifyCSS(multipleSelectionPage.sendItToTheServerLabel(), {
|
32
|
+
'color': 'rgb(0, 0, 0)',
|
33
|
+
'font-size': '12px',
|
34
|
+
'font-weight': '400'
|
35
|
+
});;
|
36
|
+
utilities.verifyCSS(multipleSelectionPage.chooseFileButton(), {
|
37
|
+
'color': 'rgb(0, 0, 0)',
|
38
|
+
'font-size': '12px',
|
39
|
+
'background-color': 'rgba(0, 0, 0, 0)'
|
40
|
+
});
|
41
|
+
utilities.verifyCSS(multipleSelectionPage.sendItToTheServerButton(), {
|
42
|
+
'color': 'rgb(0, 0, 0)',
|
43
|
+
'font-size': '12px',
|
44
|
+
'background-color': 'rgba(0, 0, 0, 0)'
|
45
|
+
});
|
46
|
+
});
|
47
|
+
|
48
|
+
//Unable to click on dropdown using click/realclick need to test manually
|
49
|
+
it('User should be able to upload file and clicking on \'Send it To server\' button the pop-up should redirect to \'Image Info\' section', () => {
|
50
|
+
|
51
|
+
});
|
52
|
+
});
|
53
|
+
});
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { multipleSelectionPage } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
import constants from "../../../fixtures/constants";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
|
7
|
+
describe('Link Ck Editor: Edit tab', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Header and Base section', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
18
|
+
multipleSelectionPage.steps.selectLinkButtonOptionFromCKEditorToolbar();
|
19
|
+
});
|
20
|
+
|
21
|
+
it('\'Link\' label, \'Ok\' and \'Cancel\' button should be displayed.', () => {
|
22
|
+
utilities.verifyInnerText(multipleSelectionPage.linkLabel(), 'Link');
|
23
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.linkLabel(), 'visible');
|
24
|
+
utilities.verifyInnerText(multipleSelectionPage.buttonOk(), 'OK');
|
25
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.buttonOk(), 'visible');
|
26
|
+
utilities.verifyInnerText(multipleSelectionPage.buttonCancel(), 'Cancel');
|
27
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.buttonCancel(), 'visible');
|
28
|
+
});
|
29
|
+
|
30
|
+
it('CSS of \'Table Properties\' label, \'Ok\' and \'Cancel\' button', { tags: 'css' }, () => {
|
31
|
+
utilities.verifyCSS(multipleSelectionPage.linkLabel(), {
|
32
|
+
'color': 'rgb(72, 72, 72)',
|
33
|
+
'font-size': '12px',
|
34
|
+
'font-weight': '700'
|
35
|
+
});
|
36
|
+
utilities.verifyCSS(multipleSelectionPage.buttonOk(), {
|
37
|
+
'color': 'rgb(255, 255, 255)',
|
38
|
+
'font-size': '12px',
|
39
|
+
'background-color': 'rgb(13, 71, 161)'
|
40
|
+
});
|
41
|
+
utilities.verifyCSS(multipleSelectionPage.buttonCancel(), {
|
42
|
+
'color': 'rgb(72, 72, 72)',
|
43
|
+
'font-size': '12px',
|
44
|
+
'background-color': 'rgb(248, 248, 248)'
|
45
|
+
});
|
46
|
+
});
|
47
|
+
|
48
|
+
it('Accessibility of \'Table Properties\' section', { tags: 'a11y' }, () => {
|
49
|
+
cy.checkAccessibility(multipleSelectionPage.linkPopUpWrapper());
|
50
|
+
});
|
51
|
+
});
|
52
|
+
|
53
|
+
describe('Cancel Button and Ok button', () => {
|
54
|
+
abortEarlySetup();
|
55
|
+
before(() => {
|
56
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
57
|
+
cy.barsPreLoaderWait();
|
58
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
59
|
+
multipleSelectionPage.steps.selectLinkButtonOptionFromCKEditorToolbar();
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the user clicks on \'Cancel\' button without making any change, then question instruction section should not contain a link ', () => {
|
63
|
+
multipleSelectionPage.steps.selectCancelButtonFromCKEditorToolbar();
|
64
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.urlInQuestionInstruction(), 'notExist');
|
65
|
+
});
|
66
|
+
|
67
|
+
it('When the user clicks on \'Cancel\' button after adding a link still there should be no link visible in question instruction', () => {
|
68
|
+
multipleSelectionPage.steps.selectLinkButtonOptionFromCKEditorToolbar();
|
69
|
+
multipleSelectionPage.steps.addURLInLinkPopUp(constants.foxImageLink);
|
70
|
+
multipleSelectionPage.steps.selectCancelButtonFromCKEditorToolbar();
|
71
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.urlInQuestionInstruction(), 'notExist');
|
72
|
+
});
|
73
|
+
|
74
|
+
it('When the user clicks on \'Ok\' button after adding value in url link and display text then that change should be visible', () => {
|
75
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
76
|
+
multipleSelectionPage.steps.selectLinkButtonOptionFromCKEditorToolbar();
|
77
|
+
multipleSelectionPage.steps.addURLInLinkPopUp(constants.foxImageLink);
|
78
|
+
multipleSelectionPage.steps.addTextInDisplayText('Fox Image Link');
|
79
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbarForLinkPopUp();
|
80
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.urlInQuestionInstruction(), 'visible');
|
81
|
+
utilities.verifyInnerText(multipleSelectionPage.urlInQuestionInstruction(), 'Fox Image Link');
|
82
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.foxImageLinkUrlValueCheck(), 'visible');
|
83
|
+
});
|
84
|
+
});
|
85
|
+
});
|
@@ -0,0 +1,94 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { multipleSelectionPage } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
import constants from "../../../fixtures/constants";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
const protocol = ['http://', 'https://', 'ftp://', 'news://'];
|
7
|
+
|
8
|
+
describe('Link Ck Editor: Edit tab', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Link Info', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
19
|
+
multipleSelectionPage.steps.selectLinkButtonOptionFromCKEditorToolbar();
|
20
|
+
});
|
21
|
+
|
22
|
+
it('\'Link Info\' label, \'Display Text\' label with input field, \'Link Type\' label with drop down, \'Protocol\' label with drop down and \'URL\' label with input field should be displayed.', () => {
|
23
|
+
utilities.verifyInnerText(multipleSelectionPage.linkInfo(), 'Link Info');
|
24
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.linkInfo(), 'visible');
|
25
|
+
utilities.verifyInnerText(multipleSelectionPage.displayTextLabel(), 'Display Text');
|
26
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.displayTextLabel(), 'visible');
|
27
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.displayTextInputField(), 'visible');
|
28
|
+
utilities.verifyInnerText(multipleSelectionPage.linkTypeLabel(), 'Link Type');
|
29
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.linkTypeLabel(), 'visible');
|
30
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.linkTypeDropDown(), 'visible');
|
31
|
+
utilities.verifyInnerText(multipleSelectionPage.protocolLabel(), 'Protocol');
|
32
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.protocolLabel(), 'visible');
|
33
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.protocolDropDown(), 'visible');
|
34
|
+
utilities.verifyInnerText(multipleSelectionPage.urlLabel(), 'URL');
|
35
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.urlLabel(), 'visible');
|
36
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.urlInputField(), 'visible');
|
37
|
+
});
|
38
|
+
|
39
|
+
it('CSS of \'Link Info\' section', { tags: 'css' }, () => {
|
40
|
+
utilities.verifyCSS(multipleSelectionPage.linkInfo(), {
|
41
|
+
'color': 'rgb(72, 72, 72)',
|
42
|
+
'font-size': '12px',
|
43
|
+
'font-weight': '400'
|
44
|
+
});
|
45
|
+
utilities.verifyCSS(multipleSelectionPage.displayTextLabel(), {
|
46
|
+
'color': 'rgb(0, 0, 0)',
|
47
|
+
'font-size': '12px',
|
48
|
+
'font-weight': '400'
|
49
|
+
});
|
50
|
+
utilities.verifyCSS(multipleSelectionPage.linkTypeLabel(), {
|
51
|
+
'color': 'rgb(0, 0, 0)',
|
52
|
+
'font-size': '12px',
|
53
|
+
'font-weight': '400'
|
54
|
+
});
|
55
|
+
utilities.verifyCSS(multipleSelectionPage.protocolLabel(), {
|
56
|
+
'color': 'rgb(0, 0, 0)',
|
57
|
+
'font-size': '12px',
|
58
|
+
'font-weight': '400'
|
59
|
+
});
|
60
|
+
utilities.verifyCSS(multipleSelectionPage.urlLabel(), {
|
61
|
+
'color': 'rgb(0, 0, 0)',
|
62
|
+
'font-size': '12px',
|
63
|
+
'font-weight': '400'
|
64
|
+
});
|
65
|
+
});
|
66
|
+
|
67
|
+
it('User should be able to enter value in \'Display Text\' input field and \'URL\' input field and on saving the changes should be visible in question instruction section', () => {
|
68
|
+
multipleSelectionPage.steps.addTextInDisplayText('Fox Image Link');
|
69
|
+
multipleSelectionPage.steps.addURLInLinkPopUp(constants.foxImageLink);
|
70
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbarForLinkPopUp();
|
71
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.urlInQuestionInstruction(), 'visible');
|
72
|
+
utilities.verifyInnerText(multipleSelectionPage.urlInQuestionInstruction(), 'Fox Image Link');
|
73
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.foxImageLinkUrlValueCheck(), 'visible');
|
74
|
+
});
|
75
|
+
});
|
76
|
+
|
77
|
+
describe('Link Info: Protocol & Link Type', () => {
|
78
|
+
abortEarlySetup();
|
79
|
+
before(() => {
|
80
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
81
|
+
cy.barsPreLoaderWait();
|
82
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
83
|
+
multipleSelectionPage.steps.selectLinkButtonOptionFromCKEditorToolbar();
|
84
|
+
});
|
85
|
+
|
86
|
+
//Note: Unable to click on dropdown using click/realclick need to test manually
|
87
|
+
it('User should be able to change protocol and should be able to add the url related to protocol type which should reflect in question instruction section', () => {
|
88
|
+
});
|
89
|
+
|
90
|
+
//Note: Unable to click on dropdown using click/realclick need to test manually
|
91
|
+
it('User should be able to change \'Link Type\'', () => {
|
92
|
+
});
|
93
|
+
});
|
94
|
+
});
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { multipleSelectionPage } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
import constants from "../../../fixtures/constants";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
|
7
|
+
describe('Link Ck Editor: Preview Tab', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Preview Button', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
18
|
+
multipleSelectionPage.steps.selectLinkButtonOptionFromCKEditorToolbar();
|
19
|
+
multipleSelectionPage.steps.addURLInLinkPopUp(constants.foxImageLink);
|
20
|
+
multipleSelectionPage.steps.addTextInDisplayText('Fox Image Link');
|
21
|
+
multipleSelectionPage.steps.selectOkButtonFromCKEditorToolbarForLinkPopUp();
|
22
|
+
});
|
23
|
+
|
24
|
+
it('The link should be uploaded with a display text and the same details should be visible on preview tab', () => {
|
25
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.urlInQuestionInstruction(), 'visible');
|
26
|
+
utilities.verifyInnerText(multipleSelectionPage.urlInQuestionInstruction(), 'Fox Image Link');
|
27
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.foxImageLinkUrlValueCheck(), 'visible');
|
28
|
+
multipleSelectionPage.steps.focusOutQuestionInstructionsInputField();
|
29
|
+
multipleSelectionPage.steps.switchToPreviewTab();
|
30
|
+
utilities.verifyInnerText(multipleSelectionPage.urlInQuestionInstructionPreviewTab(), 'Fox Image Link');
|
31
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.foxImageLinkUrlValueCheckPreviewTab(), 'visible');
|
32
|
+
});
|
33
|
+
|
34
|
+
it('When the user clicks on link text, window open method should be called with target blank', () => {
|
35
|
+
multipleSelectionPage.steps.verifyWindowOpenMethodAfterClickingOnLink('fox-1867062_960_720.jpg');
|
36
|
+
});
|
37
|
+
});
|
38
|
+
});
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { multipleSelectionPage } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
import constants from "../../../fixtures/constants";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
|
7
|
+
describe('Link Ck Editor: Edit tab', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Upload', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
multipleSelectionPage.steps.focusInQuestionInstructionsInputField();
|
18
|
+
multipleSelectionPage.steps.selectLinkButtonOptionFromCKEditorToolbar();
|
19
|
+
});
|
20
|
+
|
21
|
+
it('User should be able to switch to \'Upload\' section where \'Upload\' Title, \'Choose File\' button and \'Send it to the Server\' button is visible', () => {
|
22
|
+
multipleSelectionPage.steps.clickUploadButton();
|
23
|
+
utilities.verifyInnerText(multipleSelectionPage.uploadSectionTitle(), 'Upload');
|
24
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.uploadSectionTitle(), 'visible');
|
25
|
+
utilities.verifyInnerText(multipleSelectionPage.uploadTitle(), 'Upload');
|
26
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.uploadTitle(), 'visible');
|
27
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.chooseFileButton(), 'visible');
|
28
|
+
utilities.verifyInnerText(multipleSelectionPage.sendItToServerButton(), 'Send it to the Server');
|
29
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.sendItToServerButton(), 'visible');
|
30
|
+
});
|
31
|
+
|
32
|
+
it('CSS of \'Upload\' section', { tags: 'css' }, () => {
|
33
|
+
utilities.verifyCSS(multipleSelectionPage.uploadSectionTitle(), {
|
34
|
+
'color': 'rgb(72, 72, 72)',
|
35
|
+
'font-size': '12px',
|
36
|
+
'font-weight': '400'
|
37
|
+
});
|
38
|
+
utilities.verifyCSS(multipleSelectionPage.uploadTitle(), {
|
39
|
+
'color': 'rgb(0, 0, 0)',
|
40
|
+
'font-size': '12px',
|
41
|
+
'font-weight': '400'
|
42
|
+
});
|
43
|
+
utilities.verifyCSS(multipleSelectionPage.chooseFileButton(), {
|
44
|
+
'color': 'rgb(0, 0, 0)',
|
45
|
+
'font-size': '12px',
|
46
|
+
'font-weight': '400'
|
47
|
+
});
|
48
|
+
utilities.verifyCSS(multipleSelectionPage.sendItToServerButton(), {
|
49
|
+
'color': 'rgb(72, 72, 72)',
|
50
|
+
'font-size': '12px',
|
51
|
+
'font-weight': '400'
|
52
|
+
});
|
53
|
+
});
|
54
|
+
|
55
|
+
//Note: Unable to click on dropdown using click/realclick need to test manually
|
56
|
+
it('User should be able to upload file and clicking on \'Send it To server\' button the pop-up should redirect to \'Link Info\' section', () => {
|
57
|
+
});
|
58
|
+
});
|
59
|
+
});
|