itemengine-cypress-automation 1.0.580-IEI-7040-99ff48c.0 → 1.0.580-IEI-7178-01aa1cc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +11 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +11 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +11 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingWeightsBasic.js +7 -7
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +3 -3
- package/cypress/pages/shortTextResponsePage.js +35 -7
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { shortTextResponsePage } from "../../../../pages/shortTextResponsePage";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
const css = Cypress.env('css');
|
|
4
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
4
5
|
|
|
5
6
|
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
6
7
|
before(() => {
|
|
@@ -24,7 +25,11 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
24
25
|
it('When the user selects \'Grading\' view without attempting the question, correct/incorrect icons should not be displayed and answer input field should have incorrect answer border and correct answer section should be displayed below response input field', () => {
|
|
25
26
|
shortTextResponsePage.steps.switchToGradingView();
|
|
26
27
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
27
|
-
|
|
28
|
+
if (alternativeAnswerCheck) {
|
|
29
|
+
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Fossil fuel combustion', 20, 'Buildings', 10);
|
|
30
|
+
} else {
|
|
31
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
32
|
+
}
|
|
28
33
|
shortTextResponsePage.steps.switchToStudentView();
|
|
29
34
|
});
|
|
30
35
|
|
|
@@ -56,7 +61,11 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
56
61
|
shortTextResponsePage.steps.switchToGradingView();
|
|
57
62
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
58
63
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
59
|
-
|
|
64
|
+
if (alternativeAnswerCheck) {
|
|
65
|
+
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Fossil fuel combustion', 20, 'Buildings', 10);
|
|
66
|
+
} else {
|
|
67
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
68
|
+
}
|
|
60
69
|
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
61
70
|
});
|
|
62
71
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { shortTextResponsePage } from "../../../../pages/shortTextResponsePage";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
const css = Cypress.env('css');
|
|
4
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
4
5
|
|
|
5
6
|
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
6
7
|
before(() => {
|
|
@@ -24,7 +25,11 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
24
25
|
it('When the user switches to \'Grading\' view without attempting the question, then incorrect border and correct answer section should be displayed', () => {
|
|
25
26
|
shortTextResponsePage.steps.switchToGradingView();
|
|
26
27
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
27
|
-
|
|
28
|
+
if (alternativeAnswerCheck) {
|
|
29
|
+
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 20);
|
|
30
|
+
} else {
|
|
31
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
32
|
+
}
|
|
28
33
|
shortTextResponsePage.steps.switchToStudentView();
|
|
29
34
|
});
|
|
30
35
|
|
|
@@ -56,7 +61,11 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
56
61
|
shortTextResponsePage.steps.switchToGradingView();
|
|
57
62
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
58
63
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
59
|
-
|
|
64
|
+
if (alternativeAnswerCheck) {
|
|
65
|
+
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 20);
|
|
66
|
+
} else {
|
|
67
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
68
|
+
}
|
|
60
69
|
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
61
70
|
});
|
|
62
71
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { shortTextResponsePage } from "../../../../pages/shortTextResponsePage";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
const css = Cypress.env('css');
|
|
4
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
4
5
|
|
|
5
6
|
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
6
7
|
before(() => {
|
|
@@ -25,7 +26,11 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
25
26
|
shortTextResponsePage.steps.switchToGradingView();
|
|
26
27
|
shortTextResponsePage.steps.verifyCorrectIncorrectIconNotVisibleGradingView();
|
|
27
28
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
28
|
-
|
|
29
|
+
if (alternativeAnswerCheck) {
|
|
30
|
+
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 10);
|
|
31
|
+
} else {
|
|
32
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
33
|
+
}
|
|
29
34
|
shortTextResponsePage.steps.switchToStudentView();
|
|
30
35
|
});
|
|
31
36
|
|
|
@@ -61,7 +66,11 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
61
66
|
shortTextResponsePage.steps.switchToGradingView();
|
|
62
67
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
63
68
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
64
|
-
|
|
69
|
+
if (alternativeAnswerCheck) {
|
|
70
|
+
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 10);
|
|
71
|
+
} else {
|
|
72
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
73
|
+
}
|
|
65
74
|
});
|
|
66
75
|
|
|
67
76
|
shortTextResponsePage.tests.verifyIncorrectAnswerLabelAndBorderCSSAndA11y('short text response');
|
|
@@ -21,7 +21,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
21
21
|
it('When the user switches to \'Grading\' view without attempting the question, then incorrect border and correct answer section should not be displayed', () => {
|
|
22
22
|
shortTextResponsePage.steps.switchToGradingView();
|
|
23
23
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
24
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
24
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
25
25
|
shortTextResponsePage.steps.switchToStudentView();
|
|
26
26
|
});
|
|
27
27
|
|
|
@@ -42,7 +42,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
42
42
|
shortTextResponsePage.steps.switchToGradingView();
|
|
43
43
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
44
44
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
45
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
45
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
46
46
|
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
47
47
|
});
|
|
48
48
|
});
|
|
@@ -67,7 +67,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
67
67
|
shortTextResponsePage.steps.switchToGradingView();
|
|
68
68
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
69
69
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
70
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
70
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
71
71
|
|
|
72
72
|
});
|
|
73
73
|
|
|
@@ -80,7 +80,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
80
80
|
shortTextResponsePage.steps.switchToGradingView();
|
|
81
81
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
82
82
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
83
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
83
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
it('When the user attempts the question correctly, then the user should be awarded 20 points and on switching to \'Grading\' view, correct icon should be displayed beside response input field, correct answer border should be displayed in question preview', () => {
|
|
@@ -112,7 +112,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
112
112
|
shortTextResponsePage.steps.verifyPreviewScore(5, 20);
|
|
113
113
|
shortTextResponsePage.steps.switchToGradingView();
|
|
114
114
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
115
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
115
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
it('When the user sets minimum scoring to \'Award minimum score\', allots minimum points and attempts the question incorrectly, then the user should be awarded with minimum points', () => {
|
|
@@ -121,7 +121,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
121
121
|
shortTextResponsePage.steps.switchToGradingView();
|
|
122
122
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
123
123
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
124
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
124
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
125
125
|
});
|
|
126
126
|
|
|
127
127
|
it('When the user sets minimum scoring to \'Award minimum score\', allots minimum points and attempts the question correctly, then the user should be awarded with 20 points', () => {
|
|
@@ -149,7 +149,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
149
149
|
shortTextResponsePage.steps.switchToGradingView();
|
|
150
150
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
151
151
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
152
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
152
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
153
153
|
});
|
|
154
154
|
|
|
155
155
|
it('When the user sets minimum scoring to \'Award minimum score only if attempted\', allots minimum points and attempts the question correctly, then the user should be awarded with 20 points', () => {
|
|
@@ -7,6 +7,7 @@ let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
|
|
7
7
|
const views = utilities.getViews(correctAnswerViews);
|
|
8
8
|
const css = Cypress.env('css');
|
|
9
9
|
var itemReferenceID = "";
|
|
10
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
10
11
|
|
|
11
12
|
describe('Create item page - Short text response: All or nothing', () => {
|
|
12
13
|
before(() => {
|
|
@@ -110,7 +111,7 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
|
110
111
|
}
|
|
111
112
|
//Need to remove comment once https://redmine.zeuslearning.com/issues/576511 is resolved
|
|
112
113
|
// shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
113
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
114
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
114
115
|
});
|
|
115
116
|
|
|
116
117
|
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides incorrect response, incorrect answer border around response field and correct answer should be displayed in the question preview', () => {
|
|
@@ -120,7 +121,7 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
|
120
121
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
121
122
|
studentViewPage.steps.clickOnGoToGradingViewButton()
|
|
122
123
|
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
123
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
124
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings', 20);
|
|
124
125
|
}
|
|
125
126
|
if (view === 'Question preview' || view === 'Item preview') {
|
|
126
127
|
shortTextResponsePage.steps.switchToGradingView();
|
|
@@ -281,7 +282,6 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
|
281
282
|
shortTextResponsePage.steps.checkNonScoredScoringLabel();
|
|
282
283
|
shortTextResponsePage.steps.switchToGradingView();
|
|
283
284
|
};
|
|
284
|
-
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'Correct answer:');
|
|
285
285
|
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Urbanization');
|
|
286
286
|
});
|
|
287
287
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel, acceptedStudentInputComponent, studentViewSettingsLabelComponent, customizeSpecialCharacterComponent, studentResponseAndLayoutComponent, printPreviewComponent } from "./components/";
|
|
1
|
+
import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel, acceptedStudentInputComponent, studentViewSettingsLabelComponent, customizeSpecialCharacterComponent, studentResponseAndLayoutComponent, printPreviewComponent, showAlternativeAnswersComponent } from "./components/";
|
|
2
2
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
3
3
|
import utilities from "../support/helpers/utilities";
|
|
4
4
|
import { createItemPage } from "./createItemPage";
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
6
7
|
|
|
7
8
|
const selectors = {
|
|
8
9
|
...questionInstructionsComponent,
|
|
@@ -18,6 +19,7 @@ const selectors = {
|
|
|
18
19
|
...createQuestionBasePage,
|
|
19
20
|
...printPreviewComponent,
|
|
20
21
|
...autoScoredScoringSectionMultiResponseType,
|
|
22
|
+
...showAlternativeAnswersComponent,
|
|
21
23
|
|
|
22
24
|
answerLabelSpecifyCorrectAnswerSection: () => cy.get('.answer-label'),
|
|
23
25
|
displayCharacterCountLabel: () => cy.get('[data-ngie-testid="display-character-count-checkbox"] .MuiFormControlLabel-label'),
|
|
@@ -65,7 +67,13 @@ const selectors = {
|
|
|
65
67
|
//Preview tab
|
|
66
68
|
previewTabResponseField: () => cy.get('.input-field input:visible'),
|
|
67
69
|
previewTabResponseFieldWrapper: () => cy.get('.input-wrapper:visible'),
|
|
68
|
-
previewTabCorrectAnswerWrapper: () =>
|
|
70
|
+
previewTabCorrectAnswerWrapper: () => {
|
|
71
|
+
if (alternativeAnswerCheck) {
|
|
72
|
+
return cy.get('[class*="CorrectAnswerSectionstyle__CorrectAnswerLabelWrapper"]');
|
|
73
|
+
} else {
|
|
74
|
+
return cy.get('[class*="ShortTextResponsestyles__CorrectAnswerWrapper"]');
|
|
75
|
+
}
|
|
76
|
+
},
|
|
69
77
|
previewTabCorrectAnswerLabel: () => cy.get('[class*="ShortTextResponsestyles__CorrectAnswerLabel"]'),
|
|
70
78
|
previewTabCorrectAnswerResponse: () => cy.get('[class*="ShortTextResponsestyles__CorrectAnswerValueWrapper"]'),
|
|
71
79
|
responseFieldCountPreviewTab: () => cy.get('[class*="InputLimitLabelWrapper"]'),
|
|
@@ -127,6 +135,7 @@ const steps = {
|
|
|
127
135
|
...createItemPage.steps,
|
|
128
136
|
...printPreviewComponent.steps,
|
|
129
137
|
...autoScoredScoringSectionMultiResponseType.steps,
|
|
138
|
+
...showAlternativeAnswersComponent.steps,
|
|
130
139
|
|
|
131
140
|
verifyCorrectIcon: () => {
|
|
132
141
|
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
|
|
@@ -149,7 +158,7 @@ const steps = {
|
|
|
149
158
|
|
|
150
159
|
verifyIncorrectAttemptBorder: () => {
|
|
151
160
|
utilities.verifyCSS(shortTextResponsePage.previewTabResponseField().parent().find('fieldset'), {
|
|
152
|
-
'border': `
|
|
161
|
+
'border': `0.8px solid ${css.color.incorrectAnswer}`
|
|
153
162
|
});
|
|
154
163
|
},
|
|
155
164
|
|
|
@@ -165,14 +174,33 @@ const steps = {
|
|
|
165
174
|
* @param {String} correctAnswer correct answer in correct answer wrapper present in grading view
|
|
166
175
|
* @description function verifies correct answer wrapper in grading view
|
|
167
176
|
*/
|
|
168
|
-
verifyCorrectAnswerResponseInCorrectAnswerWrapper: (correctAnswer) => {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
177
|
+
verifyCorrectAnswerResponseInCorrectAnswerWrapper: (correctAnswer, correctAnswerPoints = '') => {
|
|
178
|
+
if (alternativeAnswerCheck) {
|
|
179
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerWrapper(), 'visible');
|
|
180
|
+
(correctAnswerPoints !== '') && shortTextResponsePage.steps.verifyCorrectAnswersLabelAndPointVisible(`(${correctAnswerPoints} points)`);
|
|
181
|
+
} else {
|
|
182
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerWrapper(), 'visible');
|
|
183
|
+
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'Correct answer:');
|
|
184
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'visible');
|
|
185
|
+
}
|
|
172
186
|
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerResponse(), correctAnswer);
|
|
173
187
|
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerResponse(), 'visible');
|
|
174
188
|
},
|
|
175
189
|
|
|
190
|
+
verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper: (correctAnswer, correctAnswerPoints, alternateAnswer, alternateAnswerPoints) => {
|
|
191
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerWrapper(), 'visible');
|
|
192
|
+
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerResponse().eq(0), correctAnswer);
|
|
193
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerResponse().eq(0), 'visible');
|
|
194
|
+
shortTextResponsePage.steps.verifyCorrectAnswersLabelAndPointVisible(`(${correctAnswerPoints} points)`);
|
|
195
|
+
shortTextResponsePage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
196
|
+
shortTextResponsePage.steps.disableShowAlternativeAnswersToggle();
|
|
197
|
+
shortTextResponsePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
198
|
+
shortTextResponsePage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
199
|
+
shortTextResponsePage.steps.clickShowAlternativeAnswersToggle();
|
|
200
|
+
shortTextResponsePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, `(${alternateAnswerPoints} points)`);
|
|
201
|
+
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerResponse().eq(1), alternateAnswer);
|
|
202
|
+
},
|
|
203
|
+
|
|
176
204
|
enterTextInShortTextResponseInputField: (correctAnswer) => {
|
|
177
205
|
shortTextResponsePage.setCorrectAnswerResponseField()
|
|
178
206
|
.type(correctAnswer)
|