itemengine-cypress-automation 1.0.348-IEI-5944-and-IEI-5945-manualAndNonScoredScript-2983065.0 → 1.0.349-IEI-5944-and-IEI-5945-manualAndNonScoredScript-2a676a6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerEditTabAddTranscriptRadioButton .js +2 -2
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerHeaderSectionAndButtons.js +2 -2
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTab.js +1 -1
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTabTranscript.js +2 -3
- package/cypress/e2e/ILC/CkEditorInsertImage/imageInfo.js +3 -3
- package/cypress/e2e/ILC/CkEditorInsertTable/tableStyle.js +2 -2
- package/cypress/e2e/ILC/CkEditorLink/uploadSection.js +1 -1
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +62 -4
- package/cypress/e2e/ILC/ToolAudioPlayerNew/headerSection.js +89 -1
- package/cypress/pages/audioPlayerPage.js +25 -0
- package/cypress/pages/brainingCampManipulativePage.js +1 -1
- package/cypress/pages/components/ckEditorEquationEditorComponent.js +1 -0
- package/cypress/pages/components/ckEditorInsertImageComponent.js +3 -3
- package/cypress/pages/components/ckEditorLinkComponent.js +8 -9
- package/cypress/pages/components/createQuestionBasePage.js +8 -2
- package/cypress/pages/contentBlocksPage.js +2 -0
- package/package.json +1 -1
@@ -187,8 +187,8 @@ describe('Audio player: Edit tab', () => {
|
|
187
187
|
});
|
188
188
|
|
189
189
|
it('The user should be able to enter text in the \'Transcript\' input field', () => {
|
190
|
-
multipleSelectionPage.steps.
|
191
|
-
utilities.verifyTextContent(multipleSelectionPage.
|
190
|
+
multipleSelectionPage.steps.enterTextInCKEditorTranscriptInputField('This is a transcript text');
|
191
|
+
utilities.verifyTextContent(multipleSelectionPage.cKEditorTranscriptInputField(), 'This is a transcript text');
|
192
192
|
});
|
193
193
|
|
194
194
|
it('CSS of \'Type in transcript\' Section', { tags: 'css' }, () => {
|
@@ -31,8 +31,8 @@ describe('Audio player: Header section, buttons and saving item', () => {
|
|
31
31
|
|
32
32
|
describe('OK button Contents', () => {
|
33
33
|
it('\'OK\' button should be displayed in popup.', () => {
|
34
|
-
utilities.verifyInnerText(multipleSelectionPage.
|
35
|
-
utilities.verifyElementVisibilityState(multipleSelectionPage.
|
34
|
+
utilities.verifyInnerText(multipleSelectionPage.audioPlayerOkButton(), 'OK');
|
35
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.audioPlayerOkButton(), 'visible');
|
36
36
|
});
|
37
37
|
|
38
38
|
it('CSS of \'OK\' button', { tags: 'css' }, () => {
|
@@ -32,7 +32,7 @@ describe('Audio player: Edit tab', () => {
|
|
32
32
|
multipleSelectionPage.steps.switchToEditTab();
|
33
33
|
multipleSelectionPage.steps.clickOnAudioPlayerBlock();
|
34
34
|
multipleSelectionPage.steps.clickOnLimitPlayAttempts();
|
35
|
-
multipleSelectionPage.steps.
|
35
|
+
multipleSelectionPage.steps.setCKEditorPlaybackLimit(2);
|
36
36
|
multipleSelectionPage.steps.clickOnOKButton();
|
37
37
|
multipleSelectionPage.steps.focusInAndOutOfQuestionInstructionsInputField();
|
38
38
|
multipleSelectionPage.steps.switchToPreviewTab();
|
@@ -32,7 +32,6 @@ describe('Audio player: Edit tab', () => {
|
|
32
32
|
multipleSelectionPage.steps.switchToEditTab();
|
33
33
|
multipleSelectionPage.steps.clickOnAudioPlayerBlock();
|
34
34
|
multipleSelectionPage.steps.uploadTranscriptFile('sample.txt');
|
35
|
-
utilities.verifyElementVisibilityState(multipleSelectionPage.transcriptFileUploadProgressBar(), 'visible');
|
36
35
|
multipleSelectionPage.steps.clickOnOKButton();
|
37
36
|
multipleSelectionPage.steps.focusInAndOutOfQuestionInstructionsInputField();
|
38
37
|
multipleSelectionPage.steps.switchToPreviewTab();
|
@@ -49,7 +48,7 @@ describe('Audio player: Edit tab', () => {
|
|
49
48
|
multipleSelectionPage.steps.switchToEditTab();
|
50
49
|
multipleSelectionPage.steps.clickOnAudioPlayerBlock();
|
51
50
|
multipleSelectionPage.steps.clickOnTypeInTranscriptRadioButton();
|
52
|
-
multipleSelectionPage.steps.
|
51
|
+
multipleSelectionPage.steps.enterTextInCKEditorTranscriptInputField('In triangle ABC,m ∠ ABC = (4x-12) ° and m ∠ ACB = (2x + 26) °');
|
53
52
|
multipleSelectionPage.steps.clickOnOKButton();
|
54
53
|
multipleSelectionPage.steps.focusInAndOutOfQuestionInstructionsInputField();
|
55
54
|
multipleSelectionPage.steps.switchToPreviewTab();
|
@@ -73,7 +72,7 @@ describe('Audio player: Edit tab', () => {
|
|
73
72
|
multipleSelectionPage.steps.uploadFile('sample.mp3');
|
74
73
|
utilities.verifyElementVisibilityState(multipleSelectionPage.fileUploadProgressBar(), 'hidden');
|
75
74
|
multipleSelectionPage.steps.clickOnTypeInTranscriptRadioButton();
|
76
|
-
multipleSelectionPage.steps.
|
75
|
+
multipleSelectionPage.steps.enterTextInCKEditorTranscriptInputField('In triangle ABC,m ∠ ABC = (4x-12) ° and m ∠ ACB = (2x + 26) °');
|
77
76
|
multipleSelectionPage.steps.clickOnOKButton();
|
78
77
|
});
|
79
78
|
|
@@ -28,8 +28,8 @@ describe('Insert Image: Edit tab', () => {
|
|
28
28
|
});
|
29
29
|
|
30
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.
|
32
|
-
utilities.verifyElementVisibilityState(multipleSelectionPage.
|
31
|
+
utilities.verifyInnerText(multipleSelectionPage.imageUrlLabel(), 'URL');
|
32
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.imageUrlLabel(), 'visible');
|
33
33
|
utilities.verifyElementVisibilityState(multipleSelectionPage.urlInputField(), 'visible');
|
34
34
|
utilities.verifyInnerText(multipleSelectionPage.alternateTextLabel(), 'Alternative Text');
|
35
35
|
utilities.verifyElementVisibilityState(multipleSelectionPage.alternateTextLabel(), 'visible');
|
@@ -82,7 +82,7 @@ describe('Insert Image: Edit tab', () => {
|
|
82
82
|
'font-size': '12px',
|
83
83
|
'font-weight': '400'
|
84
84
|
});
|
85
|
-
utilities.verifyCSS(multipleSelectionPage.
|
85
|
+
utilities.verifyCSS(multipleSelectionPage.imageUrlLabel(), {
|
86
86
|
'color': 'rgb(0, 0, 0)',
|
87
87
|
'font-size': '12px',
|
88
88
|
'font-weight': '400'
|
@@ -82,8 +82,8 @@ describe('Insert Table: Edit tab', () => {
|
|
82
82
|
it('\'Border size\' label and input field with default value 1, \'Striped\' label and 3 strip options with default value none and \'Add hover state\' label and dropdown with default value none should be displayed.', () => {
|
83
83
|
multipleSelectionPage.steps.scrollingDownInInsertTablePopUp();
|
84
84
|
utilities.verifyInnerText(multipleSelectionPage.borderSizeLabel(), 'Border size');
|
85
|
-
utilities.verifyElementVisibilityState(multipleSelectionPage.borderSizeLabel(), '
|
86
|
-
utilities.verifyElementVisibilityState(multipleSelectionPage.borderSizeInputField(), '
|
85
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.borderSizeLabel(), 'exist');
|
86
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.borderSizeInputField(), 'exist');
|
87
87
|
utilities.verifyInnerText(multipleSelectionPage.stripedLabel(), 'Striped');
|
88
88
|
utilities.verifyElementVisibilityState(multipleSelectionPage.stripedLabel(), 'visible');
|
89
89
|
utilities.verifyElementVisibilityState(multipleSelectionPage.clearStripes(), 'visible');
|
@@ -24,7 +24,7 @@ describe('Link Ck Editor: Edit tab', () => {
|
|
24
24
|
utilities.verifyElementVisibilityState(multipleSelectionPage.uploadSectionTitle(), 'visible');
|
25
25
|
utilities.verifyInnerText(multipleSelectionPage.uploadTitle(), 'Upload');
|
26
26
|
utilities.verifyElementVisibilityState(multipleSelectionPage.uploadTitle(), 'visible');
|
27
|
-
utilities.verifyElementVisibilityState(multipleSelectionPage.insertImageChooseFileButton(), '
|
27
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.insertImageChooseFileButton(), 'exist');
|
28
28
|
utilities.verifyInnerText(multipleSelectionPage.sendItToServerButton(), 'Send it to the Server');
|
29
29
|
utilities.verifyElementVisibilityState(multipleSelectionPage.sendItToServerButton(), 'visible');
|
30
30
|
});
|
@@ -1,8 +1,11 @@
|
|
1
|
-
import { contentBlocksPage } from "../../../pages";
|
1
|
+
import { contentBlocksPage, dialogBoxBase, itemPreviewPage } from "../../../pages";
|
2
|
+
import { browseItemsPage } from "../../../pages/components";
|
2
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
4
|
import utilities from "../../../support/helpers/utilities";
|
4
5
|
const css = Cypress.env('css');
|
5
6
|
|
7
|
+
var itemReferenceID = "";
|
8
|
+
|
6
9
|
describe('Content blocks - Edit tab', () => {
|
7
10
|
before(() => {
|
8
11
|
cy.loginAs('admin');
|
@@ -82,6 +85,62 @@ describe('Content blocks - Edit tab', () => {
|
|
82
85
|
it('Accessibility of header section', { tags: 'a11y' }, () => {
|
83
86
|
cy.checkAccessibility(contentBlocksPage.headerLabel().parents('content-blocks'));
|
84
87
|
});
|
88
|
+
|
89
|
+
describe('Saving a question with incomplete authoring', () => {
|
90
|
+
abortEarlySetup();
|
91
|
+
before(() => {
|
92
|
+
contentBlocksPage.steps.navigateToCreateResource('content blocks');
|
93
|
+
});
|
94
|
+
|
95
|
+
it('User should be able to save the resource with incomplete authoring and display a snackbar with the text "Saved successfully!" when the Save button is clicked', () => {
|
96
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please enter text block']);
|
97
|
+
contentBlocksPage.steps.saveAQuestionWithIncompleteAuthoring();
|
98
|
+
});
|
99
|
+
contentBlocksPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
100
|
+
});
|
101
|
+
|
102
|
+
describe('User should be able to edit incomplete authored resource', () => {
|
103
|
+
abortEarlySetup();
|
104
|
+
before(() => {
|
105
|
+
contentBlocksPage.steps.navigateToCreateResource('content blocks');
|
106
|
+
contentBlocksPage.steps.saveAQuestionWithIncompleteAuthoring();
|
107
|
+
contentBlocksPage.steps.editItem();
|
108
|
+
});
|
109
|
+
|
110
|
+
it('Warning icons should be displayed on the required input fields', () => {
|
111
|
+
contentBlocksPage.steps.verifyWarningIconOnRequiredFields([
|
112
|
+
'Please enter text block',
|
113
|
+
]);
|
114
|
+
});
|
115
|
+
|
116
|
+
it('When required input fields are filled then warning icons should disappear', () => {
|
117
|
+
contentBlocksPage.steps.enterTextInTextBlockInputField(0, 'Text block text');
|
118
|
+
contentBlocksPage.steps.verifyErrorMessageIsNotDisplayed();
|
119
|
+
});
|
120
|
+
|
121
|
+
it('Clicking on Save button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
122
|
+
contentBlocksPage.steps.saveAQuestionAndVerifySnackbar();
|
123
|
+
});
|
124
|
+
|
125
|
+
it('Warning icon should not be visible', () => {
|
126
|
+
contentBlocksPage.steps.verifyWarningIconNotExist();
|
127
|
+
});
|
128
|
+
});
|
129
|
+
|
130
|
+
describe('Save as you go - Browse item page contents', () => {
|
131
|
+
abortEarlySetup();
|
132
|
+
before(() => {
|
133
|
+
contentBlocksPage.steps.navigateToCreateResource('content blocks');
|
134
|
+
contentBlocksPage.steps.saveAQuestionWithIncompleteAuthoring();
|
135
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
136
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
137
|
+
browseItemsPage.steps.navigateToBrowseItemsPage();
|
138
|
+
});
|
139
|
+
|
140
|
+
it('When user saves an incompletely authored resource then a warning icon should be visible in browse items page', () => {
|
141
|
+
browseItemsPage.steps.verifyWarningIconInBrowseItemPage(`${itemReferenceID}`);
|
142
|
+
});
|
143
|
+
});
|
85
144
|
});
|
86
145
|
|
87
146
|
describe('Body section', () => {
|
@@ -113,10 +172,9 @@ describe('Content blocks - Edit tab', () => {
|
|
113
172
|
contentBlocksPage.steps.verifyTextBlockInputFieldPlaceholderTextNotExist(contentBlocksPage.verifyTextBlockInputFieldPlaceholderText);
|
114
173
|
});
|
115
174
|
|
116
|
-
it('When user clears text and focuses out of text block input field, then error message
|
175
|
+
it('When user clears text and focuses out of text block input field, then error message should not be displayed', () => {
|
117
176
|
contentBlocksPage.steps.clearAndFocusOutOfTextBlockInputField();
|
118
|
-
utilities.
|
119
|
-
utilities.verifyElementVisibilityState(contentBlocksPage.errorMessage(), 'visible');
|
177
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.errorMessage(), 'notExist');
|
120
178
|
});
|
121
179
|
|
122
180
|
it('When user enters text again then error message should not be displayed', () => {
|
@@ -1,9 +1,12 @@
|
|
1
|
-
import { audioPlayerPage, dialogBoxBase, selectQuestionResourceToolPage } from "../../../pages";
|
1
|
+
import { audioPlayerPage, dialogBoxBase, selectQuestionResourceToolPage, itemPreviewPage } from "../../../pages";
|
2
|
+
import { browseItemsPage } from "../../../pages/components";
|
2
3
|
import utilities from "../../../support/helpers/utilities";
|
3
4
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
5
|
import constants from "../../../fixtures/constants";
|
5
6
|
const css = Cypress.env('css');
|
6
7
|
|
8
|
+
var itemReferenceID = "";
|
9
|
+
|
7
10
|
describe('Create question page - Audio player: Header section and saving resource tool', () => {
|
8
11
|
before(() => {
|
9
12
|
cy.loginAs('admin');
|
@@ -122,4 +125,89 @@ describe('Create question page - Audio player: Header section and saving resourc
|
|
122
125
|
audioPlayerPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
123
126
|
});
|
124
127
|
});
|
128
|
+
|
129
|
+
describe('Saving a question with incomplete authoring', () => {
|
130
|
+
abortEarlySetup();
|
131
|
+
before(() => {
|
132
|
+
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
133
|
+
});
|
134
|
+
|
135
|
+
it('User should be able to save the resource with incomplete authoring and display a snackbar with the text "Saved successfully!" when the Save button is clicked', () => {
|
136
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please add a source URL']);
|
137
|
+
audioPlayerPage.steps.saveAQuestionWithIncompleteAuthoring();
|
138
|
+
});
|
139
|
+
audioPlayerPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
140
|
+
});
|
141
|
+
|
142
|
+
describe('User should be able to edit incomplete authored resource', () => {
|
143
|
+
abortEarlySetup();
|
144
|
+
before(() => {
|
145
|
+
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
146
|
+
audioPlayerPage.steps.saveAQuestionWithIncompleteAuthoring();
|
147
|
+
audioPlayerPage.steps.editItem();
|
148
|
+
});
|
149
|
+
|
150
|
+
it('Warning icons should be displayed on the required input fields', () => {
|
151
|
+
audioPlayerPage.steps.verifyWarningIconOnRequiredFields([
|
152
|
+
'Please add a source URL',
|
153
|
+
]);
|
154
|
+
});
|
155
|
+
|
156
|
+
it('When required input fields are filled then warning icons should disappear', () => {
|
157
|
+
audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
|
158
|
+
audioPlayerPage.steps.verifyErrorMessageIsNotDisplayed();
|
159
|
+
});
|
160
|
+
|
161
|
+
it('Clicking on Save button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
162
|
+
audioPlayerPage.steps.saveAQuestionAndVerifySnackbar();
|
163
|
+
});
|
164
|
+
|
165
|
+
it('Warning icon should not be visible', () => {
|
166
|
+
audioPlayerPage.steps.verifyWarningIconNotExist();
|
167
|
+
});
|
168
|
+
});
|
169
|
+
|
170
|
+
describe('User should be able to edit incomplete authored resource when add audio URL is selected', () => {
|
171
|
+
abortEarlySetup();
|
172
|
+
before(() => {
|
173
|
+
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
174
|
+
audioPlayerPage.steps.saveAQuestionWithIncompleteAuthoring();
|
175
|
+
audioPlayerPage.steps.editItem();
|
176
|
+
});
|
177
|
+
|
178
|
+
it('Warning icons should be displayed on the required input fields', () => {
|
179
|
+
audioPlayerPage.steps.selectAddAudioURLRadioButton();
|
180
|
+
audioPlayerPage.steps.verifyWarningIconOnRequiredFields([
|
181
|
+
'Please add a source URL',
|
182
|
+
]);
|
183
|
+
});
|
184
|
+
|
185
|
+
it('When required input fields are filled then warning icons should disappear', () => {
|
186
|
+
audioPlayerPage.steps.enterTextInSourceURLInputField(constants.sampleMp3Link);
|
187
|
+
audioPlayerPage.steps.verifyErrorMessageIsNotDisplayed();
|
188
|
+
});
|
189
|
+
|
190
|
+
it('Clicking on Save button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
191
|
+
audioPlayerPage.steps.saveAQuestionAndVerifySnackbar();
|
192
|
+
});
|
193
|
+
|
194
|
+
it('Warning icon should not be visible', () => {
|
195
|
+
audioPlayerPage.steps.verifyWarningIconNotExist();
|
196
|
+
});
|
197
|
+
});
|
198
|
+
|
199
|
+
describe('Save as you go - Browse item page contents', () => {
|
200
|
+
abortEarlySetup();
|
201
|
+
before(() => {
|
202
|
+
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
203
|
+
audioPlayerPage.steps.saveAQuestionWithIncompleteAuthoring();
|
204
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
205
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
206
|
+
browseItemsPage.steps.navigateToBrowseItemsPage();
|
207
|
+
});
|
208
|
+
|
209
|
+
it('When user saves an incompletely authored resource then a warning icon should be visible in browse items page', () => {
|
210
|
+
browseItemsPage.steps.verifyWarningIconInBrowseItemPage(`${itemReferenceID}`);
|
211
|
+
});
|
212
|
+
});
|
125
213
|
});
|
@@ -2,6 +2,7 @@ import constants from "../fixtures/constants";
|
|
2
2
|
import utilities from "../support/helpers/utilities";
|
3
3
|
import { ckEditorToolbar, commonComponents, createQuestionBasePage, equationEditorFlyout, playbackControlsBaseComponent } from "./components";
|
4
4
|
import { dialogBoxBase } from "./dialogBoxBase";
|
5
|
+
import { createItemPage } from "./createItemPage";
|
5
6
|
|
6
7
|
const selectors = {
|
7
8
|
...playbackControlsBaseComponent,
|
@@ -50,6 +51,8 @@ const selectors = {
|
|
50
51
|
typeInTranscriptLabel: () => cy.get('.type-in-transcript-opt-label'),
|
51
52
|
typeInTranscriptRadioButton: () => cy.get('[aria-label="Type in transcript"][type="radio"]'),
|
52
53
|
transcriptInputField: () => cy.get('[title="Transcript"]'),
|
54
|
+
cKEditorTranscriptInputField: () => cy.get('textarea[aria-label="Transcript"]'),
|
55
|
+
ckEditorPlayAttemptsLimitInputField: () => cy.get('input[aria-label="Playback Limit"]'),
|
53
56
|
allowStudentsToDownloadAudioLabel: () => cy.get('.allow-students-to-download-audio .MuiFormControlLabel-label').eq(0),
|
54
57
|
allowStudentsToDownloadAudioCheckbox: () => cy.get('.allow-students-to-download-audio input'),
|
55
58
|
limitPlayAttemptsLabel: () => cy.get('.allow-students-to-download-audio .MuiFormControlLabel-label').eq(1),
|
@@ -125,6 +128,7 @@ const steps = {
|
|
125
128
|
...ckEditorToolbar.steps,
|
126
129
|
...equationEditorFlyout.steps,
|
127
130
|
...commonComponents.steps,
|
131
|
+
...createItemPage.steps,
|
128
132
|
/**
|
129
133
|
* Uploads a file to the audio player by attaching the file located at the specified filePath.
|
130
134
|
* @param {string} filePath - The file path to the file to be uploaded.
|
@@ -166,6 +170,13 @@ const steps = {
|
|
166
170
|
.blur();
|
167
171
|
},
|
168
172
|
|
173
|
+
enterTextInCKEditorTranscriptInputField: (text) => {
|
174
|
+
audioPlayerPage.cKEditorTranscriptInputField()
|
175
|
+
.type(text)
|
176
|
+
.blur();
|
177
|
+
},
|
178
|
+
|
179
|
+
|
169
180
|
verifyTextInTranscriptInputField: (text) => {
|
170
181
|
audioPlayerPage.transcriptInputField()
|
171
182
|
.should('have.text', text);
|
@@ -706,6 +717,20 @@ const steps = {
|
|
706
717
|
.type(value)
|
707
718
|
},
|
708
719
|
|
720
|
+
/**
|
721
|
+
* Sets the playback limit value in the audio player's input field.
|
722
|
+
* @param {string|number} value - The value to set as the playback limit.
|
723
|
+
* @returns {void}
|
724
|
+
*/
|
725
|
+
setCKEditorPlaybackLimit: (value) => {
|
726
|
+
audioPlayerPage.ckEditorPlayAttemptsLimitInputField()
|
727
|
+
.clear()
|
728
|
+
.type(value);
|
729
|
+
cy.wait(2000);
|
730
|
+
audioPlayerPage.ckEditorPlayAttemptsLimitInputField()
|
731
|
+
.blur();
|
732
|
+
},
|
733
|
+
|
709
734
|
/**
|
710
735
|
* Verify the playback limit help text in preview tab
|
711
736
|
* @param {string|number} value - The value to set as the playback limit.
|
@@ -20,7 +20,7 @@ const selectors = {
|
|
20
20
|
selectAManipulativeLabel: () => cy.get('[class*="SelectManipulativeWrapper"] [class*="BrainingcampManipulativestyle__WrapperSubHeader"]'),
|
21
21
|
enterAShareCodeLabel: () => cy.get('[class*="EnterShareCodeWrapper"] [class*="BrainingcampManipulativestyle__WrapperSubHeader"]'),
|
22
22
|
enterAShareCodeInputField: () => cy.get('[class*="EnterShareCodeWrapper"] input'),
|
23
|
-
previewTabCanvas: () => cy.get('.
|
23
|
+
previewTabCanvas: () => cy.get('.bcm-inner')
|
24
24
|
}
|
25
25
|
|
26
26
|
const steps = {
|
@@ -9,6 +9,7 @@ const selectors = {
|
|
9
9
|
equationEditorIcon: () => cy.get('.cke_button__nextgeneqneditor_icon:visible'),
|
10
10
|
equationEditorLabel: () => cy.get('[class*="EquationEditorstyles__Heading"]'),
|
11
11
|
okButton: () => cy.get('[title="OK"]'),
|
12
|
+
audioPlayerOkButton: () => cy.get('.save-action-btn-wrapper button').eq(0),
|
12
13
|
editorCancelButton: () => cy.get('[title="Cancel"]'),
|
13
14
|
equationEditorPopUp: () => cy.get('[class*="EquationEditorstyles__EquationEditorContainer"]'),
|
14
15
|
equationWrapper: () => cy.get('.cke_widget_ngie_equation [class*="NGMathJax"]'),
|
@@ -15,7 +15,7 @@ const selectors = {
|
|
15
15
|
imageInfoButton: () => cy.get('[title="Image Info"]'),
|
16
16
|
uploadButton: () => cy.get('[title="Upload"]'),
|
17
17
|
//Image Info
|
18
|
-
|
18
|
+
imageUrlLabel: () => cy.get('.dialog-input-label').eq(0),
|
19
19
|
urlInputField: () => cy.get('.cke_dialog_ui_input_text').eq(1),
|
20
20
|
alternateTextLabel: () => cy.get('.dialog-input-label').eq(1),
|
21
21
|
alternateTextInputField: () => cy.get('.cke_dialog_ui_input_text').eq(3),
|
@@ -23,7 +23,7 @@ const selectors = {
|
|
23
23
|
widthInputField: () => cy.get('.cke_dialog_ui_input_text').eq(5),
|
24
24
|
heightLabel: () => cy.get('.dialog-input-label').eq(3),
|
25
25
|
heightInputField: () => cy.get('.cke_dialog_ui_input_text').eq(7),
|
26
|
-
borderLabel: () => cy.get('
|
26
|
+
borderLabel: () => cy.get('.dialog-input-label').eq(4),
|
27
27
|
borderInputField: () => cy.get('.cke_dialog_ui_input_text').eq(9),
|
28
28
|
hSpaceLabel: () => cy.get('.dialog-input-label').eq(5),
|
29
29
|
hSpaceInputField: () => cy.get('.cke_dialog_ui_input_text').eq(11),
|
@@ -36,7 +36,7 @@ const selectors = {
|
|
36
36
|
fixedRadioButton: () => cy.get('[class*="image-responsiveness-radio-wrapper"]').eq(3),
|
37
37
|
fixedRadioLabel: () => cy.get('[class*="image-responsiveness-radio-wrapper"]').eq(4),
|
38
38
|
//Alignment
|
39
|
-
alignmentLabel: () => cy.get('.dialog-input-label').eq(
|
39
|
+
alignmentLabel: () => cy.get('.dialog-input-label').eq(7),
|
40
40
|
alignmentDropDown: () => cy.get('.cke_dialog_ui_input_select').eq(3),
|
41
41
|
alignmentOptions: (alignment = null) => {
|
42
42
|
if (alignment) {
|
@@ -12,7 +12,7 @@ const selectors = {
|
|
12
12
|
linkLabel: () => cy.get('.dialog-header-label'),
|
13
13
|
linkPopUpWrapper: () => cy.get('.custom-link-wrapper'),
|
14
14
|
urlInQuestionInstruction: () => cy.get('[data-cke-saved-href*="https"]'),
|
15
|
-
foxImageLinkUrlValueCheck: () => cy.get('[
|
15
|
+
foxImageLinkUrlValueCheck: () => cy.get('[href*="https://cdn.pixabay.com/photo/2016/11/29/03/28/fox-1867062_960_720.jpg"]'),
|
16
16
|
urlInputField: () => cy.get('input[class*="cke_dialog_ui_input_text"]').eq(1),
|
17
17
|
OkButton: () => cy.get('[title="OK"]'),
|
18
18
|
//Link Info
|
@@ -24,8 +24,8 @@ const selectors = {
|
|
24
24
|
linkTypeDropDown: () => cy.get('.cke_dialog_ui_input_select').eq(0),
|
25
25
|
protocolLabel: () => cy.get('.dialog-input-label').eq(2),
|
26
26
|
protocolDropDown: () => cy.get('.cke_dialog_ui_input_select').eq(1),
|
27
|
-
urlLabel: () => cy.get('.dialog-input-label').eq(
|
28
|
-
urlInputField: () => cy.get('.cke_dialog_ui_input_text').eq(
|
27
|
+
urlLabel: () => cy.get('.cke_dialog_ui_text .dialog-input-label').eq(1),
|
28
|
+
urlInputField: () => cy.get('.cke_dialog_ui_input_text input').eq(1),
|
29
29
|
//Protocol
|
30
30
|
protocolDropDown: () => cy.get('.dialog-input-area').eq(2),
|
31
31
|
selectProtocolOptionDropdown: (protocolType = null) => {
|
@@ -55,8 +55,7 @@ const steps = {
|
|
55
55
|
|
56
56
|
addURLInLinkPopUp: (text) => {
|
57
57
|
ckEditorLinkComponent.urlInputField()
|
58
|
-
.type(text, { delay: 0 })
|
59
|
-
.blur();
|
58
|
+
.type(text, { delay: 0 });
|
60
59
|
},
|
61
60
|
|
62
61
|
addTextInDisplayText: (text) => {
|
@@ -72,7 +71,7 @@ const steps = {
|
|
72
71
|
|
73
72
|
expandProtocolDropDown: () => {
|
74
73
|
ckEditorLinkComponent.protocolDropDown()
|
75
|
-
.click({force: true});
|
74
|
+
.click({ force: true });
|
76
75
|
},
|
77
76
|
|
78
77
|
selectProtocolType: (protocolType) => {
|
@@ -122,12 +121,12 @@ const steps = {
|
|
122
121
|
doc.addEventListener('click', () => {
|
123
122
|
setTimeout(function () { doc.location.reload() }, 5000);
|
124
123
|
});
|
125
|
-
|
124
|
+
ckEditorLinkComponent.foxImageLinkUrlValueCheckPreviewTab()
|
126
125
|
.click();
|
127
|
-
|
126
|
+
cy.verifyDownload(fileName);
|
128
127
|
});
|
129
128
|
},
|
130
|
-
|
129
|
+
|
131
130
|
|
132
131
|
clickSendItToServerButton: () => {
|
133
132
|
ckEditorLinkComponent.sendItToServerButton()
|
@@ -146,17 +146,23 @@ const steps = {
|
|
146
146
|
.within(() => {
|
147
147
|
utilities.verifyElementVisibilityState(commonComponents.warningIcon(), 'exist');
|
148
148
|
});
|
149
|
-
}
|
149
|
+
}
|
150
150
|
else if (field === 'Please select a file type') {
|
151
151
|
// Upload Response Select File Type Accordion
|
152
152
|
cy.get('.edit-question-edit-tab-wrapper .ngie-accordion-summary')
|
153
153
|
.within(() => {
|
154
154
|
utilities.verifyElementVisibilityState(commonComponents.warningIcon(), 'exist');
|
155
155
|
});
|
156
|
+
} else if (field === 'Please enter text block') {
|
157
|
+
// Content Block Body Label
|
158
|
+
cy.get('.options-label')
|
159
|
+
.within(() => {
|
160
|
+
utilities.verifyElementVisibilityState(commonComponents.warningIcon(), 'exist');
|
161
|
+
});
|
156
162
|
}
|
157
163
|
})
|
158
164
|
},
|
159
|
-
|
165
|
+
|
160
166
|
|
161
167
|
clickOnEditQuestionButton: () => {
|
162
168
|
createQuestionBasePage.editButton()
|
package/package.json
CHANGED