itemengine-cypress-automation 1.0.31 → 1.0.36

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownAdditionalSettings.js +1 -415
  2. package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownAdditionalSettingsBasic.js +423 -0
  3. package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownAllOrNothingScoring.js +48 -0
  4. package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownAutoScoredScoring.js → fillInTheGapsDropdownAllOrNothingScoringWithAlternateAnswer.js} +1 -37
  5. package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownPartialDifferentWeights.js +59 -0
  6. package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownScoringPartialDifferentWeights.js → fillInTheGapsDropdownPartialDifferentWeightsWithAlternateAnswer.js} +1 -47
  7. package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownPartialEqualWeights.js +1 -63
  8. package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownPartialEqualWeightsWithAlternateAnswer.js +73 -0
  9. package/cypress/e2e/ILC/ListMatching/listMatchingAdditionalSettingsAnswerNumerationAndResponseOptionPlacement.js +196 -0
  10. package/cypress/e2e/ILC/ListMatching/listMatchingAdditionalSettingsBasic.js +210 -0
  11. package/cypress/e2e/ILC/ListMatching/listMatchingAdditionalSettingsStemAndResponseColumnHeader.js +206 -0
  12. package/cypress/e2e/ILC/ListMatching/listMatchingAlternateAnswer.js +193 -0
  13. package/cypress/e2e/ILC/ListMatching/listMatchingClickAndDrop.js +644 -0
  14. package/cypress/e2e/ILC/ListMatching/listMatchingEditTabScoringTypes.js +105 -0
  15. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsAllOrNothingScoring.js +117 -0
  16. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsAllOrNothingScoringWithAlternateAnswer.js +30 -0
  17. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsManualAndNonScoredScoring.js +49 -0
  18. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsPartialDifferentScoringWithAlternateTab.js +36 -0
  19. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsPartialDifferentScorings.js +49 -0
  20. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsPartialEqualWeightsScoring.js +48 -0
  21. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsPartialEqualWeightsScoringWithAlternateTab.js +36 -0
  22. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.js +207 -0
  23. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSetCorrectAnswersCheckboxesEditTab.js +139 -0
  24. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSetCorrectAnswersCheckboxesPreviewTab.js +227 -0
  25. package/cypress/e2e/ILC/ListMatching/listMatchingHeaderSection.js +95 -0
  26. package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.js +246 -0
  27. package/cypress/e2e/ILC/ListMatching/listMatchingScoringSectionBasic.js +21 -0
  28. package/cypress/e2e/ILC/ListMatching/listMatchingSetCorrectAnswerSectionBasic.js +40 -0
  29. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsAllOrNothingScoring.js +113 -0
  30. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsAllOrNothingScoringWithAlternateAnswer.js +30 -0
  31. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsManualAndNonScoredScoring.js +48 -0
  32. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsPartialDIfferentScoring.js +49 -0
  33. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsPartialDifferentScoringWithAlternateAnswer.js +36 -0
  34. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsPartialEqualScoring.js +48 -0
  35. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsPartialEqualScoringWithAlternateAnswer.js +35 -0
  36. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSection.js +233 -0
  37. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesEditTab.js +113 -0
  38. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.js +185 -0
  39. package/cypress/e2e/ILC/ListMatching/listMatchingSwitchingCases.js +47 -0
  40. package/cypress/e2e/ILC/ListOrdering/listOrderingAdditionalSettingsAnswerNumerationAndOptionLabel.js +295 -0
  41. package/cypress/e2e/ILC/ListOrdering/listOrderingAdditionalSettingsBasic.js +300 -0
  42. package/cypress/e2e/ILC/ListOrdering/listOrderingAdditionalSettingsOptionStyleDropdown.js +302 -0
  43. package/cypress/e2e/ILC/ListOrdering/listOrderingAdditionalSettingsSetPointsPopup.js +273 -0
  44. package/cypress/e2e/ILC/ListOrdering/listOrderingAllOrNothingScoring.js +178 -0
  45. package/cypress/e2e/ILC/ListOrdering/listOrderingAllOrNothingScoringWithAlternateAnswer.js +712 -0
  46. package/cypress/e2e/ILC/ListOrdering/listOrderingEditTabBasicSection.js +316 -0
  47. package/cypress/e2e/ILC/ListOrdering/listOrderingEditTabScoringSection.js +256 -0
  48. package/cypress/e2e/ILC/ListOrdering/listOrderingHeaderSection.js +83 -0
  49. package/cypress/e2e/ILC/ListOrdering/listOrderingManuallyAndNonScoredScoring.js +160 -0
  50. package/cypress/e2e/ILC/ListOrdering/listOrderingPartialDifferentWeightsScoring.js +191 -0
  51. package/cypress/e2e/ILC/ListOrdering/listOrderingPartialDifferentWeightsScoringWithAlternateAnswer.js +895 -0
  52. package/cypress/e2e/ILC/ListOrdering/listOrderingPartialEqualWeightsScoring.js +191 -0
  53. package/cypress/e2e/ILC/ListOrdering/listOrderingPartialEqualWeightsScoringWithAlternateAnswer.js +807 -0
  54. package/cypress/e2e/ILC/ListOrdering/listOrderingSetCorrectAnswerCheckboxes.js +208 -0
  55. package/cypress/e2e/ILC/ListOrdering/listOrderingSetCorrectAnswerSection.js +172 -0
  56. package/cypress/e2e/ILC/ListSorting/listSortingAdditionalSettings.js +820 -0
  57. package/cypress/e2e/ILC/ListSorting/listSortingAutoScoredScoring.js +936 -0
  58. package/cypress/e2e/ILC/ListSorting/listSortingClickAndDrop.js +456 -0
  59. package/cypress/e2e/ILC/ListSorting/listSortingEditTabBasicSection.js +440 -0
  60. package/cypress/e2e/ILC/ListSorting/listSortingEditTabScoringSection.js +259 -0
  61. package/cypress/e2e/ILC/ListSorting/listSortingHeaderSection.js +89 -0
  62. package/cypress/e2e/ILC/ListSorting/listSortingManuallyAndNonScoredScoring.js +171 -0
  63. package/cypress/e2e/ILC/ListSorting/listSortingPartialDifferentWeightsScoring.js +1150 -0
  64. package/cypress/e2e/ILC/ListSorting/listSortingPartialEqualWeightsScoring.js +1055 -0
  65. package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.js +263 -0
  66. package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerSection.js +168 -0
  67. package/package.json +1 -1
