itemengine-cypress-automation 1.0.326-IEI-4285-168e56f.0 → 1.0.326
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/FillInTheGapsTextNew/editTabBasicSection.js +82 -1
- package/cypress/e2e/ILC/ListOrderingNew/editQuestion.smoke.js +3 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +88 -2
- package/cypress/e2e/ILC/UploadResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -41
- package/cypress/e2e/ILC/UploadResponse/thumbNail.smoke.js +2 -18
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +11 -0
- package/cypress/pages/shortTextResponsePage.js +19 -0
- package/cypress/pages/uploadResponsePage.js +1 -2
- package/package.json +2 -2
@@ -98,7 +98,8 @@ describe('Create item page - Fill in the gaps with text: Question instructions,
|
|
98
98
|
};
|
99
99
|
});
|
100
100
|
|
101
|
-
it('When the user removes all response areas from the question input field, an error message \'Error: Minimum one response token is required.\' should be displayed', () => {
|
101
|
+
it('When the user removes all response areas from the question input field, an error message \'Error: Minimum one response token is required.\' should be displayed', () => {
|
102
|
+
cy.log('Switching to edit tab')
|
102
103
|
fillInTheGapsTextPage.steps.switchToEditTab();
|
103
104
|
fillInTheGapsTextPage.steps.deleteAResponseArea(0);
|
104
105
|
fillInTheGapsTextPage.steps.deleteAResponseArea(0);
|
@@ -139,4 +140,84 @@ describe('Create item page - Fill in the gaps with text: Question instructions,
|
|
139
140
|
utilities.verifyInnerText(fillInTheGapsTextPage.questionContainerPreviewTab(), 'Lorem ipsum dolor sit amet, \n\n onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget \n\n tempus tellus dapibus.Lorem ipsum');
|
140
141
|
});
|
141
142
|
});
|
143
|
+
|
144
|
+
//https://weldnorthed.atlassian.net/browse/IEI-5098
|
145
|
+
describe('Fill in the gaps text: Answer input field - Specify correct answer section', () => {
|
146
|
+
abortEarlySetup();
|
147
|
+
before(() => {
|
148
|
+
cy.log('Navigating to Fill in the gaps text question type');
|
149
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
150
|
+
cy.barsPreLoaderWait();
|
151
|
+
fillInTheGapsTextPage.steps.selectNoneRadioButton();
|
152
|
+
});
|
153
|
+
|
154
|
+
it('When the input field is empty, then the user should be able to focus in the input field', () => {
|
155
|
+
fillInTheGapsTextPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswer(0);
|
156
|
+
});
|
157
|
+
|
158
|
+
it('When the user enters some text, then the user should be able to enter text and focus in and out', () => {
|
159
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Lorem Ipsum' }]);
|
160
|
+
fillInTheGapsTextPage.steps.focusOutOfResponseAnswerInputFieldSpecifyCorrectAnswer(0);
|
161
|
+
});
|
162
|
+
|
163
|
+
it('When the user enters text that triggers the tooltip, then the user should be able to enter text and focus out', () => {
|
164
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Lorem ipsum dolor sit amet, onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget tempus tellus dapibus.Lorem ipsum' }]);
|
165
|
+
fillInTheGapsTextPage.steps.focusOutOfResponseAnswerInputFieldSpecifyCorrectAnswer(0);
|
166
|
+
});
|
167
|
+
|
168
|
+
it('When the user enters text that triggers the tooltip, then the user should be able to enter text and focus in', () => {
|
169
|
+
fillInTheGapsTextPage.steps.focusInAndFocusOutOfResponseAnswerInputFieldSpecifyCorrectAnswer(0);
|
170
|
+
});
|
171
|
+
|
172
|
+
//Unable to check tooltip using cypress
|
173
|
+
it.skip('When the user enters a long text, then the user should be able to see the tooltip', () => {
|
174
|
+
fillInTheGapsTextPage.answerInputFieldSpecifyCorrectAnswerSection()
|
175
|
+
.verifyTooltip('Lorem ipsum dolor sit amet, onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget tempus tellus dapibus.Lorem ipsum');
|
176
|
+
});
|
177
|
+
|
178
|
+
it('When the user removes text, then the user should be able to check focus', () => {
|
179
|
+
fillInTheGapsTextPage.steps.clearAnswerInputField();
|
180
|
+
fillInTheGapsTextPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswer(0);
|
181
|
+
});
|
182
|
+
});
|
183
|
+
|
184
|
+
describe('Fill in the gaps text: Answer input field - Preview tab functionality', () => {
|
185
|
+
abortEarlySetup();
|
186
|
+
before(() => {
|
187
|
+
cy.log('Navigating to Fill in the gaps text question type');
|
188
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
189
|
+
cy.barsPreLoaderWait();
|
190
|
+
fillInTheGapsTextPage.steps.selectNoneRadioButton();
|
191
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
192
|
+
});
|
193
|
+
|
194
|
+
it('When the input field is empty, then the user should be able to focus in the input field', () => {
|
195
|
+
fillInTheGapsTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
196
|
+
});
|
197
|
+
|
198
|
+
it('When the user enters some text, then the user should be able to enter text and focus in and out', () => {
|
199
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Lorem Ipsum' }]);
|
200
|
+
fillInTheGapsTextPage.steps.focusOutOfResponseAnswerInputFieldPreviewTab(0);
|
201
|
+
});
|
202
|
+
|
203
|
+
it('When the user enters text that triggers the tooltip, then the user should be able to enter text and focus out', () => {
|
204
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Lorem ipsum dolor sit amet, onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget tempus tellus dapibus.Lorem ipsum' }]);
|
205
|
+
fillInTheGapsTextPage.steps.focusOutOfResponseAnswerInputFieldPreviewTab(0);
|
206
|
+
});
|
207
|
+
|
208
|
+
//Unable to check tooltip using cypress
|
209
|
+
it.skip('When the character limit is reached, then the tooltip should appear', () => {
|
210
|
+
fillInTheGapsTextPage.answerInputFieldPreviewTab()
|
211
|
+
.verifyTooltip('Lorem ipsum dolor sit amet, onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget tempus tellus dapibus.Lorem ipsum')
|
212
|
+
});
|
213
|
+
|
214
|
+
it('When the user enters text that triggers the tooltip, then the user should be able to enter text and focus in', () => {
|
215
|
+
fillInTheGapsTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
216
|
+
});
|
217
|
+
|
218
|
+
it('When the user removes text, then the user should be able to check focus', () => {
|
219
|
+
fillInTheGapsTextPage.steps.clearAnswerInputFieldPreviewTab();
|
220
|
+
fillInTheGapsTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
221
|
+
});
|
222
|
+
});
|
142
223
|
});
|
@@ -34,7 +34,9 @@ describe('Edit item - List ordering', () => {
|
|
34
34
|
|
35
35
|
it('User should be able to edit options and save the question', () => {
|
36
36
|
listOrderingPage.steps.editItem();
|
37
|
-
|
37
|
+
for (let i = 0; i < options1.length; i++) {
|
38
|
+
listOrderingPage.steps.editOptionInputField(i, options1[i]);
|
39
|
+
}
|
38
40
|
listOrderingPage.steps.saveAQuestionAndVerifySnackbar();
|
39
41
|
listOrderingPage.steps.verifyOptionFieldContentsInOptionsSectionQuestionPreviewTab(options1);
|
40
42
|
});
|
@@ -432,7 +432,7 @@ describe('Create question page - Short text response: Question Instructions, Set
|
|
432
432
|
|
433
433
|
it('When the user enters the character less than the minimum character limit value set by the user and focus out of response field, then the warning message \'Minimum # characters are required\' should be displayed', () => {
|
434
434
|
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Lo');
|
435
|
-
shortTextResponsePage.steps.
|
435
|
+
shortTextResponsePage.steps.focusOutOfSpecifyCorrectAnswerInputField();
|
436
436
|
shortTextResponsePage.steps.verifyWarningMessagePreviewTab('Minimum 3 characters are required.');
|
437
437
|
});
|
438
438
|
|
@@ -493,7 +493,7 @@ describe('Create question page - Short text response: Question Instructions, Set
|
|
493
493
|
it('When the user enters the word less than the minimum word limit value set by the user and focus out of response field, then the warning message \'Minimum 3 words are required\' should be displayed', () => {
|
494
494
|
cy.log('Pre-step: Clearing the response field');
|
495
495
|
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('abc abc');
|
496
|
-
shortTextResponsePage.steps.
|
496
|
+
shortTextResponsePage.steps.focusOutOfSpecifyCorrectAnswerInputField();
|
497
497
|
shortTextResponsePage.steps.verifyWarningMessagePreviewTab('Minimum 3 words are required.');
|
498
498
|
});
|
499
499
|
|
@@ -513,4 +513,90 @@ describe('Create question page - Short text response: Question Instructions, Set
|
|
513
513
|
shortTextResponsePage.steps.verifyWarningMessageNotExist();
|
514
514
|
});
|
515
515
|
});
|
516
|
+
|
517
|
+
//https://weldnorthed.atlassian.net/browse/IEI-5098
|
518
|
+
describe('Short text response: Answer input field - Specify correct answer section', () => {
|
519
|
+
abortEarlySetup();
|
520
|
+
before(() => {
|
521
|
+
cy.log('Navigating to Short text response question type');
|
522
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
523
|
+
cy.barsPreLoaderWait();
|
524
|
+
shortTextResponsePage.steps.selectNoneRadioButton();
|
525
|
+
});
|
526
|
+
|
527
|
+
it('When the input field is empty, then the user should be able to focus in the input field', () => {
|
528
|
+
shortTextResponsePage.steps.focusInSpecifyCorrectAnswerInputField();
|
529
|
+
});
|
530
|
+
|
531
|
+
it('When the user enters some text, then the user should be able to enter text and focus in and out', () => {
|
532
|
+
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Lorem Ipsum');
|
533
|
+
shortTextResponsePage.steps.verifyTextInAnswerInputFieldSpecifyCorrectAnswerSection('Lorem Ipsum');
|
534
|
+
shortTextResponsePage.steps.focusOutOfSpecifyCorrectAnswerInputField();
|
535
|
+
});
|
536
|
+
|
537
|
+
it('When the user enters text that triggers the tooltip, then the user should be able to enter text and focus out', () => {
|
538
|
+
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Lorem ipsum dolor sit amet, onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget tempus tellus dapibus.Lorem ipsum');
|
539
|
+
shortTextResponsePage.steps.verifyTextInAnswerInputFieldSpecifyCorrectAnswerSection('Lorem ipsum dolor sit amet, onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget tempus tellus dapibus.Lorem ipsum');
|
540
|
+
shortTextResponsePage.steps.focusOutOfSpecifyCorrectAnswerInputField();
|
541
|
+
});
|
542
|
+
|
543
|
+
it('When the user enters text that triggers the tooltip, then the user should be able to enter text and focus in', () => {
|
544
|
+
shortTextResponsePage.steps.focusOutOfSpecifyCorrectAnswerInputField();
|
545
|
+
});
|
546
|
+
|
547
|
+
//Unable to check tooltip using cypress
|
548
|
+
it.skip('When the user enters a long text, then the user should be able to see the tooltip', () => {
|
549
|
+
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
550
|
+
.verifyTooltip('Lorem ipsum dolor sit amet, onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget tempus tellus dapibus.Lorem ipsum');
|
551
|
+
});
|
552
|
+
|
553
|
+
it('When the user removes text, then the user should be able to check focus', () => {
|
554
|
+
shortTextResponsePage.steps.clearSpecifyCorrectAnswerInputField();
|
555
|
+
shortTextResponsePage.steps.verifyTextInAnswerInputFieldSpecifyCorrectAnswerSection('');
|
556
|
+
shortTextResponsePage.steps.focusInSpecifyCorrectAnswerInputField();
|
557
|
+
});
|
558
|
+
});
|
559
|
+
|
560
|
+
describe('Short text response: Answer input field - Preview tab functionality', () => {
|
561
|
+
abortEarlySetup();
|
562
|
+
before(() => {
|
563
|
+
cy.log('Navigating to Short text response question type');
|
564
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
565
|
+
cy.barsPreLoaderWait();
|
566
|
+
shortTextResponsePage.steps.selectNoneRadioButton();
|
567
|
+
shortTextResponsePage.steps.switchToPreviewTab();
|
568
|
+
});
|
569
|
+
|
570
|
+
it('When the input field is empty, then the user should be able to focus in the input field', () => {
|
571
|
+
shortTextResponsePage.steps.focusInAnswerInputFieldPreviewTab();
|
572
|
+
});
|
573
|
+
|
574
|
+
it('When the user enters some text, then the user should be able to enter text and focus in and out', () => {
|
575
|
+
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Lorem Ipsum');
|
576
|
+
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('Lorem Ipsum');
|
577
|
+
shortTextResponsePage.steps.focusOutOfResponseField();
|
578
|
+
});
|
579
|
+
|
580
|
+
it('When the user enters text that triggers the tooltip, then the user should be able to enter text and focus out', () => {
|
581
|
+
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor, eget tempus tellus dapibus. Lorem ipsum');
|
582
|
+
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor, eget tempus tellus dapibus. Lorem ipsum');
|
583
|
+
shortTextResponsePage.steps.focusOutOfResponseField();
|
584
|
+
});
|
585
|
+
|
586
|
+
//Unable to check tooltip using cypress
|
587
|
+
it.skip('When the character limit is reached, then the tooltip should appear', () => {
|
588
|
+
shortTextResponsePage.previewTabResponseField()
|
589
|
+
.verifyTooltip('Lorem ipsum dolor sit amet, onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget tempus tellus dapibus.Lorem ipsum')
|
590
|
+
});
|
591
|
+
|
592
|
+
it('When the user enters text that triggers the tooltip, then the user should be able to enter text and focus in', () => {
|
593
|
+
shortTextResponsePage.steps.focusOutOfResponseField();
|
594
|
+
});
|
595
|
+
|
596
|
+
it('When the user removes text, then the user should be able to check focus', () => {
|
597
|
+
shortTextResponsePage.steps.clearAndFocusOutOfResponseInputFieldPreviewTab();
|
598
|
+
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('');
|
599
|
+
shortTextResponsePage.steps.focusInAnswerInputFieldPreviewTab();
|
600
|
+
});
|
601
|
+
});
|
516
602
|
});
|
@@ -2,7 +2,6 @@ import { correctAnswerViewPage, uploadResponsePage, itemPreviewPage, studentView
|
|
2
2
|
import { gradingViewPage } from "../../../pages";
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
5
|
-
import { largeFileName } from './thumbNail.smoke';
|
6
5
|
const css = Cypress.env('css');
|
7
6
|
let gradingAndCorrectAnsView = ['Grading view', 'Correct answer view']
|
8
7
|
const views = utilities.getViews(gradingAndCorrectAnsView);
|
@@ -71,46 +70,6 @@ describe('Create item page - Upload response: Grading view, Correct answer view
|
|
71
70
|
cy.verifyUploadFilePreviewDownload('highlightImage.jpg');
|
72
71
|
});
|
73
72
|
});
|
74
|
-
|
75
|
-
describe('Upload file with a very large name', { tags: 'smoke' }, () => {
|
76
|
-
abortEarlySetup();
|
77
|
-
before(() => {
|
78
|
-
cy.log('Navigating to Upload response question type');
|
79
|
-
uploadResponsePage.steps.navigateToCreateQuestion('upload response');
|
80
|
-
cy.barsPreLoaderWait();
|
81
|
-
uploadResponsePage.steps.allotPoints(10);
|
82
|
-
uploadResponsePage.steps.addTextInQuestionInstructionsInputField('Question text');
|
83
|
-
uploadResponsePage.steps.setMaximumNumberOfFiles(3);
|
84
|
-
uploadResponsePage.steps.clickOnSaveQuestionButton();
|
85
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
86
|
-
//Global variable issue, not working inside before
|
87
|
-
itemPreviewPage.referenceID()
|
88
|
-
.invoke('text')
|
89
|
-
.then(($refID) => {
|
90
|
-
itemReferenceID = $refID;
|
91
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
92
|
-
uploadResponsePage.steps.uploadFile('uploads/highlightImage.jpg');
|
93
|
-
|
94
|
-
uploadResponsePage.steps.clickOnEditDisplayTextIcon(0);
|
95
|
-
utilities.verifyElementVisibilityState(uploadResponsePage.dialogBox(), 'exist');
|
96
|
-
uploadResponsePage.steps.enterTextInEditDisplayTextPopupInputField(largeFileName);
|
97
|
-
uploadResponsePage.steps.verifyTextInEditDisplayTextPopupInputField(largeFileName);
|
98
|
-
uploadResponsePage.steps.clickAcceptButtonInPopup();
|
99
|
-
uploadResponsePage.steps.verifyUploadedFileName(0, largeFileName);
|
100
|
-
studentViewPage.steps.submitResponse();
|
101
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
102
|
-
});
|
103
|
-
});
|
104
|
-
|
105
|
-
it('Thumbnail should not get compressed', () => {
|
106
|
-
uploadResponsePage.imageThumbnailGradingPage()
|
107
|
-
.invoke('css', ['width', 'height'])
|
108
|
-
.then(({ width, height }) => {
|
109
|
-
expect(Math.round(parseFloat(width))).to.be.closeTo(80, 1);
|
110
|
-
expect(Math.round(parseFloat(height))).to.be.closeTo(80, 1);
|
111
|
-
});
|
112
|
-
});
|
113
|
-
});
|
114
73
|
}
|
115
74
|
|
116
75
|
if (views.includes('Correct answer view')) {
|
@@ -2,12 +2,11 @@ import { uploadResponsePage, itemPreviewPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
4
|
const css = Cypress.env('css');
|
5
|
-
let previewContentViews = ['Question preview'];
|
5
|
+
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view'];
|
6
6
|
const views = utilities.getViews(previewContentViews);
|
7
7
|
var itemReferenceID = "";
|
8
8
|
const filename = ['sample.csv', 'sample.xlsx', 'sample.gif', 'sample.jpg', 'sample.pdf', 'image.png', 'sample.ppt', 'sample.pub', 'sample.rtf', 'sample.txt', 'sample.doc', 'sample.xps', 'sample.zip', 'sample.heif', 'sample.heic'];
|
9
9
|
const fileThumbNail = ['notExist', 'notExist', 'visible', 'visible', 'notExist', 'visible', 'notExist', 'notExist', 'notExist', 'notExist', 'notExist', 'notExist', 'notExist', 'notExist', 'notExist']
|
10
|
-
export const largeFileName = 'nature imagenature imagenature imagenature imagenature imagenature imagenature imagenature imagenature imagenature imagenature imagenature imagenature';
|
11
10
|
|
12
11
|
describe('Create item page - Upload response : Preview contents', () => {
|
13
12
|
before(() => {
|
@@ -89,7 +88,7 @@ describe('Create item page - Upload response : Preview contents', () => {
|
|
89
88
|
});
|
90
89
|
|
91
90
|
it(`${view} - When user clicks on the thumbnail then popup should open, and on clicking the close button the popup should close and the uploaded files should be displayed`, () => {
|
92
|
-
utilities.verifyElementCount(uploadResponsePage.imageThumbNail(),
|
91
|
+
utilities.verifyElementCount(uploadResponsePage.imageThumbNail(), 2);
|
93
92
|
uploadResponsePage.steps.clickOnImageThumbNail();
|
94
93
|
uploadResponsePage.steps.verifyImagePopUpDetail();
|
95
94
|
cy.eyesCheckWindow(`${view} - Thumbnail popup`);
|
@@ -106,21 +105,6 @@ describe('Create item page - Upload response : Preview contents', () => {
|
|
106
105
|
utilities.verifyElementCount(uploadResponsePage.fileName(), 1);
|
107
106
|
});
|
108
107
|
|
109
|
-
it(`${view} - When user uploads file with a very large name then thumbnail should not get compressed`, () => {
|
110
|
-
uploadResponsePage.steps.clickOnEditDisplayTextIcon(0);
|
111
|
-
utilities.verifyElementVisibilityState(uploadResponsePage.dialogBox(), 'exist');
|
112
|
-
uploadResponsePage.steps.enterTextInEditDisplayTextPopupInputField(largeFileName);
|
113
|
-
uploadResponsePage.steps.verifyTextInEditDisplayTextPopupInputField(largeFileName);
|
114
|
-
uploadResponsePage.steps.clickAcceptButtonInPopup();
|
115
|
-
uploadResponsePage.steps.verifyUploadedFileName(0, largeFileName);
|
116
|
-
uploadResponsePage.imageThumbNail()
|
117
|
-
.invoke('css', ['width', 'height'])
|
118
|
-
.then(({ width, height }) => {
|
119
|
-
expect(Math.round(parseFloat(width))).to.be.closeTo(80, 1);
|
120
|
-
expect(Math.round(parseFloat(height))).to.be.closeTo(80, 1);
|
121
|
-
});
|
122
|
-
});
|
123
|
-
|
124
108
|
it(`${view} - When user uploads different file types then only image files should be displayed with thumbnail`, () => {
|
125
109
|
for (let number = 0; number < 13; number++) {
|
126
110
|
uploadResponsePage.steps.deleteFile();
|
@@ -494,6 +494,7 @@ const steps = {
|
|
494
494
|
*/
|
495
495
|
focusOutOfResponseAnswerInputFieldSpecifyCorrectAnswer: (answerFieldIndex) => {
|
496
496
|
utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), answerFieldIndex)
|
497
|
+
.click()
|
497
498
|
.blur();
|
498
499
|
},
|
499
500
|
|
@@ -503,9 +504,19 @@ const steps = {
|
|
503
504
|
*/
|
504
505
|
focusOutOfResponseAnswerInputFieldPreviewTab: (answerFieldIndex) => {
|
505
506
|
utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldPreviewTab(), answerFieldIndex)
|
507
|
+
.click()
|
506
508
|
.blur();
|
507
509
|
},
|
508
510
|
|
511
|
+
/**
|
512
|
+
* Focus in response input field in preview tab
|
513
|
+
* @param {number} responseInputFieldIndex response input field index
|
514
|
+
*/
|
515
|
+
focusInResponseAnswerInputFieldSpecifyCorrectAnswer: (responseInputFieldIndex) => {
|
516
|
+
utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), responseInputFieldIndex)
|
517
|
+
.click();
|
518
|
+
},
|
519
|
+
|
509
520
|
/**
|
510
521
|
* Focus in response input field in preview tab
|
511
522
|
* @param {number} responseInputFieldIndex response input field index
|
@@ -183,10 +183,22 @@ const steps = {
|
|
183
183
|
.blur();
|
184
184
|
},
|
185
185
|
|
186
|
+
focusInSpecifyCorrectAnswerInputField: () => {
|
187
|
+
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
188
|
+
.focus();
|
189
|
+
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
190
|
+
.parents('.short-text-response-input-field')
|
191
|
+
.should('have.class', 'Mui-focused');
|
192
|
+
},
|
193
|
+
|
186
194
|
focusOutOfSpecifyCorrectAnswerInputField: () => {
|
187
195
|
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
188
196
|
.clear()
|
197
|
+
.click()
|
189
198
|
.blur();
|
199
|
+
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
200
|
+
.parents('.short-text-response-input-field')
|
201
|
+
.should('not.have.class', 'Mui-focused');
|
190
202
|
},
|
191
203
|
|
192
204
|
clearAndFocusOutOfResponseInputFieldPreviewTab: () => {
|
@@ -223,6 +235,9 @@ const steps = {
|
|
223
235
|
focusInAnswerInputFieldPreviewTab: () => {
|
224
236
|
shortTextResponsePage.previewTabResponseField()
|
225
237
|
.click();
|
238
|
+
shortTextResponsePage.previewTabResponseField()
|
239
|
+
.parents('.short-text-preview-response-input-field')
|
240
|
+
.should('have.class', 'Mui-focused');
|
226
241
|
},
|
227
242
|
|
228
243
|
/**
|
@@ -310,7 +325,11 @@ const steps = {
|
|
310
325
|
|
311
326
|
focusOutOfResponseField: () => {
|
312
327
|
shortTextResponsePage.previewTabResponseField()
|
328
|
+
.click()
|
313
329
|
.blur();
|
330
|
+
shortTextResponsePage.previewTabResponseField()
|
331
|
+
.parents('.short-text-preview-response-input-field')
|
332
|
+
.should('not.have.class', 'Mui-focused');
|
314
333
|
},
|
315
334
|
|
316
335
|
/**
|
@@ -90,14 +90,13 @@ const selectors = {
|
|
90
90
|
maximumFileSize: () => cy.get('[class*="UploadQuestionPreviewstyle__MaxFileLimitDesc"]'),
|
91
91
|
unSupportedFileInfoIcon: () => cy.get('[class*="UploadedDocumentsstyle__UnSupportedFileIcon"]'),
|
92
92
|
//Thumb nail
|
93
|
-
imageThumbNail: () => cy.get('
|
93
|
+
imageThumbNail: () => cy.get('[class*="UploadedDocumentsstyle__ImageContainer"]'),
|
94
94
|
imageThumbNailButton: () => cy.get('[class*="UploadedDocumentsstyle__ImageContainerButton"]'),
|
95
95
|
popUpWrapper: () => cy.get('[class*="UploadedDocumentsstyle__ImagePopupDiv"]'),
|
96
96
|
imageDisplayedInsidePopUp: () => cy.get('.image-upload-popup-wrapper'),
|
97
97
|
downloadIconOfPopUp: () => cy.get('.download-icon'),
|
98
98
|
downloadTextOfPopUp: () => cy.get('[class*="UploadedDocumentsstyle__DownloadTextWrapper"]'),
|
99
99
|
closePopUpButton: () => cy.get('.close-popup-btn'),
|
100
|
-
imageThumbnailGradingPage: () => cy.get('img[class*="UploadQuestionPreviewstyle__ImageContainer"]'),
|
101
100
|
}
|
102
101
|
|
103
102
|
const steps = {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.326
|
3
|
+
"version": "1.0.326",
|
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
|
+
}
|