itemengine-cypress-automation 1.0.23 → 1.0.25
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAdditionalSettingsAdvanceSettingsForAllResponseAreas.js +511 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAdditionalSettingsBasic.js +263 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAdditionalSettingsResponseAccordions.js +734 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAdditionalSettingsStudentResponseAreaAndLayout.js +603 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAllOrNothingWithAlternateAnswer.js +54 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAlternateAnswer.js +104 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextAutoScoredScoring.js +38 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextCaseSensitiveAndIgnoreExtraSpacesCheckboxes.js +174 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextEditTabBasicSections.js +176 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextEditTabScoringSection.js +150 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextHeaderSection.js +112 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextManuallyAndNonScoredScoring.js +49 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextPartialDifferentWeights.js +47 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextPartialDifferentWeightsWithAlternateAnswer.js +60 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextPartialEqualWeights.js +45 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextPartialEqualWeightsWithAlternateAnswer.js +58 -0
- package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextSetCorrectAnswerSection.js +70 -0
- package/package.json +1 -1
@@ -0,0 +1,112 @@
|
|
1
|
+
import { dialogBoxBase, fillInTheGapsTextPage, selectQuestionResourceToolPage } from "../../../pages";
|
2
|
+
import { commonComponents } from "../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create item page - Fill in the gaps - text: Header section and saving question', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Header section contents', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigate to fill in the gaps - text question type');
|
15
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
16
|
+
});
|
17
|
+
|
18
|
+
fillInTheGapsTextPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Fill in the gaps with text');
|
19
|
+
});
|
20
|
+
|
21
|
+
describe('Tabs section', () => {
|
22
|
+
abortEarlySetup();
|
23
|
+
before(() => {
|
24
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
25
|
+
});
|
26
|
+
|
27
|
+
fillInTheGapsTextPage.tests.verifyTabsSection();
|
28
|
+
});
|
29
|
+
|
30
|
+
describe('Cancel button', () => {
|
31
|
+
abortEarlySetup();
|
32
|
+
before(() => {
|
33
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
34
|
+
});
|
35
|
+
|
36
|
+
fillInTheGapsTextPage.tests.verifyCancelButton('fill in the gaps with text');
|
37
|
+
});
|
38
|
+
|
39
|
+
describe('Save Question button', () => {
|
40
|
+
abortEarlySetup();
|
41
|
+
before(() => {
|
42
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
43
|
+
});
|
44
|
+
|
45
|
+
describe('Validation error messages', () => {
|
46
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
|
47
|
+
|
48
|
+
it('Validation error messages should be displayed below required input fields', () => {
|
49
|
+
fillInTheGapsTextPage.questionInstructionsLabelEditTab()
|
50
|
+
.parents('.edit-question-instruction-wrapper')
|
51
|
+
.within(() => {
|
52
|
+
commonComponents.errorMessage()
|
53
|
+
.verifyInnerText('Error: Question instructions are required.')
|
54
|
+
.and('be.visible');
|
55
|
+
});
|
56
|
+
fillInTheGapsTextPage.pointsInputField()
|
57
|
+
.parents('.cloze-with-text-points-wrapper')
|
58
|
+
.within(() => {
|
59
|
+
fillInTheGapsTextPage.pleaseEnterPointsErrorMessage()
|
60
|
+
.verifyInnerText('Error: Please enter points.')
|
61
|
+
.and('be.visible');
|
62
|
+
});
|
63
|
+
//Failing due to https://redmine.zeuslearning.com/issues/531580
|
64
|
+
fillInTheGapsTextPage.setCorrectAnswerResponseField()
|
65
|
+
.parents('.cloze-with-text-authoring-mode-response-all-or-nothing-wrapper')
|
66
|
+
.within(() => {
|
67
|
+
fillInTheGapsTextPage.errorMessage()
|
68
|
+
.verifyInnerText('Error: Please set a correct answer.')
|
69
|
+
.and('be.visible');
|
70
|
+
});
|
71
|
+
fillInTheGapsTextPage.setCorrectAnswerErrorIcon()
|
72
|
+
.should('be.visible');
|
73
|
+
});
|
74
|
+
|
75
|
+
it('Validation error messages should disappear when required input fields are filled', () => {
|
76
|
+
fillInTheGapsTextPage.steps.addQuestionInstructions();
|
77
|
+
fillInTheGapsTextPage.questionInstructionsLabelEditTab()
|
78
|
+
.parents('.edit-question-instruction-wrapper')
|
79
|
+
.within(() => {
|
80
|
+
commonComponents.errorMessage()
|
81
|
+
.should('not.exist');
|
82
|
+
});
|
83
|
+
fillInTheGapsTextPage.steps.allotPoints(20);
|
84
|
+
fillInTheGapsTextPage.pointsInputField()
|
85
|
+
.parents('.cloze-with-text-points-wrapper')
|
86
|
+
.within(() => {
|
87
|
+
fillInTheGapsTextPage.pleaseEnterPointsErrorMessage()
|
88
|
+
.should('not.exist');
|
89
|
+
});
|
90
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 1', 'Response 2']);
|
91
|
+
fillInTheGapsTextPage.setCorrectAnswerResponseField()
|
92
|
+
.parents('.cloze-with-text-authoring-mode-response-all-or-nothing-wrapper')
|
93
|
+
.within(() => {
|
94
|
+
fillInTheGapsTextPage.errorMessage()
|
95
|
+
.should('not.exist');
|
96
|
+
});
|
97
|
+
fillInTheGapsTextPage.setCorrectAnswerErrorIcon()
|
98
|
+
.should('not.exist');
|
99
|
+
});
|
100
|
+
});
|
101
|
+
|
102
|
+
describe('Saving a question', () => {
|
103
|
+
abortEarlySetup();
|
104
|
+
|
105
|
+
it('When user has filled all the mandatory fields then on clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
106
|
+
fillInTheGapsTextPage.steps.saveAQuestionAndVerifySnackbar();
|
107
|
+
});
|
108
|
+
|
109
|
+
fillInTheGapsTextPage.tests.verifySavedSuccessfullySnackbarCSSanda11y();
|
110
|
+
});
|
111
|
+
});
|
112
|
+
});
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import { fillInTheGapsScoring, fillInTheGapsTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Fill in the gaps - text Manually and Non scored scoring types', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Question Preview: Manually Scored', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
cy.log('Adding question instructions and options, select Manually Scored scoring type and add points for the question');
|
13
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text')
|
14
|
+
fillInTheGapsTextPage.steps.addQuestionInstructions();
|
15
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 1', 'Response 2']);
|
16
|
+
fillInTheGapsTextPage.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored')
|
17
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
18
|
+
});
|
19
|
+
|
20
|
+
it('When the user switches to the Preview tab, the question instruction, sample \'Lorem Ipsum\' text along with two response fields should be displayed', () => {
|
21
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab()
|
22
|
+
fillInTheGapsTextPage.steps.verifyQuestionInstructionsText();
|
23
|
+
fillInTheGapsTextPage.questionInputField()
|
24
|
+
.should('have.text', 'Lorem ipsum dolor sit amet, 1Responsecloseonsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget 2Responseclosetempus tellus dapibus.');
|
25
|
+
fillInTheGapsTextPage.previewTabQuestionContainer()
|
26
|
+
.verifyInnerText('Lorem ipsum dolor sit amet, \n\nonsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget \n\ntempus tellus dapibus.');
|
27
|
+
fillInTheGapsTextPage.previewTabResponseField()
|
28
|
+
.should('have.length', 2)
|
29
|
+
.and('be.visible');
|
30
|
+
});
|
31
|
+
|
32
|
+
fillInTheGapsTextPage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab()
|
33
|
+
});
|
34
|
+
|
35
|
+
describe('Question Preview: Non Scored', () => {
|
36
|
+
abortEarlySetup();
|
37
|
+
before(() => {
|
38
|
+
cy.log('Adding question instructions and options, select Non Scored scoring type and set correct answer');
|
39
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
40
|
+
fillInTheGapsTextPage.steps.selectAScoringTypeFromScoringTypeDropdown('Non scored');
|
41
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 1', 'Response 2']);
|
42
|
+
fillInTheGapsTextPage.steps.expandAdditonalSettings();
|
43
|
+
fillInTheGapsTextPage.steps.setMaximumCheckAnswerAttempts(10)
|
44
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
45
|
+
});
|
46
|
+
|
47
|
+
fillInTheGapsScoring.tests.verifyNonScoredScoring('fill in the gaps - text');
|
48
|
+
});
|
49
|
+
});
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { fillInTheGapsScoring } from "../../../pages/fillInTheGapsScoring";
|
2
|
+
import { fillInTheGapsTextPage } from "../../../pages/fillInTheGapsTextPage";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Fill in the gaps - text: Partial Different scoring', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Question Preview: AutoScored - Partial different weights', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigate to Fill in the gaps - text question type, fill the necessary details and points, uncheck round down score checkbox and switch to preview tab');
|
15
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
16
|
+
fillInTheGapsTextPage.partialDifferentWeightsCheckbox()
|
17
|
+
.click();
|
18
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 1', 'Response 2']);
|
19
|
+
fillInTheGapsTextPage.steps.addPartialDifferentWeightsPoints([5.4, 4.8]);
|
20
|
+
fillInTheGapsTextPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
21
|
+
fillInTheGapsTextPage.rounddownScoreCheckbox()
|
22
|
+
.click();
|
23
|
+
fillInTheGapsTextPage.steps.expandAdditonalSettings();
|
24
|
+
fillInTheGapsTextPage.allowStudentsToCheckAnswerCheckbox()
|
25
|
+
.click();
|
26
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
27
|
+
});
|
28
|
+
|
29
|
+
fillInTheGapsScoring.tests.verifyAutoScoredPartialDifferentWeightsScoring('fill in the gaps - text');
|
30
|
+
});
|
31
|
+
|
32
|
+
describe('Partial Different Weights: Round down score', () => {
|
33
|
+
abortEarlySetup();
|
34
|
+
before(() => {
|
35
|
+
cy.log('Add question instructions and options, set correct answers, select partial - different weights scoring and add points (in decimals) for correct answer options');
|
36
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
37
|
+
fillInTheGapsTextPage.partialDifferentWeightsCheckbox()
|
38
|
+
.click();
|
39
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 1', 'Response 2']);
|
40
|
+
fillInTheGapsTextPage.steps.addPartialDifferentWeightsPoints([1.36, 2.89]);
|
41
|
+
fillInTheGapsTextPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
42
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
43
|
+
});
|
44
|
+
|
45
|
+
fillInTheGapsScoring.tests.verifyAutoScoredPartialDifferentWeightsRoundDownScore('fill in the gaps - text');
|
46
|
+
});
|
47
|
+
});
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import { fillInTheGapsScoring } from "../../../pages/fillInTheGapsScoring";
|
2
|
+
import { fillInTheGapsTextPage } from "../../../pages/fillInTheGapsTextPage";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Fill in the gaps - text: Partial Different scoring', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Question Preview: AutoScored - Partial different weights with alternate answer with \'Match from all responses - \"false\"', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigate to Fill in the gaps - text question type, adding correct answer responses and alternate answer responses, adding points and switch to preview tab');
|
15
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
16
|
+
fillInTheGapsTextPage.partialDifferentWeightsCheckbox()
|
17
|
+
.click();
|
18
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 1', 'Response 2']);
|
19
|
+
fillInTheGapsTextPage.steps.addPartialDifferentWeightsPoints([5, 7]);
|
20
|
+
fillInTheGapsTextPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
21
|
+
fillInTheGapsTextPage.alternateAnswerButton()
|
22
|
+
.click();
|
23
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 3', 'Response 4']);
|
24
|
+
cy.log('Setting alternate answer points less than correct answer points')
|
25
|
+
fillInTheGapsTextPage.steps.addPartialDifferentWeightsPoints([3, 6]);
|
26
|
+
fillInTheGapsTextPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
27
|
+
fillInTheGapsTextPage.steps.expandAdditonalSettings();
|
28
|
+
fillInTheGapsTextPage.allowStudentsToCheckAnswerCheckbox()
|
29
|
+
.click();
|
30
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
31
|
+
});
|
32
|
+
|
33
|
+
fillInTheGapsScoring.tests.verifyAutoScoredPartialDifferentWeightsWithAlternateAnswerAndMatchFromAllResponsesFalse('fill in the gaps - text');
|
34
|
+
});
|
35
|
+
|
36
|
+
describe('Question Preview: AutoScored - Partial different weights with alternate answer with \'Match from all responses - \"true\"', () => {
|
37
|
+
abortEarlySetup();
|
38
|
+
before(() => {
|
39
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
40
|
+
fillInTheGapsTextPage.partialDifferentWeightsCheckbox()
|
41
|
+
.click();
|
42
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 1', 'Response 2']);
|
43
|
+
fillInTheGapsTextPage.steps.addPartialDifferentWeightsPoints([5, 7]);
|
44
|
+
fillInTheGapsTextPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
45
|
+
fillInTheGapsTextPage.alternateAnswerButton()
|
46
|
+
.click();
|
47
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 3', 'Response 4']);
|
48
|
+
fillInTheGapsTextPage.steps.addPartialDifferentWeightsPoints([3, 6]);
|
49
|
+
fillInTheGapsTextPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
50
|
+
fillInTheGapsTextPage.steps.expandAdditonalSettings();
|
51
|
+
fillInTheGapsTextPage.allowStudentsToCheckAnswerCheckbox()
|
52
|
+
.click();
|
53
|
+
fillInTheGapsTextPage.matchFromAllResponsesCheckbox()
|
54
|
+
.click();
|
55
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
56
|
+
});
|
57
|
+
|
58
|
+
fillInTheGapsScoring.tests.verifyAutoScoredPartialDifferentWeightsWithAlternateAnswerAndMatchFromAllResponsesTrue('fill in the gaps - text');
|
59
|
+
});
|
60
|
+
});
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { fillInTheGapsScoring, fillInTheGapsTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Fill in the gaps - Text Scoring Section Partial - equal weights', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
})
|
8
|
+
|
9
|
+
describe('Question Preview Auto Scored: Partial - equal weights', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
cy.log('Navigate to Fill in the gaps - text question type, fill the necessary details and points and switch to preview tab');
|
13
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
14
|
+
fillInTheGapsTextPage.steps.addQuestionInstructions();
|
15
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 1', 'Response 2']);
|
16
|
+
fillInTheGapsTextPage.steps.allotPoints('10');
|
17
|
+
fillInTheGapsTextPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
18
|
+
fillInTheGapsTextPage.steps.expandAdditonalSettings();
|
19
|
+
fillInTheGapsTextPage.allowStudentsToCheckAnswerCheckbox()
|
20
|
+
.click();
|
21
|
+
fillInTheGapsTextPage.partialEqualWeightsCheckbox()
|
22
|
+
.click();
|
23
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
24
|
+
});
|
25
|
+
|
26
|
+
fillInTheGapsScoring.tests.verifyAutoScoredPartialEqualWeightsScoring('fill in the gaps - text')
|
27
|
+
});
|
28
|
+
|
29
|
+
describe('Partial Equal Weights: Round down score', () => {
|
30
|
+
abortEarlySetup();
|
31
|
+
before(() => {
|
32
|
+
cy.log('Add question instructions and options, set correct answers, select partial - equal weights scoring and add points (in decimals) for correct answer options');
|
33
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
34
|
+
fillInTheGapsTextPage.steps.addQuestionInstructions();
|
35
|
+
fillInTheGapsTextPage.partialEqualWeightsCheckbox()
|
36
|
+
.click();
|
37
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 1', 'Response 2']);
|
38
|
+
fillInTheGapsTextPage.pointsInputField()
|
39
|
+
.type('8.5');
|
40
|
+
fillInTheGapsTextPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
41
|
+
});
|
42
|
+
|
43
|
+
fillInTheGapsScoring.tests.verifyAutoScoredPartialEqualWeightsRoundDownScore('fill in the gaps - text');
|
44
|
+
});
|
45
|
+
});
|
package/cypress/e2e/ILC/FillInTheGapsText/fillInTheGapsTextPartialEqualWeightsWithAlternateAnswer.js
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
import { fillInTheGapsScoring, fillInTheGapsTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Fill in the gaps - Text Scoring Section Partial - equal weights', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Question preview: Partial - equal weights with alternate answer and match from all responses - \"false\"', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
cy.log('Navigate to Fill in the gaps - text question type, adding correct answer responses and alternate answer responses, adding points and switch to preview tab');
|
13
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
14
|
+
fillInTheGapsTextPage.steps.addQuestionInstructions();
|
15
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 1', 'Response 2']);
|
16
|
+
fillInTheGapsTextPage.steps.allotPoints('10');
|
17
|
+
fillInTheGapsTextPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
18
|
+
fillInTheGapsTextPage.alternateAnswerButton()
|
19
|
+
.click();
|
20
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 3', 'Response 4']);
|
21
|
+
fillInTheGapsTextPage.steps.allotPoints('6');
|
22
|
+
fillInTheGapsTextPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
23
|
+
fillInTheGapsTextPage.partialEqualWeightsCheckbox()
|
24
|
+
.click();
|
25
|
+
fillInTheGapsTextPage.steps.expandAdditonalSettings();
|
26
|
+
fillInTheGapsTextPage.allowStudentsToCheckAnswerCheckbox()
|
27
|
+
.click();
|
28
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
29
|
+
});
|
30
|
+
|
31
|
+
fillInTheGapsScoring.tests.verifyAutoScoredPartialEqualWeightsWithAlternateAnswerAndMatchFromAllResponsesFalse('fill in the gaps - text');
|
32
|
+
});
|
33
|
+
|
34
|
+
describe('Question preview: Partial - equal weights with alternate answer and match from all responses - \"true\"', () => {
|
35
|
+
abortEarlySetup();
|
36
|
+
before(() => {
|
37
|
+
cy.log('Navigate to Fill in the gaps - text question type, adding correct answer responses and alternate answer responses and points for both correct and alternate answer');
|
38
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
39
|
+
fillInTheGapsTextPage.steps.addQuestionInstructions();
|
40
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 1', 'Response 2']);
|
41
|
+
fillInTheGapsTextPage.steps.allotPoints('10');
|
42
|
+
fillInTheGapsTextPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
43
|
+
fillInTheGapsTextPage.alternateAnswerButton()
|
44
|
+
.click();
|
45
|
+
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 3', 'Response 4']);
|
46
|
+
fillInTheGapsTextPage.partialEqualWeightsCheckbox()
|
47
|
+
.click();
|
48
|
+
fillInTheGapsTextPage.steps.expandAdditonalSettings();
|
49
|
+
fillInTheGapsTextPage.allowStudentsToCheckAnswerCheckbox()
|
50
|
+
.click();
|
51
|
+
fillInTheGapsTextPage.matchFromAllResponsesCheckbox()
|
52
|
+
.click();
|
53
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
54
|
+
});
|
55
|
+
|
56
|
+
fillInTheGapsScoring.tests.verifyAutoScoredPartialEqualWeightsWithAlternateAnswerAndMatchFromAllResponsesTrue('fill in the gaps - text');
|
57
|
+
});
|
58
|
+
});
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import { fillInTheGapsTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
const css = Cypress.env('css');
|
4
|
+
|
5
|
+
describe('Create Item page - fill in the gaps - text: Question Insructions, Question , Set Correct Answer, Alternate Correct Answer', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Set Correct Answer section', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
14
|
+
});
|
15
|
+
|
16
|
+
fillInTheGapsTextPage.tests.verifyAutoScoredSetCorrectAnswerHeaderSectionContents('fill in the gaps - text');
|
17
|
+
|
18
|
+
fillInTheGapsTextPage.tests.verifySetCorrectAnswerTabContentsAndFunctionality('Correct tab');
|
19
|
+
});
|
20
|
+
|
21
|
+
describe('Correct response conditions section', () => {
|
22
|
+
abortEarlySetup();
|
23
|
+
before(() => {
|
24
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
25
|
+
});
|
26
|
+
|
27
|
+
it('CSS of correct response conditions section', { tags: 'css' }, () => {
|
28
|
+
const labels = [fillInTheGapsTextPage.caseSensitiveLabel, fillInTheGapsTextPage.ignoreSpacesBeforeAndAfterLabel, fillInTheGapsTextPage.matchFromAllResponsesLabel]
|
29
|
+
const uncheckedCheckboxes = [fillInTheGapsTextPage.caseSensitiveCheckbox, fillInTheGapsTextPage.matchFromAllResponsesCheckbox]
|
30
|
+
labels.forEach((checkinglabel) => {
|
31
|
+
checkinglabel()
|
32
|
+
.verifyCSS(css.color.labelText, css.fontSize.normal, css.fontWeight.regular);
|
33
|
+
});
|
34
|
+
uncheckedCheckboxes.forEach((uncheckedCheckbox) => {
|
35
|
+
uncheckedCheckbox()
|
36
|
+
.parent()
|
37
|
+
.find('svg')
|
38
|
+
.should('have.css', 'fill', css.color.uncheckedCheckbox);
|
39
|
+
});
|
40
|
+
fillInTheGapsTextPage.ignoreSpacesBeforeAndAfterCheckbox()
|
41
|
+
.parent()
|
42
|
+
.find('g[data-name*="Rectangle"]')
|
43
|
+
.should('have.css', 'fill', css.color.activeButtons);
|
44
|
+
});
|
45
|
+
|
46
|
+
it('\'Case sensitive\' functionality label and checkbox should be displayed and by default it should be unchecked', () => {
|
47
|
+
fillInTheGapsTextPage.caseSensitiveLabel()
|
48
|
+
.verifyInnerText('Case sensitive')
|
49
|
+
.and('be.visible');
|
50
|
+
fillInTheGapsTextPage.caseSensitiveCheckbox()
|
51
|
+
.should('not.be.checked');
|
52
|
+
});
|
53
|
+
|
54
|
+
it('\'Ignore spaces before and after\' functionality label and checkbox should be displayed and by default it should be checked', () => {
|
55
|
+
fillInTheGapsTextPage.ignoreSpacesBeforeAndAfterLabel()
|
56
|
+
.verifyInnerText('Ignore spaces before and after');
|
57
|
+
fillInTheGapsTextPage.ignoreSpacesBeforeAndAfterCheckbox()
|
58
|
+
.should('be.checked');
|
59
|
+
});
|
60
|
+
|
61
|
+
it('\'Match from all responses\' functionality label and checkbox should be displayed and by default it should be unchecked and disabled', () => {
|
62
|
+
fillInTheGapsTextPage.matchFromAllResponsesLabel()
|
63
|
+
.verifyInnerText('Match from all responses')
|
64
|
+
.should('have.class', 'Mui-disabled');
|
65
|
+
fillInTheGapsTextPage.matchFromAllResponsesCheckbox()
|
66
|
+
.should('not.be.checked')
|
67
|
+
.and('be.disabled');
|
68
|
+
});
|
69
|
+
});
|
70
|
+
});
|