itemengine-cypress-automation 1.0.105 → 1.0.107
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +129 -0
- package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +482 -0
- package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +123 -0
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.js +554 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -41
- package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +5 -3
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +284 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +412 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +203 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories2.js +340 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +336 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +332 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +522 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +253 -0
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +266 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +57 -640
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +209 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +209 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +303 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js +68 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +149 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +218 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +191 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +219 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +240 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +107 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +0 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +408 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +2 -2
- package/cypress/e2e/ILC/MultipleSelection/headerSection.js +1 -0
- package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +0 -6
- package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +242 -0
- package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +99 -0
- package/cypress/e2e/ILC/Passage/passageEditTab.js +241 -0
- package/cypress/e2e/ILC/Passage/passageHeaderSection.js +73 -0
- package/cypress/e2e/ILC/Passage/passagePreviewTab.js +246 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +138 -33
- package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +30 -6
- package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +167 -101
- package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/SingleSelection/headerSection.js +20 -5
- package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +12 -7
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +1336 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +419 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +443 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +411 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +411 -0
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +3 -3
- package/cypress/fixtures/specialAndMathCharacters.js +2 -0
- package/cypress/fixtures/theme/ilc.json +4 -2
- package/cypress/pages/audioResponsePage.js +326 -165
- package/cypress/pages/components/additionalSettingsPanel.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +162 -2
- package/cypress/pages/components/colorPopupComponent.js +115 -26
- package/cypress/pages/components/customizeMathCharacterComponent.js +133 -0
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +74 -4
- package/cypress/pages/components/editCategoryFlyout.js +164 -2
- package/cypress/pages/components/equationEditorFlyout.js +36 -1
- package/cypress/pages/components/essayResponseCommonComponents.js +0 -2
- package/cypress/pages/components/figOverImageCanvasComponent.js +587 -134
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/playbackControlsBaseComponent.js +137 -2
- package/cypress/pages/correctAnswerViewPage.js +12 -1
- package/cypress/pages/drawingResponsePage.js +26 -151
- package/cypress/pages/essayResponseMathPage.js +28 -16
- package/cypress/pages/essayResponsePage.js +187 -7
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +78 -14
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +178 -221
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +79 -0
- package/cypress/pages/multipleSelectionPage.js +1 -1
- package/cypress/pages/readingRulerPage.js +219 -104
- package/cypress/pages/singleSelectionPage.js +1 -0
- package/cypress/pages/textEntryMathPage.js +17 -6
- package/cypress/pages/videoResponsePage.js +0 -8
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +1 -1
@@ -0,0 +1,107 @@
|
|
1
|
+
import { fillInTheGapsOverImageDropdownPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
5
|
+
const views = utilities.getViews(previewContentViews);
|
6
|
+
var itemReferenceID = "";
|
7
|
+
|
8
|
+
const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
|
9
|
+
const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
|
10
|
+
const correctAnswerArray = ['Flower', 'Leaf'];
|
11
|
+
|
12
|
+
describe('Create item page - Fill in the gaps over image - dropdown - Preview contents in all views', () => {
|
13
|
+
before(() => {
|
14
|
+
cy.loginAs('admin');
|
15
|
+
});
|
16
|
+
|
17
|
+
views.forEach((view) => {
|
18
|
+
describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
|
19
|
+
abortEarlySetup();
|
20
|
+
before(() => {
|
21
|
+
switch (view) {
|
22
|
+
case 'Question preview':
|
23
|
+
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
24
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
25
|
+
cy.barsPreLoaderWait();
|
26
|
+
fillInTheGapsOverImageDropdownPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
27
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
28
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
29
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
30
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(40);
|
31
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
32
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
|
33
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(20);
|
34
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
|
35
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
|
36
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
37
|
+
break;
|
38
|
+
case 'Item view':
|
39
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
40
|
+
break;
|
41
|
+
case 'Item preview':
|
42
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
43
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
44
|
+
break;
|
45
|
+
case 'Student view':
|
46
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
47
|
+
break;
|
48
|
+
case 'Grading view':
|
49
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
50
|
+
break;
|
51
|
+
case 'Correct answer view':
|
52
|
+
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
53
|
+
break;
|
54
|
+
default:
|
55
|
+
throw new Error('Invalid view');
|
56
|
+
}
|
57
|
+
});
|
58
|
+
|
59
|
+
after(() => {
|
60
|
+
if (view === 'Question preview') {
|
61
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnSaveQuestionButton();
|
62
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
63
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
64
|
+
}
|
65
|
+
if (view === 'Student view') {
|
66
|
+
studentViewPage.steps.submitResponse();
|
67
|
+
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
68
|
+
}
|
69
|
+
});
|
70
|
+
|
71
|
+
it('Question instructions should be visible', () => {
|
72
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.questionInstructionsText(), 'Fill in the gaps');
|
73
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.questionInstructionsText(), 'visible');
|
74
|
+
});
|
75
|
+
|
76
|
+
it('The image uploaded in the \'Background image\' section should be displayed', () => {
|
77
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.canvasImageInPreviewTab(), 'visible');
|
78
|
+
});
|
79
|
+
|
80
|
+
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
81
|
+
it('The added dropdowns should be displayed in the preview tab and they should be empty', () => {
|
82
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.dropdownPreviewTab(), 2);
|
83
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyTextInDropdownsInPreviewTab([{ dropdownIndex: 0, dropdownText: '' }, { dropdownIndex: 1, dropdownText: '' }]);
|
84
|
+
});
|
85
|
+
|
86
|
+
it('User should be select an option from the dropdown', () => {
|
87
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
|
88
|
+
});
|
89
|
+
} else if (view === 'Grading view') {
|
90
|
+
it('The dropdowns should be displayed filled with answers', () => {
|
91
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.dropdownPreviewTab(), 2);
|
92
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyTextInDropdownsInPreviewTab([{ dropdownIndex: 0, dropdownText: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownText: correctAnswerArray[1] }]);
|
93
|
+
});
|
94
|
+
|
95
|
+
it('The dropdowns should not be editable', () => {
|
96
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownIsDisabled(0);
|
97
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownIsDisabled(1);
|
98
|
+
});
|
99
|
+
} else {
|
100
|
+
it('The dropdowns should be displayed filled with correct answers', () => {
|
101
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.dropdownPreviewTab(), 2);
|
102
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyTextInDropdownsInPreviewTab([{ dropdownIndex: 0, dropdownText: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownText: correctAnswerArray[1] }]);
|
103
|
+
});
|
104
|
+
}
|
105
|
+
});
|
106
|
+
});
|
107
|
+
});
|
@@ -25,7 +25,7 @@ describe('Create Item page - Fill in the gaps over image with text: Manually and
|
|
25
25
|
|
26
26
|
it('In Preview tab, question instructions, uploaded image and response areas should be displayed in the preview tab', () => {
|
27
27
|
fillInTheGapsOverImageTextPage.steps.verifyQuestionInstructionsTextPreviewTab('fill in the gaps');
|
28
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.
|
28
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.canvasImageInPreviewTab(), 'visible');
|
29
29
|
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.answerInputFieldPreviewTab(), 3);
|
30
30
|
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '' }, { responseIndex: 1, responseText: '' }, { responseIndex: 2, responseText: '' }]);
|
31
31
|
});
|
@@ -17,7 +17,6 @@ describe('Create item page - Fill in the gaps over image with text: Partial equa
|
|
17
17
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
18
18
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
19
19
|
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
|
20
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
21
20
|
fillInTheGapsOverImageTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
22
21
|
fillInTheGapsOverImageTextPage.steps.allotPoints(15);
|
23
22
|
fillInTheGapsOverImageTextPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
@@ -104,7 +103,6 @@ describe('Create item page - Fill in the gaps over image with text: Partial equa
|
|
104
103
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
105
104
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
106
105
|
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
|
107
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
108
106
|
fillInTheGapsOverImageTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
109
107
|
fillInTheGapsOverImageTextPage.steps.allotPoints(15);
|
110
108
|
fillInTheGapsOverImageTextPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
@@ -0,0 +1,408 @@
|
|
1
|
+
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
2
|
+
import utilities from "../../../support/helpers/utilities";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const textContainerPointerStyles = ['None', 'Bottom', 'Bottom right', 'Right', 'Top right', 'Top', 'Top left', 'Left', 'Bottom left'];
|
7
|
+
|
8
|
+
describe('Create item page - Fill in the gaps: Question instructions, Options section', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Question instructions input field - Edit tab', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
});
|
19
|
+
|
20
|
+
fillInTheGapsOverImageTextPage.tests.verifyQuestionInstructionsInputFieldEditTab();
|
21
|
+
});
|
22
|
+
|
23
|
+
describe('Question instructions input field - Edit tab functionality', () => {
|
24
|
+
abortEarlySetup();
|
25
|
+
before(() => {
|
26
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
27
|
+
cy.barsPreLoaderWait();
|
28
|
+
});
|
29
|
+
|
30
|
+
fillInTheGapsOverImageTextPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
|
31
|
+
});
|
32
|
+
|
33
|
+
describe('Background image section - Edit tab', () => {
|
34
|
+
abortEarlySetup();
|
35
|
+
before(() => {
|
36
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
37
|
+
cy.barsPreLoaderWait();
|
38
|
+
});
|
39
|
+
|
40
|
+
fillInTheGapsOverImageTextPage.tests.verifyBackgroundImageSectionContentWithCSSAndA11y();
|
41
|
+
|
42
|
+
fillInTheGapsOverImageTextPage.tests.verifyDeleteImagePopupContentAndFunctionality();
|
43
|
+
});
|
44
|
+
|
45
|
+
describe('Canvas section - Edit tab', () => {
|
46
|
+
abortEarlySetup();
|
47
|
+
before(() => {
|
48
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
49
|
+
cy.barsPreLoaderWait();
|
50
|
+
});
|
51
|
+
|
52
|
+
fillInTheGapsOverImageTextPage.tests.verifyCanvasLabelAndCanvas();
|
53
|
+
|
54
|
+
it('Select text container, Insert text container and Insert text buttons should be displayed.', () => {
|
55
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.selectResponseAreaButton(), 'visible');
|
56
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.insertResponseAreaButton(), 'visible');
|
57
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.insertTextAreaButton(), 'visible');
|
58
|
+
});
|
59
|
+
|
60
|
+
it('When \'Insert text container\' button is selected, then \'Insert text container\' label should be displayed inside canvas', () => {
|
61
|
+
fillInTheGapsOverImageTextPage.steps.verifyCanvasMenuButtonSelected('Insert text container');
|
62
|
+
fillInTheGapsOverImageTextPage.steps.verifyCanvasSelectedMenuText('Insert text container');
|
63
|
+
});
|
64
|
+
|
65
|
+
it('When user hovers over select text container button, then \'Select text container\' tooltip should be displayed', () => {
|
66
|
+
fillInTheGapsOverImageTextPage.steps.verifyTooltipInnerText(fillInTheGapsOverImageTextPage.selectResponseAreaButton, 'Select text container');
|
67
|
+
});
|
68
|
+
|
69
|
+
it('When user hovers over insert text container button, then \'Insert text container\' tooltip should be displayed', () => {
|
70
|
+
fillInTheGapsOverImageTextPage.steps.verifyTooltipInnerText(fillInTheGapsOverImageTextPage.insertResponseAreaButton, 'Insert text container');
|
71
|
+
});
|
72
|
+
|
73
|
+
fillInTheGapsOverImageTextPage.tests.verifyInsertTextTooltip();
|
74
|
+
|
75
|
+
fillInTheGapsOverImageTextPage.tests.verifyUndoRedoClearAllButtons();
|
76
|
+
});
|
77
|
+
|
78
|
+
describe('Canvas : Insert text container, Delete, Undo, Redo - Specify correct answer section', () => {
|
79
|
+
abortEarlySetup();
|
80
|
+
before(() => {
|
81
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
82
|
+
cy.barsPreLoaderWait();
|
83
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
84
|
+
});
|
85
|
+
|
86
|
+
it('When user inserts 2 text container in canvas, then 2 response accordion should be added in specify correct answer section', () => {
|
87
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(60);
|
88
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
89
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(20);
|
90
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAccordion(), 3);
|
91
|
+
});
|
92
|
+
|
93
|
+
it('When user deletes a text container in canvas, then response accordion should be removed from specify correct answer section and remaining response accordion should be numbered appropriately', () => {
|
94
|
+
fillInTheGapsOverImageTextPage.steps.removeResponseArea(1);
|
95
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAccordion(), 2);
|
96
|
+
for (let i = 0; i < 2; i++) {
|
97
|
+
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionLabel(), i), `Response ${i + 1}`);
|
98
|
+
}
|
99
|
+
});
|
100
|
+
|
101
|
+
it('When user clicks on undo button in canvas section, then previous action should reversed and previously deleted response accordion should be added in specify correct answer section', () => {
|
102
|
+
fillInTheGapsOverImageTextPage.steps.undoAction();
|
103
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAccordion(), 3);
|
104
|
+
});
|
105
|
+
|
106
|
+
it('When the user clicks on the redo button after performing an undo action in canvas section, then the previously added response accordion should be deleted again in specify correct answer section', () => {
|
107
|
+
fillInTheGapsOverImageTextPage.steps.redoAction();
|
108
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAccordion(), 2);
|
109
|
+
});
|
110
|
+
|
111
|
+
it('When the user reaches the initial state by performing undo actions in canvas section, then specify correct answer section should not have response accordion', () => {
|
112
|
+
for (var i = 0; i < 4; i++) {
|
113
|
+
fillInTheGapsOverImageTextPage.steps.undoAction();
|
114
|
+
};
|
115
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordion(), 'notExist');
|
116
|
+
});
|
117
|
+
|
118
|
+
it('When the user reaches the latest state by performing redo actions in canvas section, then 3 response accordions should be visible in specify correct answer section', () => {
|
119
|
+
for (var i = 0; i < 4; i++) {
|
120
|
+
fillInTheGapsOverImageTextPage.steps.redoAction();
|
121
|
+
};
|
122
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAccordion(), 2);
|
123
|
+
});
|
124
|
+
|
125
|
+
it('When user clicks on clear all in canvas, then response accordions in specified correct answer should disappear', () => {
|
126
|
+
fillInTheGapsOverImageTextPage.steps.clearAll();
|
127
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordion(), 'notExist');
|
128
|
+
});
|
129
|
+
});
|
130
|
+
|
131
|
+
describe('Canvas : Select text container - Edit tab canvas section functionality', () => {
|
132
|
+
abortEarlySetup();
|
133
|
+
before(() => {
|
134
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
135
|
+
cy.barsPreLoaderWait();
|
136
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
137
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
138
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(20);
|
139
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
140
|
+
});
|
141
|
+
|
142
|
+
it('When user clicks on \'Select text container\' button is selected, then \'Select\' label should be displayed inside canvas', () => {
|
143
|
+
fillInTheGapsOverImageTextPage.steps.selectCanvasMenuButton('Select text container');
|
144
|
+
fillInTheGapsOverImageTextPage.steps.verifyCanvasSelectedMenuText('Select');
|
145
|
+
});
|
146
|
+
|
147
|
+
it(`When user selects text container, then 9 options ${textContainerPointerStyles} should be displayed and by default ${textContainerPointerStyles[7]} should be selected`, () => {
|
148
|
+
fillInTheGapsOverImageTextPage.steps.selectResponseArea(1);
|
149
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAreaStyle(), 9);
|
150
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAreaPointerStyle(textContainerPointerStyles[7], 1);
|
151
|
+
});
|
152
|
+
|
153
|
+
it('CSS of text container', { tags: 'css' }, () => {
|
154
|
+
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseArea(), 1), {
|
155
|
+
'border': `1px solid ${css.color.activeComponentBorder}`
|
156
|
+
});
|
157
|
+
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseArea(), 0), {
|
158
|
+
'border': `1px dashed ${css.color.activeComponentBorder}`
|
159
|
+
});
|
160
|
+
});
|
161
|
+
|
162
|
+
it(`When user hovers over the pointer styles, then ${textContainerPointerStyles} tooltip should be displayed`, () => {
|
163
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointerStyleTooltip();
|
164
|
+
});
|
165
|
+
|
166
|
+
it(`When the user has selected a text container and chooses ${textContainerPointerStyles[0]}, then selected text container should have the specified effect applied, and the other text containers should remain unaffected.`, () => {
|
167
|
+
fillInTheGapsOverImageTextPage.steps.selectResponseAreaPointerStyle(textContainerPointerStyles[0]);
|
168
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAreaPointerStyle(textContainerPointerStyles[0], 1);
|
169
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAreaPointerStyle(textContainerPointerStyles[7], 0);
|
170
|
+
});
|
171
|
+
|
172
|
+
it(`When the user chooses ${textContainerPointerStyles[5]}, then selected text containers should have the specified effect applied, and the other drop zones should remain unaffected.`, () => {
|
173
|
+
fillInTheGapsOverImageTextPage.steps.selectResponseAreaPointerStyle(textContainerPointerStyles[5]);
|
174
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAreaPointerStyle(textContainerPointerStyles[5], 1);
|
175
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAreaPointerStyle(textContainerPointerStyles[7], 0);
|
176
|
+
});
|
177
|
+
});
|
178
|
+
|
179
|
+
describe('Canvas : Insert and delete text container - Edit tab canvas section functionality', () => {
|
180
|
+
abortEarlySetup();
|
181
|
+
before(() => {
|
182
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
183
|
+
cy.barsPreLoaderWait();
|
184
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
185
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
186
|
+
});
|
187
|
+
|
188
|
+
fillInTheGapsOverImageTextPage.tests.verifyCanvasResponseAreaContents();
|
189
|
+
|
190
|
+
fillInTheGapsOverImageTextPage.tests.verifyInsertAndDeleteResponseAreaFunctionality('text container');
|
191
|
+
});
|
192
|
+
|
193
|
+
describe('Canvas : Undo, Redo, Clear all - Edit tab canvas section functionality', () => {
|
194
|
+
abortEarlySetup();
|
195
|
+
before(() => {
|
196
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
197
|
+
cy.barsPreLoaderWait();
|
198
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
199
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
200
|
+
});
|
201
|
+
|
202
|
+
fillInTheGapsOverImageTextPage.tests.verifyUndoRedoClearAllButtonFunctionality('text container');
|
203
|
+
});
|
204
|
+
|
205
|
+
describe('Canvas : Insert text - Edit tab canvas section functionality', () => {
|
206
|
+
abortEarlySetup();
|
207
|
+
before(() => {
|
208
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
209
|
+
cy.barsPreLoaderWait();
|
210
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
211
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
212
|
+
});
|
213
|
+
|
214
|
+
fillInTheGapsOverImageTextPage.tests.verifyInsertTextAndTextColorButton();
|
215
|
+
|
216
|
+
fillInTheGapsOverImageTextPage.tests.verifyTextColorPopupFunctionality();
|
217
|
+
|
218
|
+
it('When the user clicks on the \'Edit color\' present in an \'Text color\' popup, then a select color popup should be displayed', () => {
|
219
|
+
fillInTheGapsOverImageTextPage.steps.clickOnEditColorButton();
|
220
|
+
fillInTheGapsOverImageTextPage.steps.verifyColorPopupIsDisplayed();
|
221
|
+
});
|
222
|
+
|
223
|
+
fillInTheGapsOverImageTextPage.tests. verifyColorPopupSelectColorTitle();
|
224
|
+
|
225
|
+
fillInTheGapsOverImageTextPage.tests.verifySaturationAndOpacityGradientPalette('rgb(0, 0, 46)');
|
226
|
+
|
227
|
+
fillInTheGapsOverImageTextPage.tests.verifyColorHuePaletteAndHexInputField('rgb(0, 0, 255)', '#00002E');
|
228
|
+
|
229
|
+
fillInTheGapsOverImageTextPage.tests.verifyColorPopupFunctionality();
|
230
|
+
|
231
|
+
it('When the user has modified the selected color in the color popup and clicks on \'Ok\' button, then the popup should close, the color block should change to the new selected color and the modifications in the color popup should persist', () => {
|
232
|
+
fillInTheGapsOverImageTextPage.steps.clickOnOkButton();
|
233
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.dialogBox(), 'notExist');
|
234
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextColorOfTextBox('rgba(255, 0, 0, 0.5)');
|
235
|
+
});
|
236
|
+
|
237
|
+
it('When the user modifies the selected color in the color popup and clicks on \'Cancel\' button, then the popup should close, the color block should not change and the modifications in the color popup should not persist', () => {
|
238
|
+
fillInTheGapsOverImageTextPage.steps.clickOnTextColorButton();
|
239
|
+
fillInTheGapsOverImageTextPage.steps.clickOnEditColorButton()
|
240
|
+
fillInTheGapsOverImageTextPage.steps.addInputToHexInputField('#00002E');
|
241
|
+
fillInTheGapsOverImageTextPage.steps.clickOnCancelButton();
|
242
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.dialogBox(), 'notExist');
|
243
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextColorOfTextBox('rgba(255, 0, 0, 0.5)');
|
244
|
+
});
|
245
|
+
});
|
246
|
+
|
247
|
+
describe('Canvas : Select text container, Insert text container, Insert text, Undo, Redo and Clear all - Preview tab functionality', () => {
|
248
|
+
abortEarlySetup();
|
249
|
+
before(() => {
|
250
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
251
|
+
cy.barsPreLoaderWait();
|
252
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
253
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
254
|
+
});
|
255
|
+
|
256
|
+
it('When user insert text container in edit tab, then text container should be visible in preview tab', () => {
|
257
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(20);
|
258
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(90);
|
259
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
260
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.answerInputFieldPreviewTab(), 'visible');
|
261
|
+
});
|
262
|
+
|
263
|
+
it('When user selects a text container and changes text container pointer style in edit tab, then changes in text container pointer should be reflected in preview tab', () => {
|
264
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
265
|
+
fillInTheGapsOverImageTextPage.steps.selectResponseArea(0);
|
266
|
+
fillInTheGapsOverImageTextPage.steps.selectResponseAreaPointerStyle(textContainerPointerStyles[1]);
|
267
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
268
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextContainerPointerStyleInPreviewTab(textContainerPointerStyles[1], 0);
|
269
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextContainerPointerStyleInPreviewTab(textContainerPointerStyles[8], 1);
|
270
|
+
});
|
271
|
+
|
272
|
+
it('When user insert text and changes color for text in edit tab, then inserted text should be displayed in canvas in preview tab', () => {
|
273
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
274
|
+
fillInTheGapsOverImageTextPage.steps.insertTextArea(60, 'Inserted text');
|
275
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
276
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextBoxExistInPreviewTab();
|
277
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextColorOfTextBoxInPreviewTab('rgb(0, 0, 46)');
|
278
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextOfTextBoxInPreviewTab('Inserted text');
|
279
|
+
});
|
280
|
+
|
281
|
+
it('When the user clicks on the undo button in edit tab, then previous action should be reversed and same should reflect in preview tab', () => {
|
282
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
283
|
+
fillInTheGapsOverImageTextPage.steps.undoAction();
|
284
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
285
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextOfTextBoxInPreviewTab('');
|
286
|
+
});
|
287
|
+
|
288
|
+
it('When the user clicks on the redo button in edit tab, then previous action should be reinstated and same should reflect in preview tab', () => {
|
289
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
290
|
+
fillInTheGapsOverImageTextPage.steps.redoAction();
|
291
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
292
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextBoxExistInPreviewTab();
|
293
|
+
});
|
294
|
+
|
295
|
+
it('When user clicks on \'Clear all\' button, then all text containers should be deleted in preview tab', () => {
|
296
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
297
|
+
fillInTheGapsOverImageTextPage.steps.clearAll();
|
298
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
299
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextBoxNotExistInPreviewTab();
|
300
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextContainerNotExistInPreviewTab();
|
301
|
+
});
|
302
|
+
});
|
303
|
+
|
304
|
+
describe('Image properties section - Edit tab', () => {
|
305
|
+
abortEarlySetup();
|
306
|
+
before(() => {
|
307
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
308
|
+
cy.barsPreLoaderWait();
|
309
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
310
|
+
fillInTheGapsOverImageTextPage.steps.verifyFileNameLabel('highlightImage.jpg');
|
311
|
+
});
|
312
|
+
|
313
|
+
fillInTheGapsOverImageTextPage.tests.verifyImagePropertiesSectionContent();
|
314
|
+
});
|
315
|
+
|
316
|
+
describe('Image properties section - Edit tab canvas section functionality', () => {
|
317
|
+
abortEarlySetup();
|
318
|
+
before(() => {
|
319
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
320
|
+
cy.barsPreLoaderWait();
|
321
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
322
|
+
fillInTheGapsOverImageTextPage.steps.verifyFileNameLabel('highlightImage.jpg');
|
323
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
324
|
+
});
|
325
|
+
|
326
|
+
fillInTheGapsOverImageTextPage.tests.verifyImageAlignmentEditTabFunctionality();
|
327
|
+
|
328
|
+
fillInTheGapsOverImageTextPage.tests.verifyImageOpacityEditTabFunctionality();
|
329
|
+
|
330
|
+
//failed dur to https://redmine.zeuslearning.com/issues/560585
|
331
|
+
fillInTheGapsOverImageTextPage.tests.verifyFillImageToCanvasEditTabFunctionality();
|
332
|
+
});
|
333
|
+
|
334
|
+
describe('Canvas width, Canvas height, Image alternative text - Edit tab canvas section functionality', () => {
|
335
|
+
abortEarlySetup();
|
336
|
+
before(() => {
|
337
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
338
|
+
cy.barsPreLoaderWait();
|
339
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
340
|
+
fillInTheGapsOverImageTextPage.steps.verifyFileNameLabel('highlightImage.jpg');
|
341
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
342
|
+
});
|
343
|
+
|
344
|
+
fillInTheGapsOverImageTextPage.tests.verifyAspectRatioAndResetDimensionsButtonFunctionality();
|
345
|
+
|
346
|
+
fillInTheGapsOverImageTextPage.tests.verifyImageAlternativeTextEditTabFunctionality();
|
347
|
+
});
|
348
|
+
|
349
|
+
describe('Image properties, Image alignment, Opacity section - Preview tab functionality', () => {
|
350
|
+
abortEarlySetup();
|
351
|
+
before(() => {
|
352
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
353
|
+
cy.barsPreLoaderWait();
|
354
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
355
|
+
fillInTheGapsOverImageTextPage.steps.verifyFileNameLabel('highlightImage.jpg');
|
356
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
357
|
+
});
|
358
|
+
|
359
|
+
fillInTheGapsOverImageTextPage.tests.verifyImageAlignmentPreviewTabFunctionality();
|
360
|
+
|
361
|
+
fillInTheGapsOverImageTextPage.tests.verifyImageOpacityPreviewTabFunctionality();
|
362
|
+
|
363
|
+
//failed due to https://redmine.zeuslearning.com/issues/560585
|
364
|
+
fillInTheGapsOverImageTextPage.tests.verifyFillImageToCanvasPreviewTabFunctionality();
|
365
|
+
});
|
366
|
+
|
367
|
+
describe('Canvas width, Canvas height, Image alternative text - Preview tab functionality', () => {
|
368
|
+
abortEarlySetup();
|
369
|
+
before(() => {
|
370
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
371
|
+
cy.barsPreLoaderWait();
|
372
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
373
|
+
fillInTheGapsOverImageTextPage.steps.verifyFileNameLabel('highlightImage.jpg');
|
374
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.uploadImageProgressBar(), 'visible');
|
375
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
376
|
+
});
|
377
|
+
|
378
|
+
it('When the user has uploaded canvas image, then switching to the preview tab should display canvas image with same dimensions', () => {
|
379
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
380
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploadedInPreviewTab();
|
381
|
+
utilities.verifyElementVisibilityState( fillInTheGapsOverImageTextPage.canvasImageInPreviewTab(), 'visible');
|
382
|
+
fillInTheGapsOverImageTextPage.steps.verifyCanvasWidthInPreviewTab(768);
|
383
|
+
fillInTheGapsOverImageTextPage.steps.verifyCanvasHeightInPreviewTab(432);
|
384
|
+
});
|
385
|
+
|
386
|
+
it('When user updates width and height in edit tab, then updated changes should be reflected in preview tab', () => {
|
387
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
388
|
+
fillInTheGapsOverImageTextPage.steps.unlockAspectRatio();
|
389
|
+
fillInTheGapsOverImageTextPage.steps.updateCanvasWidth(800);
|
390
|
+
fillInTheGapsOverImageTextPage.steps.updateCanvasHeight(450);
|
391
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
392
|
+
fillInTheGapsOverImageTextPage.steps.verifyCanvasWidthInPreviewTab(800);
|
393
|
+
fillInTheGapsOverImageTextPage.steps.verifyCanvasHeightInPreviewTab(450);
|
394
|
+
});
|
395
|
+
|
396
|
+
it('When user resets image dimensions in edit tab, then updated changes should be reflected in preview tab', () => {
|
397
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
398
|
+
fillInTheGapsOverImageTextPage.steps.resetDimensions();
|
399
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
400
|
+
fillInTheGapsOverImageTextPage.steps.verifyCanvasWidthInPreviewTab(768);
|
401
|
+
fillInTheGapsOverImageTextPage.steps.verifyCanvasHeightInPreviewTab(432);
|
402
|
+
});
|
403
|
+
|
404
|
+
fillInTheGapsOverImageTextPage.tests.verifyImageAlternativeTextPreviewTabFunctionality();
|
405
|
+
|
406
|
+
fillInTheGapsOverImageTextPage.tests.verifyImageNotExistPreviewTab();
|
407
|
+
});
|
408
|
+
});
|
@@ -88,7 +88,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
|
|
88
88
|
fillInTheGapsOverImageTextPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
89
89
|
|
90
90
|
it('When no points are entered in the points input field, then points per response should not be displayed on the response accordion', () => {
|
91
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionPointsWrapper(), '
|
91
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionPointsWrapper(), 'hidden');
|
92
92
|
});
|
93
93
|
|
94
94
|
it('When the user gives a score input to \'Points\' input field, then the score should be equally divided and displayed on each response tab with a \'Points:\' label', () => {
|
@@ -105,7 +105,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
|
|
105
105
|
});
|
106
106
|
|
107
107
|
it('When the user deletes a response token, then points per response should get updated accordingly', () => {
|
108
|
-
fillInTheGapsOverImageTextPage.steps.
|
108
|
+
fillInTheGapsOverImageTextPage.steps.removeResponseArea(0);
|
109
109
|
fillInTheGapsOverImageTextPage.steps.verifyPointsDisplayedOnResponseAccordion(0, 2);
|
110
110
|
fillInTheGapsOverImageTextPage.steps.verifyPointsDisplayedOnResponseAccordion(1, 2);
|
111
111
|
});
|
@@ -68,7 +68,7 @@ describe('Create item page - Fill in the gaps over image - text - Preview conten
|
|
68
68
|
});
|
69
69
|
|
70
70
|
it('The image uploaded in the \'Background image\' section should be displayed', () => {
|
71
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.
|
71
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.canvasImageInPreviewTab(), 'visible');
|
72
72
|
});
|
73
73
|
|
74
74
|
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js
CHANGED
@@ -50,7 +50,7 @@ describe('Create Item page - Fill in the gaps over image - text: ', () => {
|
|
50
50
|
|
51
51
|
it('When the user clicks on the \'Add Alternate\' button, then one alternate answer input field should be displayed', () => {
|
52
52
|
fillInTheGapsOverImageTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
53
|
-
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.
|
53
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), 2);
|
54
54
|
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionAddAlternateButton(), 'visible');
|
55
55
|
});
|
56
56
|
|
@@ -77,7 +77,7 @@ describe('Create Item page - Fill in the gaps over image - text: ', () => {
|
|
77
77
|
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 1, responseText: 'Leaf' }]);
|
78
78
|
fillInTheGapsOverImageTextPage.steps.verifyErrorMessageIsNotDisplayed();
|
79
79
|
fillInTheGapsOverImageTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
80
|
-
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.
|
80
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), 3);
|
81
81
|
});
|
82
82
|
|
83
83
|
it('CSS of answer input field', { tags: 'css' }, () => {
|
@@ -56,6 +56,7 @@ describe('Create item page - Multiple selection: Header section and Saving quest
|
|
56
56
|
multipleSelectionPage.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.');
|
57
57
|
multipleSelectionPage.steps.addInputToOptionsInputField(options)
|
58
58
|
multipleSelectionPage.steps.allotPoints(10);
|
59
|
+
multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(0);
|
59
60
|
multipleSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
|
60
61
|
multipleSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
|
61
62
|
});
|
@@ -14,7 +14,6 @@ describe('Create Item page - Multiple selection: Student view settings', () => {
|
|
14
14
|
describe('Randomize options and lock option position : Edit tab', () => {
|
15
15
|
abortEarlySetup();
|
16
16
|
before(() => {
|
17
|
-
cy.log('Navigating to List sorting question type');
|
18
17
|
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
19
18
|
cy.log('Adding question instructions, setting correct answer order and adding points');
|
20
19
|
cy.barsPreLoaderWait();
|
@@ -150,7 +149,6 @@ describe('Create Item page - Multiple selection: Student view settings', () => {
|
|
150
149
|
describe('Allow students to check answer: Edit tab', () => {
|
151
150
|
abortEarlySetup();
|
152
151
|
before(() => {
|
153
|
-
cy.log('Navigating to List sorting question type');
|
154
152
|
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
155
153
|
cy.log('Adding question instructions, setting correct answer order and adding points');
|
156
154
|
cy.barsPreLoaderWait();
|
@@ -231,7 +229,6 @@ describe('Create Item page - Multiple selection: Student view settings', () => {
|
|
231
229
|
describe('Allow students to check answer: Preview tab', () => {
|
232
230
|
abortEarlySetup();
|
233
231
|
before(() => {
|
234
|
-
cy.log('Navigating to List sorting question type');
|
235
232
|
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
236
233
|
cy.log('Adding question instructions, setting correct answer order and adding points');
|
237
234
|
cy.barsPreLoaderWait();
|
@@ -306,7 +303,6 @@ describe('Create Item page - Multiple selection: Student view settings', () => {
|
|
306
303
|
describe('Set minimum/maximum number of answers: Edit tab', () => {
|
307
304
|
abortEarlySetup();
|
308
305
|
before(() => {
|
309
|
-
cy.log('Navigating to List sorting question type');
|
310
306
|
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
311
307
|
cy.log('Adding question instructions, setting correct answer order and adding points');
|
312
308
|
cy.barsPreLoaderWait();
|
@@ -395,7 +391,6 @@ describe('Create Item page - Multiple selection: Student view settings', () => {
|
|
395
391
|
describe('Set minimum/maximum number of answers: Edit tab functionality', () => {
|
396
392
|
abortEarlySetup();
|
397
393
|
before(() => {
|
398
|
-
cy.log('Navigating to List sorting question type');
|
399
394
|
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
400
395
|
cy.log('Adding question instructions, setting correct answer order and adding points');
|
401
396
|
cy.barsPreLoaderWait();
|
@@ -470,7 +465,6 @@ describe('Create Item page - Multiple selection: Student view settings', () => {
|
|
470
465
|
describe('Set minimum/maximum number of answers: Preview tab', () => {
|
471
466
|
abortEarlySetup();
|
472
467
|
before(() => {
|
473
|
-
cy.log('Navigating to List sorting question type');
|
474
468
|
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
475
469
|
cy.log('Adding question instructions, setting correct answer order and adding points');
|
476
470
|
cy.barsPreLoaderWait();
|