@@ -0,0 +1,206 @@
1
+ import { listMatchingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ describe('List matching - additional settings', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Additional settings: student response area and layout', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ cy.log('Navigate to list matching question type');
15
+ listMatchingPage.steps.navigateToCreateQuestion('list matching');
16
+ cy.barsPreLoaderWait();
17
+ listMatchingPage.steps.expandAdditonalSettings();
18
+ });
19
+
20
+ listMatchingPage.tests.verifyStudentResponseAreaAndLayoutLabelAndCSS();
21
+
22
+ //Note: a11y covered in Additional settings accordion, verifyAdditonalSettingsAccordionProperties
23
+ });
24
+
25
+ describe('Additional settings: stem column header - contents and set correct answer section', () => {
26
+ abortEarlySetup();
27
+ before(() => {
28
+ cy.log('Navigate to list matching question type');
29
+ listMatchingPage.steps.navigateToCreateQuestion('list matching');
30
+ cy.barsPreLoaderWait();
31
+ listMatchingPage.steps.expandAdditonalSettings();
32
+ });
33
+
34
+ it('\'Stem column header\' label and input field should be displayed. By default, the \'Stem column header\' input field should be empty', () => {
35
+ utilities.verifyInnerText(listMatchingPage.stemColumnHeaderLabel(), 'Stem column header');
36
+ utilities.verifyElementVisibilityState(listMatchingPage.stemColumnHeaderLabel(), 'visible');
37
+ utilities.verifyElementVisibilityState(listMatchingPage.stemColumnHeaderInputField(), 'visible');
38
+ listMatchingPage.steps.verifyStemColumnHeaderInputFieldValue('');
39
+ });
40
+
41
+ it('CSS of \'Stem column header\' contents', { tags: 'css' }, () => {
42
+ utilities.verifyCSS(listMatchingPage.stemColumnHeaderLabel(), {
43
+ 'color': css.color.labels,
44
+ 'font-size': css.fontSize.normal,
45
+ 'font-weight': css.fontWeight.semibold
46
+ });
47
+ utilities.verifyCSS(listMatchingPage.stemColumnHeaderInputField(), {
48
+ 'color': css.color.text,
49
+ 'font-size': css.fontSize.default,
50
+ 'font-weight': css.fontWeight.regular
51
+ });
52
+ });
53
+
54
+ //Note: a11y covered in verifyAdditonalSettingsAccordionProperties
55
+
56
+ it('The user should be able to enter any text in the \'Stem column header\' input field', () => {
57
+ listMatchingPage.steps.enterTextInStemColumnHeaderInputField('Stem 1 header');
58
+ listMatchingPage.steps.verifyStemColumnHeaderInputFieldValue('Stem 1 header');
59
+ });
60
+
61
+ it('When the user has entered text in the \'Stem column header\' input field, then it should be displayed as the stem column header in set correct answer section', () => {
62
+ utilities.verifyInnerText(listMatchingPage.stemColumnHeader(), 'Stem 1 header');
63
+ });
64
+
65
+ it('CSS of \'Stem column header\' in set correct answer section', { tags: 'css' }, () => {
66
+ utilities.verifyCSS(listMatchingPage.stemColumnHeader(), {
67
+ 'color': css.color.text,
68
+ 'font-size': css.fontSize.normal,
69
+ 'font-weight': css.fontWeight.semibold
70
+ });
71
+ });
72
+
73
+ it('When the user clears the \'Stem column header\' input field, then the stem column header in set correct answer section should not be displayed', () => {
74
+ listMatchingPage.steps.clearTextInStemColumnHeaderInputField();
75
+ utilities.verifyInnerText(listMatchingPage.stemColumnHeader(), '');
76
+ });
77
+ });
78
+
79
+ describe('Additional settings: stem column header - preview tab', () => {
80
+ abortEarlySetup();
81
+ before(() => {
82
+ cy.log('Navigate to list matching question type');
83
+ listMatchingPage.steps.navigateToCreateQuestion('list matching');
84
+ cy.barsPreLoaderWait();
85
+ listMatchingPage.steps.expandAdditonalSettings();
86
+ });
87
+
88
+ it('When the user has not given any input in the \'Stem column header\' input field, then stem column header should not be displayed in the preview tab', () => {
89
+ listMatchingPage.steps.switchToPreviewTab();
90
+ utilities.verifyInnerText(listMatchingPage.stemColumnHeader(), '');
91
+ });
92
+
93
+ it('When the user gives an input in the \'Stem column header\' input field, then the given input should be displayed as stem column header in the preview tab', () => {
94
+ listMatchingPage.steps.switchToEditTab();
95
+ listMatchingPage.steps.enterTextInStemColumnHeaderInputField('Stem 1 header');
96
+ listMatchingPage.steps.switchToPreviewTab();
97
+ utilities.verifyInnerText(listMatchingPage.stemColumnHeader(), 'Stem 1 header');
98
+ });
99
+
100
+ it('CSS of \'Stem column header\' in preview tab', { tags: 'css' }, () => {
101
+ utilities.verifyCSS(listMatchingPage.stemColumnHeader(), {
102
+ 'color': css.color.text,
103
+ 'font-size': css.fontSize.normal,
104
+ 'font-weight': css.fontWeight.semibold
105
+ });
106
+ });
107
+
108
+ it('When user clears the \'Stem column header\' input field, then the stem column header should not be displayed in preview tab', () => {
109
+ listMatchingPage.steps.switchToEditTab();
110
+ listMatchingPage.steps.clearTextInStemColumnHeaderInputField();
111
+ listMatchingPage.steps.switchToPreviewTab();
112
+ utilities.verifyInnerText(listMatchingPage.stemColumnHeader(), '');
113
+ });
114
+ });
115
+
116
+ describe('Additional settings: response column header - contents and set correct answer section', () => {
117
+ abortEarlySetup();
118
+ before(() => {
119
+ cy.log('Navigate to list matching question type');
120
+ listMatchingPage.steps.navigateToCreateQuestion('list matching');
121
+ cy.barsPreLoaderWait();
122
+ listMatchingPage.steps.expandAdditonalSettings();
123
+ });
124
+
125
+ it('\'Response column header\' label and input field should be displayed. By default, the \'Response column header\' input field should be empty', () => {
126
+ utilities.verifyInnerText(listMatchingPage.ResponseColumnHeaderLabel(), 'Response column header');
127
+ utilities.verifyElementVisibilityState(listMatchingPage.ResponseColumnHeaderLabel(), 'visible');
128
+ utilities.verifyElementVisibilityState(listMatchingPage.ResponseColumnHeaderInputField(), 'visible');
129
+ listMatchingPage.steps.verifyResponseColumnHeaderInputFieldValue('');
130
+ });
131
+
132
+ it('CSS of \'Response column header\' contents', { tags: 'css' }, () => {
133
+ utilities.verifyCSS(listMatchingPage.ResponseColumnHeaderLabel(), {
134
+ 'color': css.color.labels,
135
+ 'font-size': css.fontSize.normal,
136
+ 'font-weight': css.fontWeight.semibold
137
+ });
138
+ utilities.verifyCSS(listMatchingPage.ResponseColumnHeaderInputField(), {
139
+ 'color': css.color.text,
140
+ 'font-size': css.fontSize.default,
141
+ 'font-weight': css.fontWeight.regular
142
+ });
143
+ });
144
+
145
+ //Note: a11y covered in verifyAdditonalSettingsAccordionProperties
146
+
147
+ it('The user should be able to enter any text in the \'Response column header\' input field', () => {
148
+ listMatchingPage.steps.enterTextInResponseColumnHeaderInputField('Response 1 header');
149
+ listMatchingPage.steps.verifyResponseColumnHeaderInputFieldValue('Response 1 header');
150
+ });
151
+
152
+ it('When the user has entered text in the \'Response column header\' input field, then it should be displayed as the stem column header in set correct answer section', () => {
153
+ utilities.verifyInnerText(listMatchingPage.responseColumnHeader(), 'Response 1 header');
154
+ });
155
+
156
+ it('CSS of \'Response column header\' in set correct answer section', { tags: 'css' }, () => {
157
+ utilities.verifyCSS(listMatchingPage.responseColumnHeader(), {
158
+ 'color': css.color.text,
159
+ 'font-size': css.fontSize.normal,
160
+ 'font-weight': css.fontWeight.semibold
161
+ });
162
+ });
163
+
164
+ it('When the user clears the \'Response column header\' input field, then the stem column header in set correct answer section should not be displayed', () => {
165
+ listMatchingPage.steps.clearTextInResponseColumnHeaderInputField();
166
+ utilities.verifyInnerText(listMatchingPage.responseColumnHeader(), '');
167
+ });
168
+ });
169
+
170
+ describe('Additional settings: response column header - preview tab', () => {
171
+ abortEarlySetup();
172
+ before(() => {
173
+ cy.log('Navigate to list matching question type');
174
+ listMatchingPage.steps.navigateToCreateQuestion('list matching');
175
+ cy.barsPreLoaderWait();
176
+ listMatchingPage.steps.expandAdditonalSettings();
177
+ });
178
+
179
+ it('When the user has not given any input in the \'Response column header\' input field, then response column header should not be displayed in the preview tab', () => {
180
+ listMatchingPage.steps.switchToPreviewTab();
181
+ utilities.verifyInnerText(listMatchingPage.responseColumnHeader(), '');
182
+ });
183
+
184
+ it('When the user gives an input in the \'Response column header\' input field, then the given input should be displayed as response column header in the preview tab', () => {
185
+ listMatchingPage.steps.switchToEditTab();
186
+ listMatchingPage.steps.enterTextInResponseColumnHeaderInputField('Response 1 header');
187
+ listMatchingPage.steps.switchToPreviewTab();
188
+ utilities.verifyInnerText(listMatchingPage.responseColumnHeader(), 'Response 1 header');
189
+ });
190
+
191
+ it('CSS of \'Response column header\' in preview tab', { tags: 'css' }, () => {
192
+ utilities.verifyCSS(listMatchingPage.responseColumnHeader(), {
193
+ 'color': css.color.text,
194
+ 'font-size': css.fontSize.normal,
195
+ 'font-weight': css.fontWeight.semibold
196
+ });
197
+ });
198
+
199
+ it('When user clears the \'Response column header\' input field, then the response column header should not be displayed in preview tab', () => {
200
+ listMatchingPage.steps.switchToEditTab();
201
+ listMatchingPage.steps.clearTextInResponseColumnHeaderInputField();
202
+ listMatchingPage.steps.switchToPreviewTab();
203
+ utilities.verifyInnerText(listMatchingPage.responseColumnHeader(), '');
204
+ });
205
+ });
206
+ });
@@ -0,0 +1,193 @@
1
+ import { listMatchingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ const css = Cypress.env('css');
4
+
5
+ let optionsForThreeResponses = ['Correct answer for stem 1', 'Correct answer for stem 2', 'Correct answer for stem 3'];
6
+
7
+ describe('Create Item Page: List matching: Edit tab scoring types and set correct answer section for Alternate answer tab', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Alternate answer tab', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ listMatchingPage.steps.navigateToCreateQuestion('list matching');
16
+ cy.barsPreLoaderWait();
17
+ listMatchingPage.steps.addInputToOptionsForDragAndDropFields(optionsForThreeResponses);
18
+ });
19
+
20
+ listMatchingPage.tests.verifyAutoScoredAlternateAnswer();
21
+
22
+ 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', () => {
23
+ listMatchingPage.steps.allotPoints(20);
24
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 1', 0);
25
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 2', 1);
26
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 3', 2);
27
+ listMatchingPage.steps.addAlternateTab(1);
28
+ });
29
+
30
+ it('When the user has added an alternate tab, the alternate tab should be displayed in active state', () => {
31
+ listMatchingPage.steps.verifyActiveStateOfAlternateTab(1);
32
+ });
33
+
34
+ it('CSS of alternate tab in active state', { tags: 'css' }, () => {
35
+ listMatchingPage.alternateAnswerTab(1)
36
+ .verifyCSS(css.color.secondaryBtnActive, css.fontSize.default, css.fontWeight.bold)
37
+ .parents('.ngie-tablist-tab-wrapper')
38
+ .find('[class*="MuiTabs-indicator"]')
39
+ .should('have.css', 'background-color', `${css.color.secondaryBtnActive}`);
40
+ });
41
+
42
+ listMatchingPage.tests.verifyA11yOfAlternateAnswerTab();
43
+
44
+ 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.', () => {
45
+ listMatchingPage.steps.navigateToCorrectTab();
46
+ listMatchingPage.steps.allFieldsRequiredWarningPopupContents();
47
+ listMatchingPage.steps.closeWarningPopup();
48
+ listMatchingPage.steps.verifyActiveStateOfAlternateTab(1);
49
+ });
50
+
51
+ it('When the user fills all the mandatory fields in the alternate tab, then user should be able to switch to correct tab', () => {
52
+ cy.log('Set correct answer and points in alternate 1 tab, then switching to Correct tab');
53
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 1', 0);
54
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 2', 1);
55
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 3', 2);
56
+ listMatchingPage.steps.allotPoints(4);
57
+ listMatchingPage.steps.navigateToCorrectTab();
58
+ cy.log('Verifying the points and answers set in the correct tab')
59
+ optionsForThreeResponses.forEach((responseText, count) => {
60
+ listMatchingPage.setCorrectAnswerStemResponseArea()
61
+ .eq(count)
62
+ .verifyInnerText(responseText);
63
+ });
64
+ listMatchingPage.steps.verifyPointsFieldValue(20);
65
+ });
66
+
67
+ 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\'', () => {
68
+ listMatchingPage.steps.addAlternateTab(2);
69
+ });
70
+
71
+ 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', () => {
72
+ let optionsSetInAlternateTab2 = ['Correct answer for stem 3', 'Correct answer for stem 1', 'Correct answer for stem 2',];
73
+ cy.log('Set correct answer and points in alternate 2 tab, then switching to alternate tab 1');
74
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 1', 1);
75
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 2', 2);
76
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 3', 0);
77
+ listMatchingPage.steps.allotPoints(2);
78
+ listMatchingPage.steps.navigateToAlternateTab(1);
79
+ listMatchingPage.steps.deleteAlternateTab();
80
+ listMatchingPage.alternateAnswerTab(2)
81
+ .should('not.exist');
82
+ listMatchingPage.alternateAnswerTab(1)
83
+ .verifyInnerText('Alternate 1');
84
+ cy.log('verifying the points and correct answer of the alternate tab')
85
+ optionsSetInAlternateTab2.forEach((responseText, count) => {
86
+ listMatchingPage.setCorrectAnswerStemResponseArea()
87
+ .eq(count)
88
+ .verifyInnerText(responseText);
89
+ });
90
+ listMatchingPage.steps.verifyPointsFieldValue(2);
91
+ });
92
+ });
93
+
94
+ describe('Edit tab \'Set correct answer\' section for Alternate answer tab and \'Scoring\' for Auto-scored: All or Nothing scoring type', () => {
95
+ abortEarlySetup();
96
+ before(() => {
97
+ cy.log('Navigate to list matching question type');
98
+ listMatchingPage.steps.navigateToCreateQuestion('list matching');
99
+ cy.barsPreLoaderWait();
100
+ cy.log('Adding options, allotting points and setting correct answers in response areas of correct tab')
101
+ listMatchingPage.steps.addInputToOptionsForDragAndDropFields(optionsForThreeResponses);
102
+ listMatchingPage.steps.allotPoints(10);
103
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 1', 0);
104
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 2', 1);
105
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 3', 2);
106
+ cy.log('adding alternate tab')
107
+ listMatchingPage.steps.addAlternateTab(1);
108
+ });
109
+
110
+ listMatchingPage.tests.verifyAutoScoredAllOrNothingPointsAndMinimumScoreAwardedLabelAndInputField();
111
+
112
+ listMatchingPage.tests.verifyDefaultStemFieldsAndResponseAreasInSetCorrectAnswerSection();
113
+
114
+ listMatchingPage.tests.verifyOptionsInAlternateTab();
115
+
116
+ listMatchingPage.tests.verifyPointsFieldErrorState(10);
117
+
118
+ listMatchingPage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 20, 10);
119
+ });
120
+
121
+ describe('Edit tab \'Set correct answer\' section for Alternate answer tab and \'Scoring\' for Auto-scored: Partial equal weights scoring type', () => {
122
+ abortEarlySetup();
123
+ before(() => {
124
+ cy.log('Navigate to list matching question type');
125
+ listMatchingPage.steps.navigateToCreateQuestion('list matching');
126
+ cy.barsPreLoaderWait();
127
+ cy.log('Adding options, allotting points and setting correct answers in response areas of correct tab')
128
+ listMatchingPage.steps.addInputToOptionsForDragAndDropFields(optionsForThreeResponses);
129
+ listMatchingPage.steps.allotPoints(10);
130
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 1', 0);
131
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 2', 1);
132
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 3', 2);
133
+ cy.log('adding alternate tab')
134
+ listMatchingPage.steps.addAlternateTab(1);
135
+ });
136
+
137
+ listMatchingPage.tests.verifyAutoScoredPartialEqualWeightsScoringEditTabContents();
138
+
139
+ listMatchingPage.tests.verifyOptionsInAlternateTab();
140
+
141
+ listMatchingPage.tests.verifyDefaultStemFieldsAndResponseAreasInSetCorrectAnswerSection();
142
+
143
+ listMatchingPage.tests.verifyAutoScoredPartialEqualWeightsScoringEditTabFunctionality();
144
+ });
145
+
146
+ describe('Edit tab \'Set correct answer\' section for Alternate answer tab and \'Scoring\' for Auto-scored: Partial different weights scoring type', () => {
147
+ abortEarlySetup();
148
+ before(() => {
149
+ cy.log('Navigate to list matching question type');
150
+ listMatchingPage.steps.navigateToCreateQuestion('list matching');
151
+ cy.barsPreLoaderWait();
152
+ cy.log('Adding options, allotting points and setting correct answers in response areas of correct tab')
153
+ listMatchingPage.steps.addInputToOptionsForDragAndDropFields(optionsForThreeResponses);
154
+ listMatchingPage.steps.allotPoints(10);
155
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 1', 0);
156
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 2', 1);
157
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 3', 2);
158
+ cy.log('adding alternate tab')
159
+ listMatchingPage.steps.addAlternateTab(1);
160
+ });
161
+
162
+ listMatchingPage.tests.verifyAutoScoredPartialDifferentWeightsScoringEditTabContents();
163
+
164
+ listMatchingPage.tests.verifyOptionsInAlternateTab();
165
+
166
+ listMatchingPage.tests.verifyDefaultStemFieldsAndResponseAreasInSetCorrectAnswerSection();
167
+
168
+ listMatchingPage.tests.verifyAutoScoredPartialDifferentWeightsScoringEditTabFunctionality();
169
+ });
170
+
171
+ describe('Edit tab \'Set correct answer\' section for Alternate answer tab and \'Scoring\' for Non Scored scoring type', () => {
172
+ abortEarlySetup();
173
+ before(() => {
174
+ cy.log('Navigate to list matching question type');
175
+ listMatchingPage.steps.navigateToCreateQuestion('list matching');
176
+ cy.barsPreLoaderWait();
177
+ cy.log('Adding options, allotting points and setting correct answers in response areas of correct tab')
178
+ listMatchingPage.steps.addInputToOptionsForDragAndDropFields(optionsForThreeResponses);
179
+ listMatchingPage.steps.allotPoints(10);
180
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 1', 0);
181
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 2', 1);
182
+ listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 3', 2);
183
+ cy.log('adding alternate tab')
184
+ listMatchingPage.steps.addAlternateTab(1);
185
+ });
186
+
187
+ listMatchingPage.tests.verifyEditTabNonScoredScoringSectionContents();
188
+
189
+ listMatchingPage.tests.verifyOptionsInAlternateTab();
190
+
191
+ listMatchingPage.tests.verifyDefaultStemFieldsAndResponseAreasInSetCorrectAnswerSection();
192
+ });
193
+ });