itemengine-cypress-automation 1.0.332 → 1.0.334-IEI-5156-089cdd1.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.
@@ -3,6 +3,7 @@ import { colorPopupComponent } from "../../../pages/components";
|
|
3
3
|
import { drawingToolbarOptionsAndAdditionalOptions, specialCharacters, mathCharacters } from "../../../fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters";
|
4
4
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
5
5
|
import utilities from "../../../support/helpers/utilities";
|
6
|
+
import * as applitoolsConfig from "../../applitools.config";
|
6
7
|
const css = Cypress.env('css');
|
7
8
|
|
8
9
|
const previewContentsViews = ['Question preview', 'Item view', 'Item preview', 'Student view'];
|
@@ -127,6 +128,62 @@ describe('Preview tab contents - primary toolbar options, secondary toolbar opti
|
|
127
128
|
});
|
128
129
|
});
|
129
130
|
|
131
|
+
if (!applitoolsConfig.APPLITOOLS_IS_DISABLED) {
|
132
|
+
// https://weldnorthed.atlassian.net/browse/IEI-5316
|
133
|
+
views.forEach((view) => {
|
134
|
+
describe(`Primary toolbar options for ${view}`, { tags: 'smoke' }, () => {
|
135
|
+
abortEarlySetup();
|
136
|
+
before(() => {
|
137
|
+
switch (view) {
|
138
|
+
case 'Question preview':
|
139
|
+
cy.log('Navigating to drawing response question type');
|
140
|
+
drawingResponsePage.steps.navigateToCreateQuestion('Drawing Response');
|
141
|
+
cy.barsPreLoaderWait();
|
142
|
+
drawingResponsePage.steps.addQuestionInstructions();
|
143
|
+
drawingResponsePage.steps.allotPoints(2);
|
144
|
+
drawingResponsePage.steps.selectImageRadioButton();
|
145
|
+
drawingResponsePage.steps.uploadFile('uploads/image.png');
|
146
|
+
drawingResponsePage.steps.checkFillImageToCanvasCheckbox();
|
147
|
+
drawingResponsePage.steps.switchToPreviewTab();
|
148
|
+
break;
|
149
|
+
case 'Item view':
|
150
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID[0])}`);
|
151
|
+
break;
|
152
|
+
case 'Item preview':
|
153
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID[0])}`);
|
154
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
155
|
+
break;
|
156
|
+
case 'Student view':
|
157
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID[0])}`);
|
158
|
+
break;
|
159
|
+
};
|
160
|
+
});
|
161
|
+
|
162
|
+
if (view === 'Question preview') {
|
163
|
+
after(() => {
|
164
|
+
drawingResponsePage.steps.clickOnSaveQuestionButton();
|
165
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
166
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
167
|
+
});
|
168
|
+
};
|
169
|
+
|
170
|
+
beforeEach(() => {
|
171
|
+
cy.startApplitools();
|
172
|
+
});
|
173
|
+
|
174
|
+
afterEach(() => {
|
175
|
+
cy.eyesClose();
|
176
|
+
});
|
177
|
+
|
178
|
+
it(`${view} When user has uploaded an image the image should be displayed properly in all the views`, () => {
|
179
|
+
utilities.verifyElementVisibilityState(drawingResponsePage.uploadedImage(), 'exist');
|
180
|
+
utilities.verifyElementVisibilityState(drawingResponsePage.uploadImageLoader(), 'notExist');
|
181
|
+
cy.eyesCheckWindow(`Drawing response image ${view} Verify uplaoded image`);
|
182
|
+
});
|
183
|
+
});
|
184
|
+
});
|
185
|
+
}
|
186
|
+
|
130
187
|
describe('Preview tab - \'Insert image\'', { tags: 'smoke' }, () => {
|
131
188
|
abortEarlySetup();
|
132
189
|
before(() => {
|
@@ -28,6 +28,8 @@ describe('Create item page - Text entry math: Preview contents', () => {
|
|
28
28
|
case 'Question preview':
|
29
29
|
textEntryMathWithImagePage.steps.navigateToCreateQuestion('Text Entry Math');
|
30
30
|
cy.barsPreLoaderWait();
|
31
|
+
cy.log('Waiting for question instuctions to be displayed')
|
32
|
+
cy.wait(5000);
|
31
33
|
textEntryMathWithImagePage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
|
32
34
|
textEntryMathWithImagePage.steps.addBackground();
|
33
35
|
textEntryMathWithImagePage.steps.allotPoints(10);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.334-IEI-5156-089cdd1.0",
|
4
4
|
"description": "",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -52,4 +52,4 @@
|
|
52
52
|
"devDependencies": {
|
53
53
|
"@applitools/eyes-cypress": "^3.47.0"
|
54
54
|
}
|
55
|
-
}
|
55
|
+
}
|