itemengine-cypress-automation 1.0.72 → 1.0.73
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponse/{audioResponseMinimalPreviewSection.js → audioResponseMinimalPreviewSection.smoke.js} +263 -254
- package/cypress/e2e/ILC/AudioResponse/{audioResponseStandardPreviewSection.js → audioResponseStandardPreviewSection.smoke.js} +100 -97
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/groupedOptionsAllOrNothing.smoke.js +121 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{groupedOptionsPartialScoreForEachCell.js → groupedOptionsPartialScoreForEachCell.smoke.js} +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{groupedOptionsPartialScoreForEachResponse.js → groupedOptionsPartialScoreForEachResponse.smoke.js} +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/standardAllOrNothing.smoke.js +164 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{standardTotalScoreDividedBetweenResponse.js → standardTotalScoreDividedBetweenResponse.smoke.js} +21 -18
- package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +753 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.smoke.js +943 -0
- package/cypress/e2e/ILC/EssayResponse/{essayResponseCustomizeFormattingOptions1.js → essayResponseCustomizeFormattingOptions1.smoke.js} +113 -110
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +581 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseGradingViewAndCorrectAnswerViewContents.smoke.js +111 -0
- package/cypress/e2e/ILC/EssayResponse/{essayResponsePreviewContentsForAllViews.js → essayResponsePreviewContentsForAllViews.smoke.js} +6 -3
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedEditTab.smoke.js +81 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/{fillInTheGapsDragAndDropGroupedOptionsAllOrNothingScoring.js → fillInTheGapsDragAndDropGroupedOptionsAllOrNothingScoring.smoke.js} +25 -22
- package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownAllOrNothingScoring.js → fillInTheGapsDropdownAllOrNothingScoring.smoke.js} +16 -14
- package/cypress/e2e/ILC/{fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.js → FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.smoke.js} +80 -74
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.smoke.js +361 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.smoke.js +137 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.smoke.js +171 -0
- package/cypress/e2e/ILC/{fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.js → FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.smoke.js} +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextAllOrNothingScoring.js → fillInTheGapsOverImageTextAllOrNothingScoring.smoke.js} +32 -29
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextCheckAnswerForAllViews.js → fillInTheGapsOverImageTextCheckAnswerForAllViews.smoke.js} +5 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.smoke.js +137 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.smoke.js +146 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextPreviewContentsForAllViews.js → fillInTheGapsOverImageTextPreviewContentsForAllViews.smoke.js} +5 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextPreviewTab.js → fillInTheGapsOverImageTextPreviewTab.smoke.js} +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextShowCorrectAnswerForAllView.js → fillInTheGapsOverImageTextShowCorrectAnswerForAllView.smoke.js} +6 -4
- package/cypress/e2e/ILC/FillInTheGapsText/{fillInTheGapsTextAutoScoredScoring.js → fillInTheGapsTextAutoScoredScoring.smoke.js} +12 -9
- package/cypress/e2e/ILC/Highlight/HighlightScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +36 -34
- package/cypress/e2e/ILC/Highlight/HighlightScoring/highlightBasicScoringForTextSelectionTypes.smoke.js +462 -0
- package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.smoke.js +148 -0
- package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.smoke.js +185 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.smoke.js +138 -0
- package/cypress/e2e/ILC/HighlightImage/{highlightImagePreviewTab.js → highlightImagePreviewTab.smoke.js} +1 -1
- package/cypress/e2e/ILC/HighlightImage/{highlightImageToolsFunctionalityPreviewTab.js → highlightImageToolsFunctionalityPreviewTab.smoke.js} +4 -4
- package/cypress/e2e/ILC/ListMatching/ListMatchingScoring/groupedOptionsAllOrNothingScoring.smoke.js +122 -0
- package/cypress/e2e/ILC/ListMatching/{listMatchingAlternateAnswer.js → listMatchingAlternateAnswer.smoke.js} +47 -43
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.smoke.js +211 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.smoke.js +254 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.smoke.js +191 -0
- package/cypress/e2e/ILC/ListOrdering/ListOrderingScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +34 -32
- package/cypress/e2e/ILC/ListSorting/ListSortingScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +41 -38
- package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.smoke.js +269 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/{multipleSelectionGridAutoScoredScoring.js → multipleSelectionGridAutoScoredScoring.smoke.js} +36 -34
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAutoScoredScoring.smoke.js +407 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/{singleSelectionGridAutoScoredScoring.js → singleSelectionGridAutoScoredScoring.smoke.js} +32 -29
- package/cypress/e2e/ILC/UploadResponse/{uploadResponsePreview.js → uploadResponsePreview.smoke.js} +64 -59
- package/cypress/e2e/ILC/VideoResponse/{videoResponsePreviewTab.js → videoResponsePreviewTab.smoke.js} +290 -281
- package/cypress/pages/components/additionalSettingsPanel.js +0 -27
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +321 -0
- package/cypress/pages/components/createQuestionBasePage.js +1 -7
- package/cypress/pages/components/essayResponseCommonComponents.js +0 -6
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +0 -13
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +0 -10
- package/cypress/pages/components/scoringSectionBase.js +3 -2
- package/cypress/pages/createItemPage.js +3 -79
- package/cypress/pages/dialogBoxBase.js +8 -23
- package/cypress/pages/index.js +1 -4
- package/cypress/pages/itemPreviewSettingsPage.js +446 -0
- package/cypress/pages/multipleSelectionPage.js +113 -64
- package/cypress/pages/selectQuestionResourceToolPage.js +0 -5
- package/cypress/pages/shortTextResponsePage.js +0 -6
- package/cypress/pages/singleSelectionPage.js +0 -1
- package/package.json +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/groupedOptionsAllOrNothing.js +0 -116
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/standardAllOrNothing.js +0 -160
- package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.js +0 -932
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.js +0 -572
- package/cypress/e2e/ILC/EssayResponse/essayResponseGradingViewAndCorrectAnswerViewContents.js +0 -106
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedEditTab.js +0 -76
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.js +0 -134
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.js +0 -133
- package/cypress/e2e/ILC/Highlight/HighlightScoring/highlightBasicScoringForTextSelectionTypes.js +0 -457
- package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.js +0 -143
- package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.js +0 -178
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.js +0 -125
- package/cypress/e2e/ILC/ListMatching/ListMatchingScoring/groupedOptionsAllOrNothingScoring.js +0 -117
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.js +0 -207
- package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.js +0 -246
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.js +0 -185
- package/cypress/e2e/ILC/ListSorting/listSortingAdditionalSettings.js +0 -820
- package/cypress/e2e/ILC/ListSorting/listSortingAutoScoredScoring.js +0 -936
- package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.js +0 -263
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAutoScoredScoring.js +0 -402
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.js +0 -356
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.js +0 -134
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.js +0 -156
package/cypress/e2e/ILC/EssayResponse/essayResponseGradingViewAndCorrectAnswerViewContents.smoke.js
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
import { correctAnswerViewPage, essayResponsePage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import { gradingViewPage } from "../../../pages";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
const views = Cypress.env('views');
|
7
|
+
var itemReferenceID = "";
|
8
|
+
|
9
|
+
describe('Create item page - Essay response: Grading view, Correct answer view contents', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
if (views.includes('Grading view')) {
|
15
|
+
describe('Grading view contents', { tags: 'smoke' }, () => {
|
16
|
+
abortEarlySetup();
|
17
|
+
before(() => {
|
18
|
+
cy.log('Navigating to Essay response question type');
|
19
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
20
|
+
cy.barsPreLoaderWait();
|
21
|
+
essayResponsePage.steps.addQuestionInstructions();
|
22
|
+
essayResponsePage.steps.allotPoints(10);
|
23
|
+
essayResponsePage.steps.clickOnSaveQuestionButton();
|
24
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
25
|
+
//Global variable issue, not working inside before
|
26
|
+
itemPreviewPage.referenceID()
|
27
|
+
.invoke('text')
|
28
|
+
.then(($refID) => {
|
29
|
+
itemReferenceID = $refID;
|
30
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
31
|
+
utilities.verifyElementVisibilityState(essayResponsePage.previewTabToolbarOption(), 'visible');
|
32
|
+
essayResponsePage.steps.selectPreviewTabToolbarOption('Bold (Ctrl+B)');
|
33
|
+
essayResponsePage.steps.selectPreviewTabToolbarOption('Italic (Ctrl+I)');
|
34
|
+
essayResponsePage.steps.selectPreviewTabToolbarOption('Underline (Ctrl+U)');
|
35
|
+
essayResponsePage.steps.enterInputInResponseField('This is a test for grading view preview contents');
|
36
|
+
studentViewPage.steps.submitResponse();
|
37
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
38
|
+
});
|
39
|
+
});
|
40
|
+
|
41
|
+
it('Question instructions should be visible', () => {
|
42
|
+
utilities.verifyInnerText(essayResponsePage.questionInstructionsText(), 'Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
43
|
+
utilities.verifyElementVisibilityState(essayResponsePage.questionInstructionsText(), 'visible');
|
44
|
+
});
|
45
|
+
|
46
|
+
it('The response submitted by the student should be visible in the response field of the grading view. The formatting toolbar options should not be visible in grading view', () => {
|
47
|
+
essayResponsePage.responseField()
|
48
|
+
.verifyInnerHTML('<p><u><em><strong>This is a test for grading view preview contents</strong></em></u></p>');
|
49
|
+
utilities.verifyElementVisibilityState(essayResponsePage.previewTabToolbarWrapper(), 'hidden');
|
50
|
+
});
|
51
|
+
|
52
|
+
it('The content in the response field should not be editable', () => {
|
53
|
+
essayResponsePage.steps.verifyGradingViewResponseFieldIsNonEditable();
|
54
|
+
});
|
55
|
+
|
56
|
+
it('Empty score input field and total score should be displayed', () => {
|
57
|
+
gradingViewPage.steps.verifyGradingViewScore('', 10);
|
58
|
+
});
|
59
|
+
|
60
|
+
it('CSS of content in the response field', { tags: 'css' }, () => {
|
61
|
+
utilities.verifyCSS(essayResponsePage.responseField(), {
|
62
|
+
'color': css.color.text,
|
63
|
+
'font-size': css.fontSize.default,
|
64
|
+
'font-weight': css.fontWeight.normal
|
65
|
+
});
|
66
|
+
});
|
67
|
+
|
68
|
+
it('Accessibility of content in the response field', { tags: 'a11y' }, () => {
|
69
|
+
cy.checkAccessibility(essayResponsePage.responseField());
|
70
|
+
});
|
71
|
+
});
|
72
|
+
}
|
73
|
+
|
74
|
+
if (views.includes('Correct answer view')) {
|
75
|
+
describe('Correct answer view contents', { tags: 'smoke' }, () => {
|
76
|
+
abortEarlySetup();
|
77
|
+
before(() => {
|
78
|
+
cy.log('Navigating to Essay response question type');
|
79
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response - rich text');
|
80
|
+
cy.barsPreLoaderWait();
|
81
|
+
essayResponsePage.steps.addQuestionInstructions();
|
82
|
+
essayResponsePage.steps.allotPoints(10);
|
83
|
+
essayResponsePage.steps.clickOnSaveQuestionButton();
|
84
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
85
|
+
//Global variable issue, not working inside before
|
86
|
+
itemPreviewPage.referenceID()
|
87
|
+
.invoke('text')
|
88
|
+
.then(($refID) => {
|
89
|
+
itemReferenceID = $refID
|
90
|
+
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
91
|
+
});
|
92
|
+
});
|
93
|
+
|
94
|
+
it('Question instructions should be visible', () => {
|
95
|
+
utilities.verifyTextContent(correctAnswerViewPage.correctAnswerViewQuestionInstructions(), 'Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
96
|
+
utilities.verifyElementVisibilityState(correctAnswerViewPage.correctAnswerViewQuestionInstructions(), 'visible');
|
97
|
+
});
|
98
|
+
|
99
|
+
it('\'This is a manual scored question\' help text should be displayed in the correct answer view', () => {
|
100
|
+
utilities.verifyTextContent(correctAnswerViewPage.manualScoredQuestionHelpText(), 'This is a manual scored question.');
|
101
|
+
utilities.verifyElementVisibilityState(correctAnswerViewPage.manualScoredQuestionHelpText(), 'visible');
|
102
|
+
});
|
103
|
+
|
104
|
+
it('The points alloted to the question should be displayed', () => {
|
105
|
+
correctAnswerViewPage.steps.verifyAvailablePoints(10);
|
106
|
+
});
|
107
|
+
|
108
|
+
//Need to add CSS and A11y here once updated designs are available for correct answer
|
109
|
+
});
|
110
|
+
}
|
111
|
+
});
|
@@ -2,16 +2,19 @@ import { essayResponsePage, 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
|
-
const views =
|
5
|
+
const views = Cypress.env('views');
|
6
|
+
let previewContentViews = ['Question preview', 'Item preview', 'Student view'];
|
7
|
+
previewContentViews = previewContentViews.filter(view => views.includes(view));
|
6
8
|
var itemReferenceID = "";
|
7
9
|
|
10
|
+
//Failing due to https://redmine.zeuslearning.com/issues/553382
|
8
11
|
describe('Create item page - Essay response: Preview contents', () => {
|
9
12
|
before(() => {
|
10
13
|
cy.loginAs('admin');
|
11
14
|
});
|
12
15
|
|
13
|
-
|
14
|
-
describe(`Preview tab contents - ${view}`, () => {
|
16
|
+
previewContentViews.forEach((view) => {
|
17
|
+
describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
|
15
18
|
abortEarlySetup();
|
16
19
|
before(() => {
|
17
20
|
switch (view) {
|
package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedEditTab.smoke.js
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
import { fillInTheGapsDragAndDropPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
const css = Cypress.env('css');
|
4
|
+
const responseForGroup2 = ['Response 3', 'Response 4'];
|
5
|
+
const grepTags = Cypress.env('grepTags');
|
6
|
+
|
7
|
+
describe('Create Item Page: Fill in the gaps - drag and drop: Grouped response layout - Edit tab', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
13
|
+
describe('\'Grouped\' response options layout - Edit tab section contents', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
cy.log('Navigate to fill in the gaps - drag and drop question type');
|
17
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
18
|
+
cy.barsPreLoaderWait();
|
19
|
+
});
|
20
|
+
|
21
|
+
fillInTheGapsDragAndDropPage.tests.verifyGroupedOptionsContentAndFunctionality();
|
22
|
+
});
|
23
|
+
}
|
24
|
+
|
25
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
26
|
+
describe('\'Grouped\' response options layout - Set correct answer section contents', () => {
|
27
|
+
abortEarlySetup();
|
28
|
+
before(() => {
|
29
|
+
cy.log('Navigate to fill in the gaps - drag and drop question type');
|
30
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
31
|
+
cy.barsPreLoaderWait();
|
32
|
+
fillInTheGapsDragAndDropPage.steps.selectResponseOptionsLayout('Grouped');
|
33
|
+
});
|
34
|
+
|
35
|
+
fillInTheGapsDragAndDropPage.tests.verifyGroupedResponseDraggableOptionsInSetCorrectAnswerSection();
|
36
|
+
|
37
|
+
it('When the user deletes a group, then the deleted group should get removed from the response options container as well as from the response areas (if any) of the \'Set Correct Answer\' section', () => {
|
38
|
+
cy.log('Pre step: Entering text into the text fields of group 2 response container')
|
39
|
+
fillInTheGapsDragAndDropPage.groupResponseContainer()
|
40
|
+
.eq(1)
|
41
|
+
.within(() => {
|
42
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsForDragAndDropFields(responseForGroup2);
|
43
|
+
});
|
44
|
+
fillInTheGapsDragAndDropPage.steps.addGroupTitle(1, 'Group title B');
|
45
|
+
cy.log('Setting a correct answer option')
|
46
|
+
fillInTheGapsDragAndDropPage.steps.setCorrectAnswerSectionClickAndDropDraggableOptionInResponseArea('Response 2', 0);
|
47
|
+
cy.log('Deleting the 1st group')
|
48
|
+
fillInTheGapsDragAndDropPage.deleteGroupButton()
|
49
|
+
.eq(0)
|
50
|
+
.click();
|
51
|
+
fillInTheGapsDragAndDropPage.setCorrectAnswerSectionGroupedResponseContainer()
|
52
|
+
.should('have.length', 1);
|
53
|
+
fillInTheGapsDragAndDropPage.setCorrectAnswerSectionGroupedResponseContainer()
|
54
|
+
.eq(1)
|
55
|
+
.should('not.exist');
|
56
|
+
fillInTheGapsDragAndDropPage.steps.verifyErroredStateOfResponseAreaInSetCorrectAnswerSection(0);
|
57
|
+
cy.log('verifying the contents of group 2 after deleting group 1')
|
58
|
+
fillInTheGapsDragAndDropPage.draggableOption()
|
59
|
+
.each(($element, count) => {
|
60
|
+
cy.wrap($element)
|
61
|
+
.should('have.text', `Response ${count + 3}`);
|
62
|
+
});
|
63
|
+
fillInTheGapsDragAndDropPage.setCorrectAnswerSectionGroupedResponseTitle()
|
64
|
+
.should('have.text', 'Group title B');
|
65
|
+
});
|
66
|
+
});
|
67
|
+
}
|
68
|
+
|
69
|
+
describe('\'Grouped\' response options layout - Preview tab contents', { tags: 'smoke' }, () => {
|
70
|
+
abortEarlySetup();
|
71
|
+
before(() => {
|
72
|
+
cy.log('Navigate to fill in the gaps - drag and drop question type');
|
73
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
74
|
+
cy.barsPreLoaderWait();
|
75
|
+
fillInTheGapsDragAndDropPage.steps.selectResponseOptionsLayout('Grouped');
|
76
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
77
|
+
});
|
78
|
+
|
79
|
+
fillInTheGapsDragAndDropPage.tests.verifyGroupedResponseDraggableOptionsInPreviewTab();
|
80
|
+
});
|
81
|
+
})
|
@@ -1,36 +1,39 @@
|
|
1
1
|
import { fillInTheGapsDragAndDropPage, fillInTheGapsScoring } from "../../../pages";
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
const grepTags = Cypress.env('grepTags');
|
3
4
|
|
4
5
|
describe('Create Item page - Fill in the Gaps - Drag and Drop - Grouped options layout: All or nothing scoring', () => {
|
5
6
|
before(() => {
|
6
7
|
cy.loginAs('admin');
|
7
8
|
});
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
.
|
20
|
-
|
21
|
-
|
22
|
-
.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
10
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
11
|
+
describe('Show correct answer', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigate to fill in the gaps - drag and drop question type and fill the option input fields in grouped options layout');
|
15
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
fillInTheGapsDragAndDropPage.steps.selectResponseOptionsLayout('Grouped');
|
18
|
+
fillInTheGapsDragAndDropPage.steps.addGroupTitle(0, 'Group title A');
|
19
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsForDragAndDropFields(['Correct answer for response 1', 'Incorrect answer 1']);
|
20
|
+
fillInTheGapsDragAndDropPage.addGroupButton()
|
21
|
+
.click();
|
22
|
+
fillInTheGapsDragAndDropPage.steps.addGroupTitle(1, 'Group title B');
|
23
|
+
fillInTheGapsDragAndDropPage.groupResponseContainer()
|
24
|
+
.eq(1)
|
25
|
+
.within(() => {
|
26
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsForDragAndDropFields(['Correct answer for response 2', 'Incorrect answer 2']);
|
27
|
+
});
|
28
|
+
});
|
27
29
|
|
28
|
-
|
30
|
+
fillInTheGapsDragAndDropPage.tests.verifyShowCorrectAnswerAndPointsInPreviewTabWhenNoCorrectAnswerIsSet();
|
29
31
|
|
30
|
-
|
31
|
-
|
32
|
+
fillInTheGapsScoring.tests.verifyShowCorrectAnswerBasicFunctionality('fill in the gaps - drag and drop');
|
33
|
+
});
|
34
|
+
}
|
32
35
|
|
33
|
-
describe('Question Preview: AutoScored - All or Nothing: Grouped options layout', () => {
|
36
|
+
describe('Question Preview: AutoScored - All or Nothing: Grouped options layout', { tags: 'smoke' }, () => {
|
34
37
|
abortEarlySetup();
|
35
38
|
before(() => {
|
36
39
|
cy.log('Navigate to fill in the gaps - drag and drop question type, fill the necessary details and points and switch to preview tab');
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { fillInTheGapsDropdownPage, fillInTheGapsScoring } from "../../../pages";
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
-
|
3
|
+
const grepTags = Cypress.env('grepTags');
|
4
4
|
|
5
5
|
let optionsForResponse1 = ['Correct answer 1', 'Alternate correct answer 1', 'Incorrect answer 1', 'Incorrect answer 2'];
|
6
6
|
let optionsForResponse2 = ['Correct answer 2', 'Alternate correct answer 2', 'Incorrect answer 1', 'Incorrect answer 2'];
|
@@ -10,22 +10,24 @@ describe('Create Item page - Fill in the Gaps - dropdown: Auto scored all or not
|
|
10
10
|
cy.loginAs('admin');
|
11
11
|
});
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
13
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
14
|
+
describe('Show correct answer', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
18
|
+
cy.log('Adding a response token')
|
19
|
+
fillInTheGapsDropdownPage.steps.addResponseTokenInQuestionField();
|
20
|
+
fillInTheGapsDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
|
21
|
+
fillInTheGapsDropdownPage.steps.addInputToResponseOptionFields(1, optionsForResponse2);
|
22
|
+
});
|
22
23
|
|
23
|
-
|
24
|
+
fillInTheGapsDropdownPage.tests.verifyShowCorrectAnswerAndPointsInPreviewTabWhenNoCorrectAnswerIsSet();
|
24
25
|
|
25
|
-
|
26
|
-
|
26
|
+
fillInTheGapsScoring.tests.verifyShowCorrectAnswerBasicFunctionality('fill in the gaps - dropdown');
|
27
|
+
});
|
28
|
+
}
|
27
29
|
|
28
|
-
describe('Question Preview: AutoScored - All or Nothing', () => {
|
30
|
+
describe('Question Preview: AutoScored - All or Nothing', { tags: 'smoke' }, () => {
|
29
31
|
abortEarlySetup();
|
30
32
|
before(() => {
|
31
33
|
cy.log('Navigate to fill in the gaps - dropdown question type, fill the necessary details and points and switch to preview tab');
|
@@ -3,100 +3,106 @@ import { uploadImageSectionComponent } from "../../../pages/components";
|
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
5
5
|
const css = Cypress.env('css');
|
6
|
+
const grepTags = Cypress.env('grepTags');
|
6
7
|
|
7
8
|
describe('Create item page - Fill in the gaps over image - dropdown: Add response container, response container', () => {
|
8
9
|
before(() => {
|
9
10
|
cy.loginAs('admin');
|
10
11
|
});
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
14
|
+
describe('Add response container button', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
cy.log('Navigating to Fill in the gaps over image - dropdown question type');
|
18
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
19
|
+
cy.barsPreLoaderWait();
|
20
|
+
});
|
19
21
|
|
20
|
-
|
21
|
-
|
22
|
-
|
22
|
+
it('By default the \'Add response container\' button should not exist', () => {
|
23
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.addResponseContainerButton(), 'notExist');
|
24
|
+
});
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
it('When the user has uploaded an image in image section, then \'Add response container\' button should be displayed', () => {
|
27
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
28
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
29
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.addResponseContainerButton(), 'visible');
|
30
|
+
});
|
29
31
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
32
|
+
it('When the user clicks on \'Add response container\' button, then response container should be added over the uploaded image with numeration', () => {
|
33
|
+
fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
|
34
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseContainerIsDisplayedInImageSection(0);
|
35
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseContainerNumerationInImageSection(0);
|
36
|
+
});
|
35
37
|
|
36
|
-
|
37
|
-
|
38
|
-
|
38
|
+
it('When the user has added response container in image section, then \'Options for response #\' section should be displayed', () => {
|
39
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyOptionsForResponseLabelAndSectionIsDisplayed(0);
|
40
|
+
});
|
39
41
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
it('When the user adds a second response container in image section, then respective \'Options for response #\' section should be displayed for the newly added response container with proper numeration', () => {
|
43
|
+
fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
|
44
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseContainerNumerationInImageSection(1);
|
45
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyOptionsForResponseLabelAndSectionIsDisplayed(0);
|
46
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyOptionsForResponseLabelAndSectionIsDisplayed(1);
|
47
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.optionsForResponseContainer(), 2);
|
48
|
+
});
|
47
49
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
it('When the user clicks on the close button on the response container, then the response container should be removed from the image and options for the removed response container should also be removed', () => {
|
51
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnResponseContainerCloseButton(0);
|
52
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.responseContainer(), 1);
|
53
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.optionsForResponseContainer(), 1);
|
54
|
+
});
|
53
55
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
56
|
+
it('The remaining response container and its options for response section should be displayed with proper updated numeration', () => {
|
57
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseContainerIsDisplayedInImageSection(0);
|
58
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseContainerNumerationInImageSection(0);
|
59
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyOptionsForResponseLabelAndSectionIsDisplayed(0);
|
60
|
+
});
|
58
61
|
});
|
59
|
-
}
|
62
|
+
}
|
60
63
|
|
61
|
-
describe('Add response container - set correct answer section', () => {
|
62
|
-
abortEarlySetup();
|
63
|
-
before(() => {
|
64
|
-
cy.log('Navigating to Fill in the gaps over image - dropdown question type');
|
65
|
-
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
66
|
-
cy.barsPreLoaderWait();
|
67
|
-
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
68
|
-
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
69
|
-
});
|
70
64
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
65
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
66
|
+
describe('Add response container - set correct answer section', () => {
|
67
|
+
abortEarlySetup();
|
68
|
+
before(() => {
|
69
|
+
cy.log('Navigating to Fill in the gaps over image - dropdown question type');
|
70
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
71
|
+
cy.barsPreLoaderWait();
|
72
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
73
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnImagePopupOkButton();
|
74
|
+
});
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
});
|
76
|
+
it('When the user has not added any response container over the uploaded image, response label and dropdown should not be displayed in the set correct answer section', () => {
|
77
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.setCorrectAnswerResponseFieldLabel(), 'notExist');
|
78
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.responseDropdownSetCorrectAnswerSection(), 'notExist');
|
79
|
+
});
|
81
80
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.responseDropdownSetCorrectAnswerSection(), 2);
|
88
|
-
});
|
81
|
+
it('When the user adds a response container over the uploaded image, then a label \'Response #\' and its respective dropdown should be displayed in the set correct answer section', () => {
|
82
|
+
fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
|
83
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseFieldLabelInSetCorrectAnswerSection(0);
|
84
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownIsDisplayedInSetCorrectAnswerSection(0);
|
85
|
+
});
|
89
86
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
87
|
+
it('When the user adds second response container in image section, then a label \'Response #\' and its respective dropdown should be displayed in the set correct answer section for the newly added response container with appropriate numeration', () => {
|
88
|
+
fillInTheGapsOverImageDropdownPage.steps.addResponseContainer();
|
89
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseFieldLabelInSetCorrectAnswerSection(1);
|
90
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownIsDisplayedInSetCorrectAnswerSection(1);
|
91
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.setCorrectAnswerResponseFieldLabel(), 2);
|
92
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.responseDropdownSetCorrectAnswerSection(), 2);
|
93
|
+
});
|
94
|
+
|
95
|
+
it('When the user removes a response container in the image section, then the label and dropdown for the removed response container should also be removed in the set correct answer section and the remaining label and dropdown in the set correct answer section should be displayed with proper updated numeration', () => {
|
96
|
+
fillInTheGapsOverImageDropdownPage.steps.clickOnResponseContainerCloseButton(0);
|
97
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.setCorrectAnswerResponseFieldLabel(), 1);
|
98
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.responseDropdownSetCorrectAnswerSection(), 1);
|
99
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseFieldLabelInSetCorrectAnswerSection(0);
|
100
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyResponseDropdownIsDisplayedInSetCorrectAnswerSection(0);
|
101
|
+
});
|
96
102
|
});
|
97
|
-
}
|
103
|
+
}
|
98
104
|
|
99
|
-
describe('Add response container - preview tab', () => {
|
105
|
+
describe('Add response container - preview tab', { tags: 'smoke' }, () => {
|
100
106
|
abortEarlySetup();
|
101
107
|
before(() => {
|
102
108
|
cy.log('Navigating to fill in the gaps over image - dropdown question type');
|
@@ -141,7 +147,7 @@ describe('Create item page - Fill in the gaps over image - dropdown: Add respons
|
|
141
147
|
});
|
142
148
|
});
|
143
149
|
|
144
|
-
describe('Response container', () => {
|
150
|
+
describe('Response container', { tags: 'smoke' }, () => {
|
145
151
|
abortEarlySetup();
|
146
152
|
before(() => {
|
147
153
|
cy.log('fill in the gaps over image - dropdown');
|