itemengine-cypress-automation 1.0.45 → 1.0.47
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothingCorrectPointsEqualToAlternatePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardAllOrNothingCorrectPointsEqualToAlternatePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/standardAllOrNothingCorrectPointsGreaterThanAlternatePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAddResponseContainer.js +221 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettings.js +1588 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAllOrNothingScoring.js +950 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextConditionalCheckboxes.js +357 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.js +134 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.js +208 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabScoringSection.js +227 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextHeaderSection.js +109 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextImageProperties.js +156 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextManualAndNonScored.js +157 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialDifferentWeightsScoring.js +1199 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialEqualWeightsScoring.js +1084 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPreviewTab.js +66 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextSetCorrectAnswerSection.js +113 -0
- package/package.json +1 -1
@@ -0,0 +1,66 @@
|
|
1
|
+
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const correctTabAnswerArray = ['Flower', 'Leaf', 'Stem'];
|
7
|
+
|
8
|
+
describe('Create item page - Fill in the gaps over image - text: Preview contents', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Preview tab contents', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
cy.log('Navigating to Fill in the gaps over image - text question type');
|
17
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
18
|
+
cy.barsPreLoaderWait();
|
19
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
20
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
21
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
22
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
23
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
24
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
25
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
26
|
+
});
|
27
|
+
|
28
|
+
it('When user uploads an image in the \'Image\' section then the uploaded image should be displayed in the preview tab', () => {
|
29
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.imagePreviewTab(), 'visible');
|
30
|
+
});
|
31
|
+
|
32
|
+
it('The added response fields should be displayed in the preview tab and they should be empty', () => {
|
33
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseFieldPreviewTab(), 2);
|
34
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(0, '');
|
35
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(1, '');
|
36
|
+
});
|
37
|
+
|
38
|
+
it('User should be able to enter text in the response field', () => {
|
39
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[2]);
|
40
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(0, correctTabAnswerArray[2]);
|
41
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(1, '');
|
42
|
+
});
|
43
|
+
|
44
|
+
it('CSS of preview tab contents', { tags: 'css' }, () => {
|
45
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.responseContainerPointer().find('circle'), {
|
46
|
+
'fill': css.color.responseContainerPointer,
|
47
|
+
'font-size': css.fontSize.normal,
|
48
|
+
'font-weight': css.fontWeight.regular,
|
49
|
+
});
|
50
|
+
fillInTheGapsOverImageTextPage.steps.focusInResponseFieldPreviewTab(0);
|
51
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.responseFieldPreviewTab().parents('.cloze-with-text-response-preview-wrapper').find('fieldset').eq(0), {
|
52
|
+
'border': `1px solid ${css.color.activeButtons}`
|
53
|
+
});
|
54
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.responseFieldPreviewTab().parents('.cloze-with-text-response-preview-wrapper').find('fieldset').eq(1), {
|
55
|
+
'color': css.color.text,
|
56
|
+
'font-size': css.fontSize.default,
|
57
|
+
'font-weight': css.fontWeight.regular,
|
58
|
+
'border': `1px solid ${css.color.figDefaultComponentBorder}`
|
59
|
+
});
|
60
|
+
});
|
61
|
+
|
62
|
+
it('Accessibility of preview tab', { tags: 'a11y' }, () => {
|
63
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.previewTabQuestionWrapper());
|
64
|
+
});
|
65
|
+
});
|
66
|
+
});
|
@@ -0,0 +1,113 @@
|
|
1
|
+
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create item page - Fill in the gaps over image - text: Set correct answer section, Alternate answer tab, Correct response conditions section', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Set correct answer section', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
15
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
18
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
19
|
+
});
|
20
|
+
|
21
|
+
fillInTheGapsOverImageTextPage.tests.verifyAutoScoredSetCorrectAnswerHeaderSectionContents('fill in the gaps over image - text');
|
22
|
+
|
23
|
+
fillInTheGapsOverImageTextPage.tests.verifySetCorrectAnswerSectionDefaultState();
|
24
|
+
|
25
|
+
it('When the user adds a response container over the uploaded image, a response field with label \'Response 1\' should be displayed in the set correct answer section', () => {
|
26
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
27
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseFieldSetCorrectAnswerSection(), 'visible');
|
28
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseFieldSetCorrectAnswerSection(), 1);
|
29
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.responseFieldLabelSetCorrectAnswerSection(), 'Response 1');
|
30
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseFieldLabelSetCorrectAnswerSection(), 'visible');
|
31
|
+
});
|
32
|
+
});
|
33
|
+
|
34
|
+
describe('Set correct answer section - Correct tab', () => {
|
35
|
+
abortEarlySetup();
|
36
|
+
before(() => {
|
37
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
38
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
39
|
+
cy.barsPreLoaderWait();
|
40
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
41
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
42
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
43
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
44
|
+
});
|
45
|
+
|
46
|
+
fillInTheGapsOverImageTextPage.tests.verifySetCorrectAnswerTabContentsAndFunctionality('Correct tab');
|
47
|
+
});
|
48
|
+
|
49
|
+
describe('Set correct answer section - Alternate tab', () => {
|
50
|
+
abortEarlySetup();
|
51
|
+
before(() => {
|
52
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
53
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
54
|
+
cy.barsPreLoaderWait();
|
55
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
56
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
57
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
58
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
59
|
+
});
|
60
|
+
|
61
|
+
fillInTheGapsOverImageTextPage.tests.verifyAutoScoredAlternateAnswer();
|
62
|
+
|
63
|
+
it('When user has added points and filled all the response fields in the \'Correct\' tab, then the user should be able to add alternate answer for the question using \'Add alternate answer\' button and \'Match from all responses\' functionality label and checkbox should get enabled and the checkbox should be in unchecked state', () => {
|
64
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, 'Flower');
|
65
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, 'Leaf');
|
66
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
67
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateTab(1);
|
68
|
+
fillInTheGapsOverImageTextPage.steps.verifyMatchFromAllResponsesLabelAndCheckboxEnabledState();
|
69
|
+
});
|
70
|
+
|
71
|
+
fillInTheGapsOverImageTextPage.tests.verifyA11yOfAlternateAnswerTab();
|
72
|
+
|
73
|
+
fillInTheGapsOverImageTextPage.tests.verifySetCorrectAnswerTabContentsAndFunctionality('Alternate tab');
|
74
|
+
|
75
|
+
it('User should be able to add another alternate answer for the question using \'Add alternate answer\' button and the name for this new tab should be \'Alternate 2\'', () => {
|
76
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateTab(2);
|
77
|
+
});
|
78
|
+
|
79
|
+
fillInTheGapsOverImageTextPage.tests.verifyWarningPopupAndTabNavigationWhenNoPointsAddedInAlternateTab();
|
80
|
+
|
81
|
+
it('User should be able to remove alternate correct answer by clicking on the \'Close\' icon button alongside alternate answer tab and the name of the alternate answer tabs should get updated accordingly', () => {
|
82
|
+
cy.log('Set correct answer and points in alternate 2 tab, then switch to Alternate 1 tab and click delete icon button');
|
83
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, 'Petals');
|
84
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, 'Leaves');
|
85
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(5);
|
86
|
+
fillInTheGapsOverImageTextPage.steps.navigateToAlternateTab(1);
|
87
|
+
fillInTheGapsOverImageTextPage.steps.deleteAlternateTab();
|
88
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.alternateAnswerTab(2), 'notExist');
|
89
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.alternateAnswerTab(1), 'Alternate 1');
|
90
|
+
});
|
91
|
+
|
92
|
+
it('When the user removes all the \'Alternate\' tabs, \'Match from all responses\' functionality should get disabled', () => {
|
93
|
+
fillInTheGapsOverImageTextPage.steps.deleteAlternateTab();
|
94
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.alternateAnswerTab(1), 'notExist');
|
95
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.matchFromAllResponsesLabel(), 'Match from all responses');
|
96
|
+
fillInTheGapsOverImageTextPage.steps.verifyMatchFromAllResponsesLabelAndCheckboxDisabledState();
|
97
|
+
});
|
98
|
+
});
|
99
|
+
|
100
|
+
describe('Correct response conditions section', () => {
|
101
|
+
abortEarlySetup();
|
102
|
+
before(() => {
|
103
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
104
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
105
|
+
cy.barsPreLoaderWait();
|
106
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
107
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
108
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
109
|
+
});
|
110
|
+
|
111
|
+
fillInTheGapsOverImageTextPage.tests.verifyCorrectResponseConditionSectionDefaultState();
|
112
|
+
});
|
113
|
+
});
|