itemengine-cypress-automation 1.0.21 → 1.0.23

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.
@@ -0,0 +1,60 @@
1
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
2
+ import { audioResponsePage } from "../../../pages";
3
+
4
+ describe('Create question page - Audio Response: Scoring', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('Scoring Section contents', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ audioResponsePage.steps.navigateToCreateQuestion('audio response');
13
+ });
14
+
15
+ audioResponsePage.tests.verifyScoringTypeLabelAndDropdown('manuallyScored');
16
+ });
17
+
18
+ describe('Manually scored scoring type - Question creation page', () => {
19
+ abortEarlySetup();
20
+ before(() => {
21
+ audioResponsePage.steps.navigateToCreateQuestion('audio response');
22
+ });
23
+
24
+ it('When the user selects \'Manually scored\' option from the Scoring Type dropdown, then the \'Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed', () => {
25
+ cy.log('Pre-step: Opening the scoring type dropdown.');
26
+ audioResponsePage.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored');
27
+ audioResponsePage.steps.verifyDefaultPointsLabelAndInputField();
28
+ audioResponsePage.steps.verifyDefaultMinimumScoreIfAttemptedLabelAndPointsField();
29
+ });
30
+
31
+ audioResponsePage.tests.verifyPointsFieldErrorState(10);
32
+ audioResponsePage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 20, 10);
33
+
34
+ it('Pre step: Switching to Preview tab', () => {
35
+ audioResponsePage.steps.switchToPreviewTab();
36
+ });
37
+
38
+ audioResponsePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab()
39
+ });
40
+
41
+ describe('Non Scored scoring type - Question creation page', () => {
42
+ abortEarlySetup();
43
+ before(() => {
44
+ cy.log('Navigating to Audio Response question type');
45
+ audioResponsePage.steps.navigateToCreateQuestion('audio response');
46
+ });
47
+
48
+ it('When the user selects \'Non Scored\' option from the Scoring Type dropdown, then the \'Points\' input field should be displayed in disabled state with prefilled \'0\' points and \'Minimum score awarded (if attempted)\' input field should not be displayed', () => {
49
+ cy.log('Pre-step: Opening the scoring type dropdown.');
50
+ audioResponsePage.steps.selectAScoringTypeFromScoringTypeDropdown('Non scored')
51
+ audioResponsePage.steps.verifyNonScoredPointsField();
52
+ });
53
+
54
+ it('Pre step: Switching to Preview tab', () => {
55
+ audioResponsePage.steps.switchToPreviewTab();
56
+ });
57
+
58
+ audioResponsePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab()
59
+ });
60
+ });