itemengine-cypress-automation 1.0.30 → 1.0.32
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesAdditionalSettings.js +963 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesClickAndDrop.js +669 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesEditTabScoringTypes.js +205 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsAllOrNothing.js +143 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsPartialScoreForEachCell.js +145 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsPartialScoreForEachResponse.js +141 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsTotalScoreDividedBetweenCell.js +165 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsTotalScoreDividedBetweenResponses.js +420 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedSetCorrectAnswerCheckboxes.js +266 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesHeaderSection.js +83 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesManuallyAndNonScored.js +184 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesResponseOptionsSection.js +112 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesRowsAndCategoriesSection.js +569 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesSetCorrectAnswerSection.js +130 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardAllOrNothing.js +186 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardPartialScoreForEachCell.js +145 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardPartialScoreForEachResponse.js +140 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardSetCorrectAnswerCheckboxes.js +234 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardTotalScoreDividedBetweenCell.js +165 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardTotalScoreDividedBetweenResponse.js +420 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesSwitchingCases.js +45 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownAdditionalSettings.js +1 -415
- package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownAdditionalSettingsBasic.js +423 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownAllOrNothingScoring.js +48 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownAutoScoredScoring.js → fillInTheGapsDropdownAllOrNothingScoringWithAlternateAnswer.js} +1 -37
- package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownPartialDifferentWeights.js +59 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownScoringPartialDifferentWeights.js → fillInTheGapsDropdownPartialDifferentWeightsWithAlternateAnswer.js} +1 -47
- package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownPartialEqualWeights.js +1 -63
- package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownPartialEqualWeightsWithAlternateAnswer.js +73 -0
- package/package.json +1 -1
@@ -0,0 +1,130 @@
|
|
1
|
+
import { dialogBoxBase, dragAndDropIntoCategoriesPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
const css = Cypress.env('css');
|
4
|
+
const optionsForThreeResponses = ['Response 1', 'Response 2', 'Response 3'];
|
5
|
+
const optionsForResponses = ['Response 1', 'Response 2'];
|
6
|
+
|
7
|
+
describe('Create Item Page - drag and drop into categories: Set correct answer section, correct tab, alternate answer tab', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Set correct answer section', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
});
|
18
|
+
|
19
|
+
dragAndDropIntoCategoriesPage.tests.verifyAutoScoredSetCorrectAnswerHeaderSectionContents('drag and drop into categories');
|
20
|
+
|
21
|
+
it('CSS of correct response conditions section', { tags: 'css' }, () => {
|
22
|
+
const labels = [dragAndDropIntoCategoriesPage.randomizeOptionsLabel, dragAndDropIntoCategoriesPage.reuseOptionsLabel, dragAndDropIntoCategoriesPage.hideDragHandleLabel]
|
23
|
+
const uncheckedCheckboxes = [dragAndDropIntoCategoriesPage.randomizeOptionsCheckbox, dragAndDropIntoCategoriesPage.reuseOptionsCheckbox, dragAndDropIntoCategoriesPage.hideDragHandleCheckbox]
|
24
|
+
labels.forEach((checkinglabel) => {
|
25
|
+
checkinglabel()
|
26
|
+
.verifyCSS(css.color.labelText, css.fontSize.normal, css.fontWeight.regular);
|
27
|
+
});
|
28
|
+
uncheckedCheckboxes.forEach((uncheckedCheckbox) => {
|
29
|
+
uncheckedCheckbox()
|
30
|
+
.parent()
|
31
|
+
.find('svg')
|
32
|
+
.should('have.css', 'fill', css.color.uncheckedCheckbox);
|
33
|
+
});
|
34
|
+
});
|
35
|
+
|
36
|
+
dragAndDropIntoCategoriesPage.tests.verifyDefaultStateOfRandomizeOptionsCheckboxAndLabel();
|
37
|
+
|
38
|
+
dragAndDropIntoCategoriesPage.tests.verifyDefaultStateOfReuseOptionsCheckboxAndLabel();
|
39
|
+
|
40
|
+
dragAndDropIntoCategoriesPage.tests.verifyDefaultStateOfHideDragHandleCheckboxAndLabel();
|
41
|
+
});
|
42
|
+
|
43
|
+
describe('Alternate answer tab', () => {
|
44
|
+
abortEarlySetup();
|
45
|
+
before(() => {
|
46
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
47
|
+
cy.barsPreLoaderWait();
|
48
|
+
dragAndDropIntoCategoriesPage.addOptionButton()
|
49
|
+
.click();
|
50
|
+
dragAndDropIntoCategoriesPage.steps.addInputToOptionsForDragAndDropFields(optionsForThreeResponses);
|
51
|
+
});
|
52
|
+
|
53
|
+
dragAndDropIntoCategoriesPage.tests.verifyAutoScoredAlternateAnswer();
|
54
|
+
|
55
|
+
it('When user has added points and set correct answer options in the \'Correct\' tab, then the user should be able to add alternate answer for the question using \'Add Alternate Answer\' button', () => {
|
56
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(20);
|
57
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Response 1', 0);
|
58
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionInCategoryCellOfSetCorrectAnswerSection(0, ['Response 1']);
|
59
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Response 2', 1);
|
60
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionInCategoryCellOfSetCorrectAnswerSection(1, ['Response 2']);
|
61
|
+
dragAndDropIntoCategoriesPage.steps.addAlternateTab(1);
|
62
|
+
});
|
63
|
+
|
64
|
+
it('When the user has added an alternate tab, then the alternate tab should be displayed in active state and the category cells should be empty', () => {
|
65
|
+
dragAndDropIntoCategoriesPage.alternateAnswerTab(1)
|
66
|
+
.should('have.attr', 'aria-selected', 'true');
|
67
|
+
cy.log('verify if all the contents of correct tab are present in alternate tab')
|
68
|
+
dragAndDropIntoCategoriesPage.steps.verifyCountOfCategoryTitlesInSetCorrectAnswerSection(2);
|
69
|
+
dragAndDropIntoCategoriesPage.steps.verifyCountOfCategoriesInSetCorrectAnswerSection(2);
|
70
|
+
for (let categoryIndex = 0; categoryIndex < 2; categoryIndex++) {
|
71
|
+
dragAndDropIntoCategoriesPage.steps.verifyCategoryTitleInSetCorrectAnswerSection(categoryIndex, `Category ${categoryIndex + 1}`);
|
72
|
+
};
|
73
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesSetCorrectAnswer('drag and drop into categories', optionsForThreeResponses);
|
74
|
+
});
|
75
|
+
|
76
|
+
it('CSS of alternate tab in active state', { tags: 'css' }, () => {
|
77
|
+
dragAndDropIntoCategoriesPage.alternateAnswerTab(1)
|
78
|
+
.verifyCSS(css.color.secondaryBtnActive, css.fontSize.default, css.fontWeight.bold);
|
79
|
+
dragAndDropIntoCategoriesPage.deleteAlternateTabButton()
|
80
|
+
.find('svg')
|
81
|
+
.should('have.css', 'fill', `${css.color.secondaryBtnActive}`);
|
82
|
+
});
|
83
|
+
|
84
|
+
dragAndDropIntoCategoriesPage.tests.verifyA11yOfAlternateAnswerTab();
|
85
|
+
|
86
|
+
it('When user clicks on Correct tab when all the mandatory fields are not filled in Alternate tab a warning popup should be displayed and on closing the popup user should be on the Alternate 1 tab.', () => {
|
87
|
+
dragAndDropIntoCategoriesPage.steps.switchToCorrectTab();
|
88
|
+
dialogBoxBase.steps.allFieldsRequiredWarningPopupContents();
|
89
|
+
dialogBoxBase.steps.closeWarningPopup();
|
90
|
+
dragAndDropIntoCategoriesPage.alternateAnswerTab(1)
|
91
|
+
.should('have.attr', 'aria-selected', 'true');
|
92
|
+
});
|
93
|
+
|
94
|
+
//TODO: will need to update the above case with verifyWarningPopupAndTabNavigationWhenNoPointsAddedInAlternateTab after updating the order of test cases in other files as well
|
95
|
+
|
96
|
+
it('When the user fills all the mandatory fields in the alternate tab, then user should be able to switch to correct tab', () => {
|
97
|
+
cy.log('Set correct answer and points in alternate 2 tab, then switching to Correct tab');
|
98
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Response 2', 0);
|
99
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Response 3', 1);
|
100
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(4);
|
101
|
+
dragAndDropIntoCategoriesPage.steps.switchToCorrectTab();
|
102
|
+
dragAndDropIntoCategoriesPage.steps.verifyActiveStateOfCorrectTab();
|
103
|
+
cy.log('Verifying the points and answers set in the correct tab')
|
104
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerOptionsAndPointsInSetCorrectAnswerSection(optionsForResponses, 20);
|
105
|
+
});
|
106
|
+
|
107
|
+
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\'', () => {
|
108
|
+
dragAndDropIntoCategoriesPage.steps.addAlternateTab(2);
|
109
|
+
});
|
110
|
+
|
111
|
+
//https://redmine.zeuslearning.com/issues/533300
|
112
|
+
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', () => {
|
113
|
+
const optionsSetInAlternateTab2 = ['Response 1', 'Response 3'];
|
114
|
+
cy.log('Pre step: Set correct answer and points in alternate 2 tab, then switching to alternate tab 1');
|
115
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Response 1', 0);
|
116
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Response 3', 1);
|
117
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(2);
|
118
|
+
dragAndDropIntoCategoriesPage.alternateAnswerTab(1)
|
119
|
+
.click();
|
120
|
+
dragAndDropIntoCategoriesPage.deleteAlternateTabButton()
|
121
|
+
.click();
|
122
|
+
dragAndDropIntoCategoriesPage.alternateAnswerTab(2)
|
123
|
+
.should('not.exist');
|
124
|
+
dragAndDropIntoCategoriesPage.alternateAnswerTab(1)
|
125
|
+
.verifyInnerText('Alternate 1');
|
126
|
+
cy.log('verifying the points and correct answer of the alternate tab')
|
127
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerOptionsAndPointsInSetCorrectAnswerSection(optionsSetInAlternateTab2, 2);
|
128
|
+
});
|
129
|
+
});
|
130
|
+
});
|
package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardAllOrNothing.js
ADDED
@@ -0,0 +1,186 @@
|
|
1
|
+
import { dragAndDropIntoCategoriesAllOrNothingScoring } from "../../../pages/dragAndDropIntoCategoriesAllOrNothingScoring";
|
2
|
+
import { dragAndDropIntoCategoriesPage } from "../../../pages/dragAndDropIntoCategoriesPage";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const identicalOptionArray = ['Bat', 'Eagle', 'Bat'];
|
6
|
+
|
7
|
+
describe('Create Item page - drag and drop into categories: Preview tab Scoring Section', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Show correct answer', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
cy.log('Navigating to drag and drop into categories question type');
|
16
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
19
|
+
});
|
20
|
+
|
21
|
+
dragAndDropIntoCategoriesPage.tests.verifyShowCorrectAnswerAndPointsInPreviewTabWhenNoCorrectAnswerIsSet()
|
22
|
+
|
23
|
+
it('When the user has set correct answer options and alloted points \'Show correct answer\' checkbox should be displayed and it should be unchecked by default and points for the question should be displayed beside it', () => {
|
24
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
25
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
26
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
27
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
28
|
+
dragAndDropIntoCategoriesPage.steps.verifyDefaultShowCorrectAnswerCheckboxAndLabel();
|
29
|
+
dragAndDropIntoCategoriesPage.previewScoreText()
|
30
|
+
.verifyInnerText('0/10');
|
31
|
+
});
|
32
|
+
|
33
|
+
it('When the user attempts question in preview tab and switches to edit tab, then on re-switching to the preview tab users response should not persist', () => {
|
34
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
35
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
|
36
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
|
37
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
|
38
|
+
dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
|
39
|
+
for (let index = 0; index < 4; index++) {
|
40
|
+
dragAndDropIntoCategoriesPage.steps.verifyEmptyStateOfCategoryCellInPreviewTab(index);
|
41
|
+
}
|
42
|
+
});
|
43
|
+
});
|
44
|
+
|
45
|
+
describe('Question preview: AutoScored: All or nothing', () => {
|
46
|
+
abortEarlySetup();
|
47
|
+
before(() => {
|
48
|
+
cy.log('Navigating to drag and drop into categories question type');
|
49
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
50
|
+
cy.barsPreLoaderWait();
|
51
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
52
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
53
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
54
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
55
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
56
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
57
|
+
});
|
58
|
+
|
59
|
+
it('CSS of \'Score\' and \'Show correct answer\'', { tags: 'css' }, () => {
|
60
|
+
dragAndDropIntoCategoriesPage.previewScoreText()
|
61
|
+
.verifyCSS(css.color.labels, css.fontSize.default, css.fontWeight.regular);
|
62
|
+
dragAndDropIntoCategoriesPage.showCorrectAnswerCheckboxLabel()
|
63
|
+
.verifyCSS(css.color.labelText, css.fontSize.normal, css.fontWeight.regular);
|
64
|
+
});
|
65
|
+
|
66
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(10);
|
67
|
+
|
68
|
+
it('CSS of category cell numeration and correct answer section', () => {
|
69
|
+
dragAndDropIntoCategoriesPage.correctAnswerLabel()
|
70
|
+
.verifyCSS(css.color.text, css.fontSize.normal, css.fontWeight.regular);
|
71
|
+
dragAndDropIntoCategoriesPage.correctAnswerCategoryCell()
|
72
|
+
.should('have.css', 'border', `1px solid ${css.color.correctAnswerContainerBorder}`)
|
73
|
+
.eq(0)
|
74
|
+
.within(() => {
|
75
|
+
dragAndDropIntoCategoriesPage.categoryCellNumeration()
|
76
|
+
.verifyCSS(css.color.liText, css.fontSize.default, css.fontWeight.regular)
|
77
|
+
.should('have.css', 'border', `1px solid ${css.color.titleContainerBorder}`)
|
78
|
+
.and('have.css', 'background-color', `${css.color.titleContainerBg}`);
|
79
|
+
dragAndDropIntoCategoriesPage.correctAnswerOption()
|
80
|
+
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular)
|
81
|
+
.should('have.css', 'border', `1px solid ${css.color.titleContainerBorder}`);
|
82
|
+
});
|
83
|
+
});
|
84
|
+
|
85
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnClickingCheckAnswerWithoutAttempting();
|
86
|
+
|
87
|
+
dragAndDropIntoCategoriesAllOrNothingScoring.tests.verifyAutoScoredAllOrNothingScoring()
|
88
|
+
|
89
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(10);
|
90
|
+
});
|
91
|
+
|
92
|
+
describe('Question preview: AutoScored - All or nothing with alternate answer', () => {
|
93
|
+
abortEarlySetup();
|
94
|
+
before(() => {
|
95
|
+
cy.log('Navigating to drag and drop into categories question type');
|
96
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
97
|
+
cy.barsPreLoaderWait();
|
98
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
99
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
100
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
101
|
+
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
102
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
103
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
|
104
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
|
105
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
106
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
107
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(5);
|
108
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
109
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
110
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
111
|
+
});
|
112
|
+
|
113
|
+
dragAndDropIntoCategoriesAllOrNothingScoring.tests.verifyAutoScoredAllOrNothingWithAlternateAnswer();
|
114
|
+
|
115
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(10);
|
116
|
+
});
|
117
|
+
|
118
|
+
describe('Question Preview: AutoScored - All or Nothing standard options layout with identical draggable response options in preview tab', () => {
|
119
|
+
abortEarlySetup();
|
120
|
+
before(() => {
|
121
|
+
cy.log('Navigate to drag and drop into categories question type, fill the necessary details and points and switch to preview tab');
|
122
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
123
|
+
cy.barsPreLoaderWait();
|
124
|
+
dragAndDropIntoCategoriesPage.addOptionButton()
|
125
|
+
.click();
|
126
|
+
dragAndDropIntoCategoriesPage.steps.addInputToOptionsForDragAndDropFields(identicalOptionArray);
|
127
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(20);
|
128
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 0);
|
129
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
|
130
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
131
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
132
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
133
|
+
});
|
134
|
+
|
135
|
+
it('Case: When user has identical options to give as input', () => {
|
136
|
+
cy.log('Both the identical options should be visible in the draggable response options section and when user clicks on \'Show correct answer\' checkbox only one of the identical options should be displayed in the correct answer section');
|
137
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesPreviewTab('drag and drop into categories', identicalOptionArray);
|
138
|
+
dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
|
139
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle']], [1, 2]);
|
140
|
+
|
141
|
+
cy.log('Post-step: Unchecking show correct answer checkbox');
|
142
|
+
dragAndDropIntoCategoriesPage.steps.uncheckShowCorrectAnswerCheckbox();
|
143
|
+
|
144
|
+
cy.log('When the user gives the correct answer inputs and user selects the show correct answer checkbox, green check-mark icon should be displayed besides both the responses, user should be awarded full points and no correct answer section should be displayed');
|
145
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
146
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
|
147
|
+
cy.log('User should be awarded full points')
|
148
|
+
dragAndDropIntoCategoriesPage.previewScoreText()
|
149
|
+
.verifyInnerText('20/20');
|
150
|
+
dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
|
151
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
152
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
153
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
154
|
+
|
155
|
+
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
156
|
+
|
157
|
+
cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides correct answer responses and no correct answer section should be displayed');
|
158
|
+
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
159
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
160
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
161
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
162
|
+
|
163
|
+
cy.log('When the user attempts the question with the identical option then on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides the original option set as correct responses, red cross-mark icon should be displayed against the identical option and user should be awarded 0 points');
|
164
|
+
dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
|
165
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
166
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
167
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfPreviewTab('Bat');
|
168
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
|
169
|
+
cy.log('User should be awarded 0 points')
|
170
|
+
dragAndDropIntoCategoriesPage.previewScoreText()
|
171
|
+
.verifyInnerText('0/20');
|
172
|
+
dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
|
173
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
174
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
175
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat']], [1]);
|
176
|
+
|
177
|
+
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
178
|
+
|
179
|
+
cy.log('When user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the original options set as correct responses, red cross-mark icon should be displayed against the identical option ')
|
180
|
+
dragAndDropIntoCategoriesPage.steps.checkAnswer();
|
181
|
+
dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
182
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
183
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
|
184
|
+
});
|
185
|
+
});
|
186
|
+
});
|
@@ -0,0 +1,145 @@
|
|
1
|
+
import { dragAndDropIntoCategoriesCellsScoring } from "../../../pages/dragAndDropIntoCategoriesCellsScoring";
|
2
|
+
import { dragAndDropIntoCategoriesPage } from "../../../pages/dragAndDropIntoCategoriesPage";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
|
5
|
+
describe('Create Item page - drag and drop into categories: Preview tab Scoring Section', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Question preview: AutoScored: Partial - score for each cell', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
cy.log('Navigating to drag and drop into categories question type');
|
14
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
17
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
18
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
19
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
20
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each cell');
|
21
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
22
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
23
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
24
|
+
});
|
25
|
+
|
26
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(40);
|
27
|
+
|
28
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnClickingCheckAnswerWithoutAttempting();
|
29
|
+
|
30
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCell('Partial - score for each cell');
|
31
|
+
|
32
|
+
//https://redmine.zeuslearning.com/issues/536492
|
33
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(40);
|
34
|
+
|
35
|
+
dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(14, 40);
|
36
|
+
|
37
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 14, 12], 12, 10);
|
38
|
+
});
|
39
|
+
|
40
|
+
describe('Question preview: AutoScored - Partial - score for each cell with alternate answer: When \'Correct answer\' points are more than \'Alternate answer\' points', () => {
|
41
|
+
abortEarlySetup();
|
42
|
+
before(() => {
|
43
|
+
cy.log('Navigating to drag and drop into categories question type');
|
44
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
45
|
+
cy.barsPreLoaderWait();
|
46
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
47
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
48
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
49
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
50
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each cell');
|
51
|
+
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
52
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
53
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Peacock', 1);
|
54
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Falcon', 1);
|
55
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 2);
|
56
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
57
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
58
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(8);
|
59
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
60
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
61
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
62
|
+
});
|
63
|
+
|
64
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(40);
|
65
|
+
|
66
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithCorrectTabAnswerOptions(40, 40);
|
67
|
+
|
68
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithAlternateTabAnswerOptions(32, 40);
|
69
|
+
|
70
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellWithCorrectAnswerPointsMoreThanAlternateAnswerPoints('Partial - score for each cell');
|
71
|
+
});
|
72
|
+
|
73
|
+
describe('Question preview: AutoScored - Partial - score for each cell with alternate answer: When \'Alternate answer\' points are more than \'Correct answer\' points', () => {
|
74
|
+
abortEarlySetup();
|
75
|
+
before(() => {
|
76
|
+
cy.log('Navigating to drag and drop into categories question type');
|
77
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
78
|
+
cy.barsPreLoaderWait();
|
79
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
80
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(8);
|
81
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
82
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
83
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each cell');
|
84
|
+
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
85
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
86
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Peacock', 1);
|
87
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Falcon', 1);
|
88
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 2);
|
89
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
90
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
91
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
92
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
93
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
94
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
95
|
+
});
|
96
|
+
|
97
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(40);
|
98
|
+
|
99
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithCorrectTabAnswerOptions(32, 40);
|
100
|
+
|
101
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithAlternateTabAnswerOptions(40, 40);
|
102
|
+
|
103
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellWithAlternateAnswerPointsMoreThanCorrectAnswerPoints('Partial - score for each cell');
|
104
|
+
});
|
105
|
+
|
106
|
+
describe('Question preview: AutoScored - Partial - score for each cell with alternate answer: When \'Alternate answer\' points is equal to \'Correct answer\' points', () => {
|
107
|
+
abortEarlySetup();
|
108
|
+
before(() => {
|
109
|
+
cy.log('Navigating to drag and drop into categories question type');
|
110
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
111
|
+
cy.barsPreLoaderWait();
|
112
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
113
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
114
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
115
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
116
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each cell');
|
117
|
+
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
118
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
119
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Peacock', 1);
|
120
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Falcon', 1);
|
121
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 2);
|
122
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
123
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
124
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
125
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
126
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
127
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
128
|
+
});
|
129
|
+
|
130
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(40);
|
131
|
+
|
132
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithCorrectTabAnswerOptions(40, 40);
|
133
|
+
|
134
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithAlternateTabAnswerOptions(40, 40);
|
135
|
+
|
136
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellWithAlternateAnswerPointsEqualToCorrectAnswerPoints('Partial - score for each cell');
|
137
|
+
|
138
|
+
//https://redmine.zeuslearning.com/issues/536492
|
139
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(40);
|
140
|
+
|
141
|
+
dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(14, 40);
|
142
|
+
|
143
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 14, 12], 12, 40);
|
144
|
+
});
|
145
|
+
});
|
@@ -0,0 +1,140 @@
|
|
1
|
+
import { dragAndDropIntoCategoriesCorrectResponseScoring } from "../../../pages";
|
2
|
+
import { dragAndDropIntoCategoriesPage } from "../../../pages/dragAndDropIntoCategoriesPage";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
|
5
|
+
describe('Create Item page - drag and drop into categories: Preview tab Scoring Section', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Question preview: AutoScored: Partial - score for each correct response', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
cy.log('Navigating to drag and drop into categories question type');
|
14
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
17
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
18
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
19
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
20
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each correct response');
|
21
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
22
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
23
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
24
|
+
});
|
25
|
+
|
26
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(60);
|
27
|
+
|
28
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnClickingCheckAnswerWithoutAttempting();
|
29
|
+
|
30
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponse('Partial - score for each correct response');
|
31
|
+
|
32
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(60);
|
33
|
+
|
34
|
+
dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(37, 60);
|
35
|
+
|
36
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 37, 12], 12, 60);
|
37
|
+
});
|
38
|
+
|
39
|
+
describe('Question preview: AutoScored - Partial - score for each correct response with alternate answer: When \'Correct answer\' points are more than \'Alternate answer\' points', () => {
|
40
|
+
abortEarlySetup();
|
41
|
+
before(() => {
|
42
|
+
cy.log('Navigating to drag and drop into categories question type');
|
43
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
44
|
+
cy.barsPreLoaderWait();
|
45
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
46
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
47
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
48
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
49
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each correct response');
|
50
|
+
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
51
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
52
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
|
53
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
|
54
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
55
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
56
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(7);
|
57
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
58
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
59
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
60
|
+
});
|
61
|
+
|
62
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(60);
|
63
|
+
|
64
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithCorrectTabAnswerOptions(60, 60);
|
65
|
+
|
66
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithAlternateTabAnswerOptions(35, 60);
|
67
|
+
|
68
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseWithCorrectAnswerPointsMoreThanAlternateAnswerPoints('Partial - score for each correct response');
|
69
|
+
});
|
70
|
+
|
71
|
+
describe('Question preview: AutoScored - Partial - score for each correct response with alternate answer: When \'Alternate answer\' points are more than \'Correct answer\' points', () => {
|
72
|
+
abortEarlySetup();
|
73
|
+
before(() => {
|
74
|
+
cy.log('Navigating to drag and drop into categories question type');
|
75
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
76
|
+
cy.barsPreLoaderWait();
|
77
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
78
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(8);
|
79
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
80
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
81
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each correct response');
|
82
|
+
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
83
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
84
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
|
85
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
|
86
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
87
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
88
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
89
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
90
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
91
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
92
|
+
});
|
93
|
+
|
94
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(50);
|
95
|
+
|
96
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithCorrectTabAnswerOptions(48, 50);
|
97
|
+
|
98
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithAlternateTabAnswerOptions(50, 50);
|
99
|
+
|
100
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseWithAlternateAnswerPointsMoreThanCorrectAnswerPoints('Partial - score for each correct response');
|
101
|
+
});
|
102
|
+
|
103
|
+
describe('Question preview: AutoScored - Partial - score for each correct response with alternate answer: When \'Alternate answer\' points is equal to \'Correct answer\' points', () => {
|
104
|
+
abortEarlySetup();
|
105
|
+
before(() => {
|
106
|
+
cy.log('Navigating to drag and drop into categories question type');
|
107
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
108
|
+
cy.barsPreLoaderWait();
|
109
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
110
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
111
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
112
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
113
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each correct response');
|
114
|
+
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
115
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
116
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
|
117
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
|
118
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
119
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
120
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
121
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
122
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
123
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
124
|
+
});
|
125
|
+
|
126
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(60);
|
127
|
+
|
128
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithCorrectTabAnswerOptions(60, 60);
|
129
|
+
|
130
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithAlternateTabAnswerOptions(50, 60);
|
131
|
+
|
132
|
+
dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseWithAlternateAnswerPointsEqualToCorrectAnswerPoints('Partial - score for each correct response');
|
133
|
+
|
134
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(60);
|
135
|
+
|
136
|
+
dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(37, 60);
|
137
|
+
|
138
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 37, 12], 12, 60);
|
139
|
+
});
|
140
|
+
});
|