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.
- 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/cypress/e2e/ILC/ListMatching/listMatchingAdditionalSettingsAnswerNumerationAndResponseOptionPlacement.js +196 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingAdditionalSettingsBasic.js +210 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingAdditionalSettingsStemAndResponseColumnHeader.js +206 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingAlternateAnswer.js +193 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingClickAndDrop.js +644 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingEditTabScoringTypes.js +105 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsAllOrNothingScoring.js +117 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsAllOrNothingScoringWithAlternateAnswer.js +30 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsManualAndNonScoredScoring.js +49 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsPartialDifferentScoringWithAlternateTab.js +36 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsPartialDifferentScorings.js +49 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsPartialEqualWeightsScoring.js +48 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsPartialEqualWeightsScoringWithAlternateTab.js +36 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.js +207 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSetCorrectAnswersCheckboxesEditTab.js +139 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSetCorrectAnswersCheckboxesPreviewTab.js +227 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingHeaderSection.js +95 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.js +246 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingScoringSectionBasic.js +21 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingSetCorrectAnswerSectionBasic.js +40 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsAllOrNothingScoring.js +113 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsAllOrNothingScoringWithAlternateAnswer.js +30 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsManualAndNonScoredScoring.js +48 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsPartialDIfferentScoring.js +49 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsPartialDifferentScoringWithAlternateAnswer.js +36 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsPartialEqualScoring.js +48 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsPartialEqualScoringWithAlternateAnswer.js +35 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSection.js +233 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesEditTab.js +113 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.js +185 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingSwitchingCases.js +47 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingAdditionalSettingsAnswerNumerationAndOptionLabel.js +295 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingAdditionalSettingsBasic.js +300 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingAdditionalSettingsOptionStyleDropdown.js +302 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingAdditionalSettingsSetPointsPopup.js +273 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingAllOrNothingScoring.js +178 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingAllOrNothingScoringWithAlternateAnswer.js +712 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingEditTabBasicSection.js +316 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingEditTabScoringSection.js +256 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingHeaderSection.js +83 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingManuallyAndNonScoredScoring.js +160 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingPartialDifferentWeightsScoring.js +191 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingPartialDifferentWeightsScoringWithAlternateAnswer.js +895 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingPartialEqualWeightsScoring.js +191 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingPartialEqualWeightsScoringWithAlternateAnswer.js +807 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingSetCorrectAnswerCheckboxes.js +208 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingSetCorrectAnswerSection.js +172 -0
- package/cypress/e2e/ILC/ListSorting/listSortingAdditionalSettings.js +820 -0
- package/cypress/e2e/ILC/ListSorting/listSortingAutoScoredScoring.js +936 -0
- package/cypress/e2e/ILC/ListSorting/listSortingClickAndDrop.js +456 -0
- package/cypress/e2e/ILC/ListSorting/listSortingEditTabBasicSection.js +440 -0
- package/cypress/e2e/ILC/ListSorting/listSortingEditTabScoringSection.js +259 -0
- package/cypress/e2e/ILC/ListSorting/listSortingHeaderSection.js +89 -0
- package/cypress/e2e/ILC/ListSorting/listSortingManuallyAndNonScoredScoring.js +171 -0
- package/cypress/e2e/ILC/ListSorting/listSortingPartialDifferentWeightsScoring.js +1150 -0
- package/cypress/e2e/ILC/ListSorting/listSortingPartialEqualWeightsScoring.js +1055 -0
- package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.js +263 -0
- package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerSection.js +168 -0
- package/package.json +1 -1
@@ -4,7 +4,7 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
4
|
let optionsForResponse1 = ['Correct answer 1', 'Alternate correct answer 1', 'Incorrect answer 1', 'Incorrect answer 2'];
|
5
5
|
let optionsForResponse2 = ['Correct answer 2', 'Alternate correct answer 2', 'Incorrect answer 1', 'Incorrect answer 2'];
|
6
6
|
|
7
|
-
describe('Fill in the gaps - dropdown
|
7
|
+
describe('Fill in the gaps - dropdown: Partial - equal weights scoring', () => {
|
8
8
|
before(() => {
|
9
9
|
cy.loginAs('admin');
|
10
10
|
})
|
@@ -33,68 +33,6 @@ describe('Fill in the gaps - dropdown scoring section partial - equal weights',
|
|
33
33
|
fillInTheGapsScoring.tests.verifyAutoScoredPartialEqualWeightsScoring('fill in the gaps - dropdown')
|
34
34
|
});
|
35
35
|
|
36
|
-
describe('Question preview: Partial - equal weights with alternate answer and match from all responses - \"false\"', () => {
|
37
|
-
abortEarlySetup();
|
38
|
-
before(() => {
|
39
|
-
cy.log('Navigate to fill in the gaps - dropdown question type, adding correct answer responses and alternate answer responses, adding points and switch to preview tab');
|
40
|
-
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
41
|
-
cy.barsPreLoaderWait();
|
42
|
-
fillInTheGapsDropdownPage.steps.addResponseTokenInQuestionField();
|
43
|
-
fillInTheGapsDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
|
44
|
-
fillInTheGapsDropdownPage.steps.addInputToResponseOptionFields(1, optionsForResponse2);
|
45
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'Correct answer 1');
|
46
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'Correct answer 2');
|
47
|
-
fillInTheGapsDropdownPage.steps.allotPoints('10');
|
48
|
-
fillInTheGapsDropdownPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
49
|
-
fillInTheGapsDropdownPage.alternateAnswerButton()
|
50
|
-
.click();
|
51
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'Alternate correct answer 1');
|
52
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'Alternate correct answer 2');
|
53
|
-
fillInTheGapsDropdownPage.steps.allotPoints('6');
|
54
|
-
fillInTheGapsDropdownPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
55
|
-
fillInTheGapsDropdownPage.partialEqualWeightsCheckbox()
|
56
|
-
.click();
|
57
|
-
fillInTheGapsDropdownPage.steps.expandAdditonalSettings();
|
58
|
-
fillInTheGapsDropdownPage.allowStudentsToCheckAnswerCheckbox()
|
59
|
-
.click();
|
60
|
-
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
61
|
-
});
|
62
|
-
|
63
|
-
fillInTheGapsScoring.tests.verifyAutoScoredPartialEqualWeightsWithAlternateAnswerAndMatchFromAllResponsesFalse('fill in the gaps - dropdown')
|
64
|
-
});
|
65
|
-
|
66
|
-
describe('Question preview: Partial - equal weights with alternate answer and match from all responses - \"true\"', () => {
|
67
|
-
abortEarlySetup();
|
68
|
-
before(() => {
|
69
|
-
cy.log('Navigate to fill in the gaps - dropdown question type, adding correct answer responses and alternate answer responses and points for both correct and alternate answer');
|
70
|
-
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
71
|
-
cy.barsPreLoaderWait();
|
72
|
-
fillInTheGapsDropdownPage.steps.addResponseTokenInQuestionField();
|
73
|
-
fillInTheGapsDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
|
74
|
-
fillInTheGapsDropdownPage.steps.addInputToResponseOptionFields(1, optionsForResponse2);
|
75
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'Correct answer 1');
|
76
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'Correct answer 2');
|
77
|
-
fillInTheGapsDropdownPage.steps.allotPoints('10');
|
78
|
-
fillInTheGapsDropdownPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
79
|
-
fillInTheGapsDropdownPage.alternateAnswerButton()
|
80
|
-
.click();
|
81
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'Alternate correct answer 1');
|
82
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'Alternate correct answer 2');
|
83
|
-
fillInTheGapsDropdownPage.steps.allotPoints('6');
|
84
|
-
fillInTheGapsDropdownPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
85
|
-
fillInTheGapsDropdownPage.matchFromAllResponsesCheckbox()
|
86
|
-
.click();
|
87
|
-
fillInTheGapsDropdownPage.partialEqualWeightsCheckbox()
|
88
|
-
.click();
|
89
|
-
fillInTheGapsDropdownPage.steps.expandAdditonalSettings();
|
90
|
-
fillInTheGapsDropdownPage.allowStudentsToCheckAnswerCheckbox()
|
91
|
-
.click();
|
92
|
-
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
93
|
-
});
|
94
|
-
|
95
|
-
fillInTheGapsScoring.tests.verifyAutoScoredPartialEqualWeightsWithAlternateAnswerAndMatchFromAllResponsesTrue('fill in the gaps - dropdown')
|
96
|
-
});
|
97
|
-
|
98
36
|
describe('Partial Equal Weights: Round down score', () => {
|
99
37
|
abortEarlySetup();
|
100
38
|
before(() => {
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import { fillInTheGapsDropdownPage, fillInTheGapsScoring } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
let optionsForResponse1 = ['Correct answer 1', 'Alternate correct answer 1', 'Incorrect answer 1', 'Incorrect answer 2'];
|
5
|
+
let optionsForResponse2 = ['Correct answer 2', 'Alternate correct answer 2', 'Incorrect answer 1', 'Incorrect answer 2'];
|
6
|
+
|
7
|
+
describe('Fill in the gaps - dropdown: Partial equal weights scoring with alternate answer', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Question preview: Partial - equal weights with alternate answer and match from all responses - \"false\"', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
cy.log('Navigate to fill in the gaps - dropdown question type, adding correct answer responses and alternate answer responses, adding points and switch to preview tab');
|
16
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
fillInTheGapsDropdownPage.steps.addResponseTokenInQuestionField();
|
19
|
+
fillInTheGapsDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
|
20
|
+
fillInTheGapsDropdownPage.steps.addInputToResponseOptionFields(1, optionsForResponse2);
|
21
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'Correct answer 1');
|
22
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'Correct answer 2');
|
23
|
+
fillInTheGapsDropdownPage.steps.allotPoints('10');
|
24
|
+
fillInTheGapsDropdownPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
25
|
+
fillInTheGapsDropdownPage.alternateAnswerButton()
|
26
|
+
.click();
|
27
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'Alternate correct answer 1');
|
28
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'Alternate correct answer 2');
|
29
|
+
fillInTheGapsDropdownPage.steps.allotPoints('6');
|
30
|
+
fillInTheGapsDropdownPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
31
|
+
fillInTheGapsDropdownPage.partialEqualWeightsCheckbox()
|
32
|
+
.click();
|
33
|
+
fillInTheGapsDropdownPage.steps.expandAdditonalSettings();
|
34
|
+
fillInTheGapsDropdownPage.allowStudentsToCheckAnswerCheckbox()
|
35
|
+
.click();
|
36
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
37
|
+
});
|
38
|
+
|
39
|
+
fillInTheGapsScoring.tests.verifyAutoScoredPartialEqualWeightsWithAlternateAnswerAndMatchFromAllResponsesFalse('fill in the gaps - dropdown')
|
40
|
+
});
|
41
|
+
|
42
|
+
describe('Question preview: Partial - equal weights with alternate answer and match from all responses - \"true\"', () => {
|
43
|
+
abortEarlySetup();
|
44
|
+
before(() => {
|
45
|
+
cy.log('Navigate to fill in the gaps - dropdown question type, adding correct answer responses and alternate answer responses and points for both correct and alternate answer');
|
46
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
47
|
+
cy.barsPreLoaderWait();
|
48
|
+
fillInTheGapsDropdownPage.steps.addResponseTokenInQuestionField();
|
49
|
+
fillInTheGapsDropdownPage.steps.addInputToResponseOptionFields(0, optionsForResponse1);
|
50
|
+
fillInTheGapsDropdownPage.steps.addInputToResponseOptionFields(1, optionsForResponse2);
|
51
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'Correct answer 1');
|
52
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'Correct answer 2');
|
53
|
+
fillInTheGapsDropdownPage.steps.allotPoints('10');
|
54
|
+
fillInTheGapsDropdownPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
55
|
+
fillInTheGapsDropdownPage.alternateAnswerButton()
|
56
|
+
.click();
|
57
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'Alternate correct answer 1');
|
58
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'Alternate correct answer 2');
|
59
|
+
fillInTheGapsDropdownPage.steps.allotPoints('6');
|
60
|
+
fillInTheGapsDropdownPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
61
|
+
fillInTheGapsDropdownPage.matchFromAllResponsesCheckbox()
|
62
|
+
.click();
|
63
|
+
fillInTheGapsDropdownPage.partialEqualWeightsCheckbox()
|
64
|
+
.click();
|
65
|
+
fillInTheGapsDropdownPage.steps.expandAdditonalSettings();
|
66
|
+
fillInTheGapsDropdownPage.allowStudentsToCheckAnswerCheckbox()
|
67
|
+
.click();
|
68
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
69
|
+
});
|
70
|
+
|
71
|
+
fillInTheGapsScoring.tests.verifyAutoScoredPartialEqualWeightsWithAlternateAnswerAndMatchFromAllResponsesTrue('fill in the gaps - dropdown')
|
72
|
+
});
|
73
|
+
});
|
@@ -0,0 +1,196 @@
|
|
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
|
+
const answerNumerationDropdownOptions = ['Numerical', 'Uppercase alphabet', 'Lowercase alphabet'];
|
7
|
+
const numbers = ['1', '2'];
|
8
|
+
const lowercase = ['a', 'b'];
|
9
|
+
const uppercase = ['A', 'B'];
|
10
|
+
const responsePlacementDropdownOptions = ['Top', 'Bottom', 'Left', 'Right'];
|
11
|
+
|
12
|
+
describe('List matching - additional settings - Answer numeration (only while grading) and response option placement dropdown', () => {
|
13
|
+
before(() => {
|
14
|
+
cy.loginAs('admin');
|
15
|
+
});
|
16
|
+
|
17
|
+
describe('Additional settings: \'Answer numeration\' (only while grading) - contents and set correct answer section', () => {
|
18
|
+
abortEarlySetup();
|
19
|
+
before(() => {
|
20
|
+
cy.log('Navigate to list matching question type');
|
21
|
+
listMatchingPage.steps.navigateToCreateQuestion('list matching');
|
22
|
+
cy.barsPreLoaderWait();
|
23
|
+
listMatchingPage.steps.expandAdditonalSettings();
|
24
|
+
});
|
25
|
+
|
26
|
+
listMatchingPage.tests.verifyAnswerNumerationContents();
|
27
|
+
|
28
|
+
it(`When the user selects ${answerNumerationDropdownOptions[0]} option from the \'Answer numeration\' dropdown, then correct response numeration should not be displayed in the \'Set correct answer section\'`, () => {
|
29
|
+
utilities.verifyInnerText(listMatchingPage.answerNumerationDropdown(), `${answerNumerationDropdownOptions[0]}`)
|
30
|
+
utilities.verifyElementVisibilityState(listMatchingPage.responseAreaNumeration(), 'notExist');
|
31
|
+
});
|
32
|
+
|
33
|
+
it(`When the user selects ${answerNumerationDropdownOptions[1]} option from the \'Answer numeration\' dropdown, then correct response numeration should not be displayed in the \'Set correct answer section\'`, () => {
|
34
|
+
listMatchingPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[1]}`);
|
35
|
+
utilities.verifyElementVisibilityState(listMatchingPage.responseAreaNumeration(), 'notExist');
|
36
|
+
});
|
37
|
+
|
38
|
+
it(`When the user selects ${answerNumerationDropdownOptions[2]} option from the \'Answer numeration\' dropdown, then correct response numeration should not be displayed in the \'Set correct answer section\'`, () => {
|
39
|
+
listMatchingPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[2]}`);
|
40
|
+
utilities.verifyElementVisibilityState(listMatchingPage.responseAreaNumeration(), 'notExist');
|
41
|
+
});
|
42
|
+
});
|
43
|
+
|
44
|
+
describe('Additional settings: \'Answer numeration\' (only while grading) - preview tab', () => {
|
45
|
+
abortEarlySetup();
|
46
|
+
before(() => {
|
47
|
+
cy.log('Navigate to list matching question type');
|
48
|
+
listMatchingPage.steps.navigateToCreateQuestion('list matching');
|
49
|
+
cy.barsPreLoaderWait();
|
50
|
+
listMatchingPage.steps.setQuestionStemsAndOptionsForScoringWithoutAlternateTab();
|
51
|
+
listMatchingPage.steps.allotPoints(20);
|
52
|
+
listMatchingPage.steps.setCorrectAnswersForScoringWithoutAlternateTab();
|
53
|
+
listMatchingPage.steps.expandAdditonalSettings();
|
54
|
+
listMatchingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
55
|
+
});
|
56
|
+
|
57
|
+
it(`When the user selects ${answerNumerationDropdownOptions[0]} option from the \'Answer numeration\' dropdown and has not selected show correct answer checkbox or check answer button then response area numeration should not be displayed in the preview tab`, () => {
|
58
|
+
utilities.verifyInnerText(listMatchingPage.answerNumerationDropdown(), `${answerNumerationDropdownOptions[0]}`)
|
59
|
+
listMatchingPage.steps.switchToPreviewTab();
|
60
|
+
utilities.verifyElementVisibilityState(listMatchingPage.responseAreaNumeration(), 'notExist');
|
61
|
+
});
|
62
|
+
|
63
|
+
it(`When user clicks on \'Show correct answer\' checkbox then the ${answerNumerationDropdownOptions[0]} numeration should be displayed on the response areas as well as \'Correct answers:\' container`, () => {
|
64
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Incorrect answer 1', 0);
|
65
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Incorrect answer 2', 1);
|
66
|
+
listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
|
67
|
+
listMatchingPage.steps.verifyNumerationOfResponseAreasInQuestionPreview(numbers);
|
68
|
+
listMatchingPage.steps.verifyCorrectAnswerContainerNumeration(numbers);
|
69
|
+
cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
|
70
|
+
listMatchingPage.steps.uncheckShowCorrectAnswerCheckbox();
|
71
|
+
});
|
72
|
+
|
73
|
+
it('When user clicks on \'Check answer\' button then the numeration should not be displayed in the response areas', () => {
|
74
|
+
listMatchingPage.steps.checkAnswer();
|
75
|
+
utilities.verifyElementVisibilityState(listMatchingPage.responseAreaNumeration(), 'notExist');
|
76
|
+
});
|
77
|
+
|
78
|
+
it(`When the user selects ${answerNumerationDropdownOptions[1]} option from the \'Answer numeration\' dropdown and has not selected show correct answer checkbox or check answer button then response area numeration should not be displayed in the preview tab`, () => {
|
79
|
+
listMatchingPage.steps.switchToEditTab();
|
80
|
+
listMatchingPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[1]}`);
|
81
|
+
listMatchingPage.steps.switchToPreviewTab();
|
82
|
+
utilities.verifyElementVisibilityState(listMatchingPage.responseAreaNumeration(), 'notExist');
|
83
|
+
});
|
84
|
+
|
85
|
+
it(`When user clicks on \'Show correct answer\' checkbox then the ${answerNumerationDropdownOptions[1]} numeration should be displayed on the response areas as well as \'Correct answers:\' container`, () => {
|
86
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Incorrect answer 1', 0);
|
87
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Incorrect answer 2', 1);
|
88
|
+
listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
|
89
|
+
listMatchingPage.steps.verifyNumerationOfResponseAreasInQuestionPreview(uppercase);
|
90
|
+
listMatchingPage.steps.verifyCorrectAnswerContainerNumeration(uppercase);
|
91
|
+
cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
|
92
|
+
listMatchingPage.steps.uncheckShowCorrectAnswerCheckbox();
|
93
|
+
});
|
94
|
+
|
95
|
+
it('When user clicks on \'Check answer\' button then the numeration should not be displayed in the response areas', () => {
|
96
|
+
listMatchingPage.steps.checkAnswer();
|
97
|
+
utilities.verifyElementVisibilityState(listMatchingPage.responseAreaNumeration(), 'notExist');
|
98
|
+
});
|
99
|
+
|
100
|
+
it(`When the user selects ${answerNumerationDropdownOptions[2]} option from the \'Answer numeration\' dropdown and has not selected show correct answer checkbox or check answer button then response area numeration should not be displayed in the preview tab`, () => {
|
101
|
+
listMatchingPage.steps.switchToEditTab();
|
102
|
+
listMatchingPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[2]}`);
|
103
|
+
listMatchingPage.steps.switchToPreviewTab();
|
104
|
+
utilities.verifyElementVisibilityState(listMatchingPage.responseAreaNumeration(), 'notExist');
|
105
|
+
});
|
106
|
+
|
107
|
+
it(`When user clicks on \'Show correct answer\' checkbox then the ${answerNumerationDropdownOptions[1]} numeration should be displayed on the response areas as well as \'Correct answers:\' container`, () => {
|
108
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Incorrect answer 1', 0);
|
109
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Incorrect answer 2', 1);
|
110
|
+
listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
|
111
|
+
listMatchingPage.steps.verifyNumerationOfResponseAreasInQuestionPreview(lowercase);
|
112
|
+
listMatchingPage.steps.verifyCorrectAnswerContainerNumeration(lowercase);
|
113
|
+
cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
|
114
|
+
listMatchingPage.steps.uncheckShowCorrectAnswerCheckbox();
|
115
|
+
});
|
116
|
+
|
117
|
+
it('When user clicks on \'Check answer\' button then the numeration should not be displayed in the response areas', () => {
|
118
|
+
listMatchingPage.steps.checkAnswer();
|
119
|
+
utilities.verifyElementVisibilityState(listMatchingPage.responseAreaNumeration(), 'notExist');
|
120
|
+
});
|
121
|
+
});
|
122
|
+
|
123
|
+
describe('Additional settings: response option placement - contents', () => {
|
124
|
+
abortEarlySetup();
|
125
|
+
before(() => {
|
126
|
+
cy.log('Navigate to list matching question type');
|
127
|
+
listMatchingPage.steps.navigateToCreateQuestion('list matching');
|
128
|
+
cy.barsPreLoaderWait();
|
129
|
+
listMatchingPage.steps.expandAdditonalSettings();
|
130
|
+
});
|
131
|
+
|
132
|
+
it('\'Response option placement\' label and dropdown should be displayed. By default \'Bottom\' option should be selected in \'Response option placement\'', () => {
|
133
|
+
utilities.verifyInnerText(listMatchingPage.responseOptionPlacementLabel(), 'Response option placement');
|
134
|
+
utilities.verifyElementVisibilityState(listMatchingPage.responseOptionPlacementLabel(), 'visible');
|
135
|
+
utilities.verifyInnerText(listMatchingPage.responseOptionPlacementDropdown(), 'Bottom');
|
136
|
+
utilities.verifyElementVisibilityState(listMatchingPage.responseOptionPlacementDropdown(), 'visible');
|
137
|
+
});
|
138
|
+
|
139
|
+
it('CSS of \'Response option placement\' section', { tags: 'css' }, () => {
|
140
|
+
utilities.verifyCSS(listMatchingPage.responseOptionPlacementDropdown(), {
|
141
|
+
'border': `1px solid ${css.color.secondaryBtnBorder}`,
|
142
|
+
'background-color': css.color.secondaryBtnBg
|
143
|
+
});
|
144
|
+
utilities.verifyCSS(listMatchingPage.responseOptionPlacementDropdown().find('.dropdown-label-text'), {
|
145
|
+
'color': css.color.liText,
|
146
|
+
'font-size': css.fontSize.default,
|
147
|
+
'font-weight': css.fontWeight.regular,
|
148
|
+
});
|
149
|
+
});
|
150
|
+
|
151
|
+
it('When user clicks on \'Response option placement\' dropdown, a list of 4 options should open - Top, Bottom, Left, Right', () => {
|
152
|
+
listMatchingPage.steps.clickOnResponseOptionPlacementDropdown();
|
153
|
+
utilities.verifyElementVisibilityState(listMatchingPage.responseOptionPlacementDropdownListOption(), 'visible');
|
154
|
+
listMatchingPage.steps.verifyResponseOptionPlacementDropdownOptions(responsePlacementDropdownOptions);
|
155
|
+
});
|
156
|
+
|
157
|
+
it('CSS of \'Response option placement\' dropdown in active state', { tags: 'css' }, () => {
|
158
|
+
utilities.verifyCSS(listMatchingPage.responseOptionPlacementDropdownListOption().eq(1), {
|
159
|
+
'color': css.color.liText,
|
160
|
+
'font-size': css.fontSize.default,
|
161
|
+
'font-weight': css.fontWeight.regular,
|
162
|
+
'background-color': css.color.liTextSelectedBg
|
163
|
+
});
|
164
|
+
utilities.verifyCSS(listMatchingPage.responseOptionPlacementDropdownListOption().eq(0), {
|
165
|
+
'color': css.color.liText,
|
166
|
+
'font-size': css.fontSize.default,
|
167
|
+
'font-weight': css.fontWeight.regular,
|
168
|
+
'background-color': css.color.transparent
|
169
|
+
});
|
170
|
+
});
|
171
|
+
|
172
|
+
it('Accessibility of \'Response option placement\' dropdown in active state', { tags: 'a11y' }, () => {
|
173
|
+
cy.checkAccessibility(listMatchingPage.dropdownList());
|
174
|
+
});
|
175
|
+
});
|
176
|
+
|
177
|
+
describe('Additional settings: response option placement - preview tab', () => {
|
178
|
+
abortEarlySetup();
|
179
|
+
before(() => {
|
180
|
+
cy.log('Navigate to list matching question type');
|
181
|
+
listMatchingPage.steps.navigateToCreateQuestion('list matching');
|
182
|
+
cy.barsPreLoaderWait();
|
183
|
+
listMatchingPage.steps.expandAdditonalSettings();
|
184
|
+
});
|
185
|
+
|
186
|
+
responsePlacementDropdownOptions.forEach((dropdownOption) => {
|
187
|
+
it(`When the user selects ${dropdownOption} from the \'Response option placement\' dropdown, then the response options container should be displayed at the \'${dropdownOption}\' in the question preview`, () => {
|
188
|
+
listMatchingPage.steps.clickOnResponseOptionPlacementDropdown();
|
189
|
+
listMatchingPage.steps.selectResponseOptionPlacementDropdownOption(dropdownOption);
|
190
|
+
listMatchingPage.steps.switchToPreviewTab();
|
191
|
+
listMatchingPage.steps.verifyResponseOptionPlacementPreviewTab(dropdownOption);
|
192
|
+
listMatchingPage.steps.switchToEditTab();
|
193
|
+
});
|
194
|
+
})
|
195
|
+
});
|
196
|
+
});
|
@@ -0,0 +1,210 @@
|
|
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
|
+
const fontSizeDropdownOptions = ['Default', 'Small', 'Normal', 'Large', 'Extra large', 'Huge'];
|
7
|
+
const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
|
8
|
+
|
9
|
+
describe('List matching - additional settings', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
describe('Additional settings accordion', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
cy.log('Navigate to list matching question type');
|
18
|
+
listMatchingPage.steps.navigateToCreateQuestion('list matching');
|
19
|
+
cy.barsPreLoaderWait();
|
20
|
+
});
|
21
|
+
|
22
|
+
listMatchingPage.tests.verifyAdditonalSettingsAccordionProperties();
|
23
|
+
});
|
24
|
+
|
25
|
+
describe('Additional settings: font size - 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.setQuestionStemsAndOptionsForScoringWithoutAlternateTab();
|
32
|
+
listMatchingPage.steps.expandAdditonalSettings();
|
33
|
+
listMatchingPage.steps.enterTextInStemColumnHeaderInputField('Stem column header');
|
34
|
+
listMatchingPage.steps.enterTextInResponseColumnHeaderInputField('Response column header');
|
35
|
+
});
|
36
|
+
|
37
|
+
listMatchingPage.tests.verifyFontSizeSectionContents();
|
38
|
+
|
39
|
+
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
40
|
+
it(`When the user selects \'${option}\' option from the Font size dropdown, then font size of the contents in the \'Set correct answer\' section should be changed to ${option}`, () => {
|
41
|
+
listMatchingPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
|
42
|
+
utilities.verifyInnerText(listMatchingPage.fontSizeDropdown(), `${option}`);
|
43
|
+
cy.log('Checking correct answer section font size')
|
44
|
+
utilities.verifyCSS(listMatchingPage.setCorrectAnswerStemLabel(), {
|
45
|
+
'font-size': fontSizes[fontsIndex]
|
46
|
+
});
|
47
|
+
utilities.verifyCSS(listMatchingPage.setCorrectAnswerStemResponseArea(), {
|
48
|
+
'font-size': fontSizes[fontsIndex]
|
49
|
+
});
|
50
|
+
utilities.verifyCSS(listMatchingPage.draggableOption(), {
|
51
|
+
'font-size': fontSizes[fontsIndex]
|
52
|
+
});
|
53
|
+
utilities.verifyCSS(listMatchingPage.stemColumnHeader(), {
|
54
|
+
'font-size': fontSizes[fontsIndex]
|
55
|
+
});
|
56
|
+
utilities.verifyCSS(listMatchingPage.responseColumnHeader(), {
|
57
|
+
'font-size': fontSizes[fontsIndex]
|
58
|
+
});
|
59
|
+
});
|
60
|
+
});
|
61
|
+
});
|
62
|
+
|
63
|
+
describe('Additional settings: font size - preview tab', () => {
|
64
|
+
abortEarlySetup();
|
65
|
+
before(() => {
|
66
|
+
cy.log('Navigate to list matching question type');
|
67
|
+
listMatchingPage.steps.navigateToCreateQuestion('list matching');
|
68
|
+
cy.barsPreLoaderWait();
|
69
|
+
listMatchingPage.steps.addQuestionInstructions('Question Instructions');
|
70
|
+
listMatchingPage.steps.setQuestionStemsAndOptionsForScoringWithoutAlternateTab();
|
71
|
+
listMatchingPage.steps.allotPoints(20);
|
72
|
+
listMatchingPage.steps.setCorrectAnswersForScoringWithoutAlternateTab();
|
73
|
+
listMatchingPage.steps.expandAdditonalSettings();
|
74
|
+
listMatchingPage.steps.enterTextInStemColumnHeaderInputField('Stem column header');
|
75
|
+
listMatchingPage.steps.enterTextInResponseColumnHeaderInputField('Response column header');
|
76
|
+
});
|
77
|
+
|
78
|
+
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
79
|
+
it(`When the user selects \'${option}\' option from the Font size dropdown, then font size of the preview tab should change to ${option} accordingly`, () => {
|
80
|
+
listMatchingPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
|
81
|
+
utilities.verifyInnerText(listMatchingPage.fontSizeDropdown(), `${option}`);
|
82
|
+
listMatchingPage.steps.switchToPreviewTab();
|
83
|
+
utilities.verifyCSS(listMatchingPage.questionInstructionsText(), {
|
84
|
+
'font-size': fontSizes[fontsIndex]
|
85
|
+
});
|
86
|
+
utilities.verifyCSS(listMatchingPage.stemColumnHeader(), {
|
87
|
+
'font-size': fontSizes[fontsIndex]
|
88
|
+
});
|
89
|
+
utilities.verifyCSS(listMatchingPage.responseColumnHeader(), {
|
90
|
+
'font-size': fontSizes[fontsIndex]
|
91
|
+
});
|
92
|
+
utilities.verifyCSS(listMatchingPage.previewTabStemLabel(), {
|
93
|
+
'font-size': fontSizes[fontsIndex]
|
94
|
+
});
|
95
|
+
utilities.verifyCSS(listMatchingPage.previewTabStemResponseArea(), {
|
96
|
+
'font-size': fontSizes[fontsIndex]
|
97
|
+
});
|
98
|
+
utilities.verifyCSS(listMatchingPage.draggableOption(), {
|
99
|
+
'font-size': fontSizes[fontsIndex]
|
100
|
+
});
|
101
|
+
listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
|
102
|
+
utilities.verifyCSS(listMatchingPage.previewTabCorrectAnswerLabel(), {
|
103
|
+
'font-size': fontSizes[fontsIndex]
|
104
|
+
});
|
105
|
+
utilities.verifyCSS(listMatchingPage.previewTabCorrectAnswerResponseNumerationWrapper(), {
|
106
|
+
'font-size': fontSizes[fontsIndex]
|
107
|
+
});
|
108
|
+
utilities.verifyCSS(listMatchingPage.previewTabCorrectAnswerResponseText(), {
|
109
|
+
'font-size': fontSizes[fontsIndex]
|
110
|
+
});
|
111
|
+
listMatchingPage.steps.uncheckShowCorrectAnswerCheckbox();
|
112
|
+
listMatchingPage.steps.switchToEditTab();
|
113
|
+
});
|
114
|
+
});
|
115
|
+
});
|
116
|
+
|
117
|
+
describe('Additional settings: check answer', () => {
|
118
|
+
abortEarlySetup();
|
119
|
+
before(() => {
|
120
|
+
cy.log('Navigate to list matching question type');
|
121
|
+
listMatchingPage.steps.navigateToCreateQuestion('list matching');
|
122
|
+
cy.barsPreLoaderWait();
|
123
|
+
listMatchingPage.steps.setQuestionStemsAndOptionsForScoringWithoutAlternateTab();
|
124
|
+
listMatchingPage.steps.setCorrectAnswersForScoringWithoutAlternateTab();
|
125
|
+
listMatchingPage.steps.allotPoints(20);
|
126
|
+
listMatchingPage.steps.expandAdditonalSettings();
|
127
|
+
});
|
128
|
+
|
129
|
+
listMatchingPage.tests.verifyCheckAnswerSectionAndPreviewTabCheckAnswerButton();
|
130
|
+
});
|
131
|
+
|
132
|
+
describe('Additional settings: check answer - functionality', () => {
|
133
|
+
abortEarlySetup();
|
134
|
+
before(() => {
|
135
|
+
cy.log('Navigate to list matching question type');
|
136
|
+
listMatchingPage.steps.navigateToCreateQuestion('list matching');
|
137
|
+
cy.barsPreLoaderWait();
|
138
|
+
listMatchingPage.steps.setQuestionStemsAndOptionsForScoringWithoutAlternateTab();
|
139
|
+
listMatchingPage.steps.setCorrectAnswersForScoringWithoutAlternateTab();
|
140
|
+
listMatchingPage.steps.allotPoints(20);
|
141
|
+
listMatchingPage.steps.expandAdditonalSettings();
|
142
|
+
listMatchingPage.steps.setMaximumCheckAnswerAttempts(2);
|
143
|
+
listMatchingPage.steps.switchToPreviewTab();
|
144
|
+
});
|
145
|
+
|
146
|
+
//Failing due to https://redmine.zeuslearning.com/issues/548211
|
147
|
+
listMatchingPage.tests.verifyCheckAnswerButtonFunctionalityWhenQuestionIsUnattempted();
|
148
|
+
|
149
|
+
it('When the user attempts the question partially correct, then on clicking on the \'Check answer\' button, green check-mark icon should be displayed besides the correct response, red cross-mark should be displayed besides incorrect response and \'Incorrect answer\' label should be displayed below the question preview', () => {
|
150
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 0);
|
151
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Incorrect answer 2', 1);
|
152
|
+
listMatchingPage.steps.checkAnswer();
|
153
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
154
|
+
listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
155
|
+
listMatchingPage.steps.verifyIncorrectAttemptBorder();
|
156
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
157
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
158
|
+
});
|
159
|
+
|
160
|
+
it('When the user attempts the question correctly, then on clicking on the \'Check answer\' button, green check-mark icon should be displayed besides the correct response and \'Correct answer\' label should be displayed below the question preview', () => {
|
161
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 2', 1);
|
162
|
+
listMatchingPage.steps.checkAnswer();
|
163
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
164
|
+
listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
165
|
+
listMatchingPage.steps.verifyCorrectAttemptBorder();
|
166
|
+
listMatchingPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
167
|
+
listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
168
|
+
});
|
169
|
+
|
170
|
+
listMatchingPage.tests.verifyDisabledCheckAnswerButtonWithCSSAnda11y();
|
171
|
+
|
172
|
+
it('When the user updates the value of Maximum check answer attempts input field, it should get reflected on the preview tab', () => {
|
173
|
+
listMatchingPage.steps.switchToEditTab();
|
174
|
+
listMatchingPage.steps.clearMaximumCheckAnswerAttemptsInputField();
|
175
|
+
listMatchingPage.steps.addInputToMaximumCheckAnswerAttemptsInputField(1);
|
176
|
+
listMatchingPage.steps.switchToPreviewTab();
|
177
|
+
listMatchingPage.steps.verifyCheckAnswerButtonEnabled();
|
178
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 0);
|
179
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 2', 1);
|
180
|
+
listMatchingPage.steps.checkAnswer();
|
181
|
+
listMatchingPage.steps.verifyCheckAnswerButtonDisabled();
|
182
|
+
});
|
183
|
+
|
184
|
+
it('When the \'Maximum check answer attempts\' input field is empty and user switches to Preview tab, then the \'Check Answer\' button should be enabled and user should be able to check answer multiple times', () => {
|
185
|
+
listMatchingPage.steps.switchToEditTab();
|
186
|
+
listMatchingPage.steps.clearMaximumCheckAnswerAttemptsInputField();
|
187
|
+
listMatchingPage.steps.switchToPreviewTab();
|
188
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 1', 0);
|
189
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 2', 1);
|
190
|
+
listMatchingPage.steps.checkAnswer();
|
191
|
+
listMatchingPage.steps.verifyCheckAnswerButtonEnabled();
|
192
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Incorrect answer 1', 0);
|
193
|
+
listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Incorrect answer 2', 1);
|
194
|
+
listMatchingPage.steps.checkAnswer();
|
195
|
+
listMatchingPage.steps.verifyCheckAnswerButtonEnabled();
|
196
|
+
});
|
197
|
+
});
|
198
|
+
|
199
|
+
describe('Additional settings: details section', () => {
|
200
|
+
abortEarlySetup();
|
201
|
+
before(() => {
|
202
|
+
cy.log('Navigate to list matching question type');
|
203
|
+
listMatchingPage.steps.navigateToCreateQuestion('list matching');
|
204
|
+
cy.barsPreLoaderWait();
|
205
|
+
listMatchingPage.steps.expandAdditonalSettings();
|
206
|
+
});
|
207
|
+
|
208
|
+
listMatchingPage.tests.verifyDetailsSection();
|
209
|
+
});
|
210
|
+
});
|