itemengine-cypress-automation 1.0.347-IEI-4974-acd3dc9.0 → 1.0.347-miscellaneous-questions-r2-6a04041.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/Dockerfile +1 -0
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +4 -62
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +1 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/styleAndLayoutCustomizationLayoutProperties.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/ToolAudioPlayerNew/headerSection.js +1 -89
- package/cypress/pages/audioPlayerPage.js +0 -2
- package/cypress/pages/components/createQuestionBasePage.js +2 -8
- package/cypress/pages/contentBlocksPage.js +0 -2
- package/cypress/pages/textEntryMathPage.js +3 -1
- package/package.json +1 -1
package/Dockerfile
CHANGED
@@ -27,6 +27,7 @@ RUN chmod +x ./deploy/fillInTheGapsQuestion/run.sh
|
|
27
27
|
RUN chmod +x ./deploy/resourcesAndToolsQuestion/run.sh
|
28
28
|
RUN chmod +x ./deploy/audioResponseQuestion/run.sh
|
29
29
|
RUN chmod +x ./deploy/dataApi/run.sh
|
30
|
+
RUN chmod +x ./deploy/feedbackScaleQuestion/run.sh
|
30
31
|
|
31
32
|
RUN npm ci
|
32
33
|
|
@@ -1,11 +1,8 @@
|
|
1
|
-
import { contentBlocksPage
|
2
|
-
import { browseItemsPage } from "../../../pages/components";
|
1
|
+
import { contentBlocksPage } from "../../../pages";
|
3
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
3
|
import utilities from "../../../support/helpers/utilities";
|
5
4
|
const css = Cypress.env('css');
|
6
5
|
|
7
|
-
var itemReferenceID = "";
|
8
|
-
|
9
6
|
describe('Content blocks - Edit tab', () => {
|
10
7
|
before(() => {
|
11
8
|
cy.loginAs('admin');
|
@@ -85,62 +82,6 @@ describe('Content blocks - Edit tab', () => {
|
|
85
82
|
it('Accessibility of header section', { tags: 'a11y' }, () => {
|
86
83
|
cy.checkAccessibility(contentBlocksPage.headerLabel().parents('content-blocks'));
|
87
84
|
});
|
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
|
-
});
|
144
85
|
});
|
145
86
|
|
146
87
|
describe('Body section', () => {
|
@@ -172,9 +113,10 @@ describe('Content blocks - Edit tab', () => {
|
|
172
113
|
contentBlocksPage.steps.verifyTextBlockInputFieldPlaceholderTextNotExist(contentBlocksPage.verifyTextBlockInputFieldPlaceholderText);
|
173
114
|
});
|
174
115
|
|
175
|
-
it('When user clears text and focuses out of text block input field, then error message should
|
116
|
+
it('When user clears text and focuses out of text block input field, then error message \'Error: Text block is required.\' should be displayed', () => {
|
176
117
|
contentBlocksPage.steps.clearAndFocusOutOfTextBlockInputField();
|
177
|
-
utilities.
|
118
|
+
utilities.verifyInnerText(contentBlocksPage.errorMessage(), 'Error: Text block is required.');
|
119
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.errorMessage(), 'visible');
|
178
120
|
});
|
179
121
|
|
180
122
|
it('When user enters text again then error message should not be displayed', () => {
|
@@ -375,7 +375,8 @@ describe('Create Item page - Multiple selection: All or nothing ', () => {
|
|
375
375
|
multipleSelectionPage.steps.verifyCorrectAnswerSectionExist();
|
376
376
|
});
|
377
377
|
|
378
|
-
|
378
|
+
//Failing due to https://weldnorthed.atlassian.net/browse/IEI-6004
|
379
|
+
it.skip('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
379
380
|
if (view === 'Grading view') {
|
380
381
|
studentViewPage.steps.clearResponses();
|
381
382
|
};
|
package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js
CHANGED
@@ -65,6 +65,7 @@ describe('Create Item page - Multiple selection grid', () => {
|
|
65
65
|
before(() => {
|
66
66
|
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
67
67
|
cy.barsPreLoaderWait();
|
68
|
+
multipleSelectionGridPage.steps.addQuestionInstructions('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
68
69
|
});
|
69
70
|
|
70
71
|
it('When the user selects \'Grading\' view without setting the answer, correct answers section and answer status banner should not be displayed', () => {
|
package/cypress/e2e/ILC/MultipleSelectionGridNew/styleAndLayoutCustomizationLayoutProperties.js
CHANGED
@@ -38,6 +38,7 @@ describe('Multiple selection grid - Additional settings', () => {
|
|
38
38
|
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
39
39
|
cy.barsPreLoaderWait();
|
40
40
|
multipleSelectionGridPage.steps.expandStyleAndLayoutCustomizationAccordion();
|
41
|
+
multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
41
42
|
});
|
42
43
|
|
43
44
|
multipleSelectionGridPage.tests.verifyRowAndColumnSpacingFunctionalityPreviewTab();
|
@@ -209,8 +209,8 @@ describe('Create item page - Text entry math: Question instructions, Add structu
|
|
209
209
|
});
|
210
210
|
|
211
211
|
it('Warning icons should be displayed on the required input fields', () => {
|
212
|
-
utilities.verifyElementVisibilityState(
|
213
|
-
utilities.verifyElementVisibilityState(
|
212
|
+
utilities.verifyElementVisibilityState(textEntryMathPage.questionWarningIcon(), 'exist');
|
213
|
+
utilities.verifyElementVisibilityState(textEntryMathPage.warningIcon(), 'exist');
|
214
214
|
});
|
215
215
|
|
216
216
|
it('When required input fields are filled then warning icons should disappear', () => {
|
@@ -1,12 +1,9 @@
|
|
1
|
-
import { audioPlayerPage, dialogBoxBase, selectQuestionResourceToolPage
|
2
|
-
import { browseItemsPage } from "../../../pages/components";
|
1
|
+
import { audioPlayerPage, dialogBoxBase, selectQuestionResourceToolPage } from "../../../pages";
|
3
2
|
import utilities from "../../../support/helpers/utilities";
|
4
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
5
4
|
import constants from "../../../fixtures/constants";
|
6
5
|
const css = Cypress.env('css');
|
7
6
|
|
8
|
-
var itemReferenceID = "";
|
9
|
-
|
10
7
|
describe('Create question page - Audio player: Header section and saving resource tool', () => {
|
11
8
|
before(() => {
|
12
9
|
cy.loginAs('admin');
|
@@ -125,89 +122,4 @@ describe('Create question page - Audio player: Header section and saving resourc
|
|
125
122
|
audioPlayerPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
126
123
|
});
|
127
124
|
});
|
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
|
-
});
|
213
125
|
});
|
@@ -2,7 +2,6 @@ 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";
|
6
5
|
|
7
6
|
const selectors = {
|
8
7
|
...playbackControlsBaseComponent,
|
@@ -128,7 +127,6 @@ const steps = {
|
|
128
127
|
...ckEditorToolbar.steps,
|
129
128
|
...equationEditorFlyout.steps,
|
130
129
|
...commonComponents.steps,
|
131
|
-
...createItemPage.steps,
|
132
130
|
/**
|
133
131
|
* Uploads a file to the audio player by attaching the file located at the specified filePath.
|
134
132
|
* @param {string} filePath - The file path to the file to be uploaded.
|
@@ -146,23 +146,17 @@ 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
|
-
});
|
162
156
|
}
|
163
157
|
})
|
164
158
|
},
|
165
|
-
|
159
|
+
|
166
160
|
|
167
161
|
clickOnEditQuestionButton: () => {
|
168
162
|
createQuestionBasePage.editButton()
|
@@ -25,6 +25,7 @@ const selectors = {
|
|
25
25
|
...equationEditorSectionCommonComponent,
|
26
26
|
...styleAndLayoutCustomizationAccordionComponent,
|
27
27
|
...imageCanvasComponent,
|
28
|
+
...scoringSectionBaseEditTab,
|
28
29
|
addStructureTab: () => cy.get('[data-ngie-testid="add-structure-tab"]'),
|
29
30
|
responseToken: () => cy.get('.cke_button__addresponse'),
|
30
31
|
penaltyPointsForEachIncorrectOptionInputField: () => cy.get('input[aria-label="Penalty points for each incorrect text container"]'),
|
@@ -939,7 +940,8 @@ const steps = {
|
|
939
940
|
|
940
941
|
switchToGradingView: () => {
|
941
942
|
autoScoredScoringPreviewTab.gradingViewRadioButton()
|
942
|
-
.click()
|
943
|
+
.click({ force: true });
|
944
|
+
autoScoredScoringPreviewTab.gradingViewRadioButton()
|
943
945
|
.should('be.checked');
|
944
946
|
cy.wait(1500);
|
945
947
|
},
|