itemengine-cypress-automation 1.0.368-IEI-5697-mcq-flakiness-1174fdb.0 → 1.0.368
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/MultipleSelection/editTabScoringSection.js +0 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabScoringSection.js +0 -6
- package/cypress/e2e/ILC/SingleSelection/checkScoringLabelBannerAndCorrectAnswer.js +0 -2
- package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +88 -94
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +1 -5
- package/cypress/pages/components/additionalSettingsPanel.js +2 -2
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +0 -1
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +0 -1
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -0
- package/package.json +2 -2
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -44
@@ -224,7 +224,6 @@ describe('Create item page - Multiple selection: Scoring section', () => {
|
|
224
224
|
before(() => {
|
225
225
|
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
226
226
|
cy.barsPreLoaderWait();
|
227
|
-
multipleSelectionPage.steps.addInputToOptionsInputField(options);
|
228
227
|
});
|
229
228
|
|
230
229
|
it('User should be able to select \'Manually scored\' scoring type from scoring type dropdown', () => {
|
@@ -237,9 +237,6 @@ describe('Create item page - Multiple selection grid: Scoring section', () => {
|
|
237
237
|
before(() => {
|
238
238
|
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
239
239
|
cy.barsPreLoaderWait();
|
240
|
-
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
241
|
-
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
242
|
-
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
243
240
|
});
|
244
241
|
|
245
242
|
it('User should be able to select \'Manually scored\' scoring type from scoring type dropdown', () => {
|
@@ -266,9 +263,6 @@ describe('Create item page - Multiple selection grid: Scoring section', () => {
|
|
266
263
|
before(() => {
|
267
264
|
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
268
265
|
cy.barsPreLoaderWait();
|
269
|
-
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
270
|
-
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
271
|
-
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
272
266
|
});
|
273
267
|
|
274
268
|
it('User should be able to select \'Non scored\' scoring type from scoring type dropdown', () => {
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { singleSelectionPage } from "../../../pages";
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
-
const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
|
4
3
|
|
5
4
|
describe('Create Item page - Single selection', () => {
|
6
5
|
before(() => {
|
@@ -65,7 +64,6 @@ describe('Create Item page - Single selection', () => {
|
|
65
64
|
before(() => {
|
66
65
|
singleSelectionPage.steps.navigateToCreateQuestion('single selection');
|
67
66
|
cy.barsPreLoaderWait();
|
68
|
-
singleSelectionPage.steps.addInputToOptionsInputField(options);
|
69
67
|
});
|
70
68
|
|
71
69
|
it('When the user selects \'Grading\' view without setting the answer, correct answers section and answer status banner should not be displayed', () => {
|
@@ -4,112 +4,106 @@ import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
|
5
5
|
const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
|
6
6
|
|
7
|
-
describe('
|
7
|
+
describe('Question Preview: Manually Scored', () => {
|
8
|
+
abortEarlySetup();
|
8
9
|
before(() => {
|
9
|
-
cy.
|
10
|
+
cy.log('Adding question instructions and options, select Manually Scored scoring type and add points for the question');
|
11
|
+
singleSelectionPage.steps.navigateToCreateQuestion('single selection');
|
12
|
+
singleSelectionPage.steps.addQuestionInstructions();
|
13
|
+
singleSelectionPage.steps.addInputToOptionsInputField(options);
|
14
|
+
singleSelectionPage.steps.expandScoringTypeDropdown();
|
15
|
+
singleSelectionPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
16
|
+
singleSelectionPage.steps.switchToPreviewTab();
|
10
17
|
});
|
11
18
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
singleSelectionPage.steps.navigateToCreateQuestion('single selection');
|
17
|
-
singleSelectionPage.steps.addQuestionInstructions();
|
18
|
-
singleSelectionPage.steps.addInputToOptionsInputField(options);
|
19
|
-
singleSelectionPage.steps.expandScoringTypeDropdown();
|
20
|
-
singleSelectionPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
21
|
-
singleSelectionPage.steps.switchToPreviewTab();
|
22
|
-
});
|
23
|
-
|
24
|
-
it('In Preview tab, Question Instructions and options should be displayed along with radio button', () => {
|
25
|
-
singleSelectionPage.steps.verifyQuestionInstructionsText();
|
26
|
-
options.forEach((optionsText, count) => {
|
27
|
-
utilities.verifyInnerText(utilities.getNthElement(singleSelectionPage.optionTextPreviewTab(), count), optionsText);
|
28
|
-
});
|
19
|
+
it('In Preview tab, Question Instructions and options should be displayed along with radio button', () => {
|
20
|
+
singleSelectionPage.steps.verifyQuestionInstructionsText();
|
21
|
+
options.forEach((optionsText, count) => {
|
22
|
+
utilities.verifyInnerText(utilities.getNthElement(singleSelectionPage.optionTextPreviewTab(), count), optionsText);
|
29
23
|
});
|
24
|
+
});
|
30
25
|
|
31
|
-
|
26
|
+
singleSelectionPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Manually scored')
|
32
27
|
|
33
|
-
|
34
|
-
|
35
|
-
});
|
28
|
+
it('User should able to save question with manually scored scoring type', () => {
|
29
|
+
singleSelectionPage.steps.saveAQuestionAndVerifySnackbar();
|
36
30
|
});
|
31
|
+
});
|
37
32
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
33
|
+
describe('Question Preview: Non Scored', () => {
|
34
|
+
abortEarlySetup();
|
35
|
+
before(() => {
|
36
|
+
cy.log('Adding question instructions and options, select Non Scored scoring type and set correct answer');
|
37
|
+
singleSelectionPage.steps.navigateToCreateQuestion('single selection');
|
38
|
+
singleSelectionPage.steps.addQuestionInstructions();
|
39
|
+
singleSelectionPage.steps.addInputToOptionsInputField(options);
|
40
|
+
singleSelectionPage.steps.checkOptionInSpecifyCorrectAnswerSection(1);
|
41
|
+
singleSelectionPage.steps.expandScoringTypeDropdown();
|
42
|
+
singleSelectionPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
43
|
+
//singleSelectionPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
44
|
+
singleSelectionPage.steps.switchToPreviewTab();
|
45
|
+
});
|
51
46
|
|
52
|
-
|
47
|
+
singleSelectionPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Non scored');
|
53
48
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
49
|
+
it('When the user selects \'Grading\' view without attempting the question, no icons should be displayed besides the unattempted options, correct answer label and border should not be displayed and correct answer section should be displayed with correct answer', () => {
|
50
|
+
singleSelectionPage.steps.switchToGradingView();
|
51
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(0);
|
52
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(1);
|
53
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(2);
|
54
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(3);
|
55
|
+
singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
56
|
+
singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
|
57
|
+
//correct answer section
|
58
|
+
singleSelectionPage.steps.verifyCorrectOptionIconCorrectAnswerSection(1);
|
59
|
+
singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
60
|
+
});
|
66
61
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
62
|
+
it('When the user attempts the question incorrectly, then on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, no icons should be displayed besides unattempted options, incorrect answer border and label should not be displayed below the question preview and correct anser section should be displayed with correct answer', () => {
|
63
|
+
singleSelectionPage.steps.checkOptionInPreviewTab(2);
|
64
|
+
singleSelectionPage.steps.switchToGradingView();
|
65
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(0);
|
66
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(1);
|
67
|
+
singleSelectionPage.steps.verifyIncorrectOptionIconStudentView(2);
|
68
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(3);
|
69
|
+
singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
|
70
|
+
//correct answer section
|
71
|
+
singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
72
|
+
singleSelectionPage.steps.verifyCorrectOptionIconCorrectAnswerSection(1);
|
73
|
+
singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
74
|
+
/*cy.log('When the user has attempted the question incorrectly clicks on \'Check answer\' button, then correct icons should be displayed besides correct response and incorrect icon should be displayed beside incorrect option, incorrect answer border and a label should not be displayed below the question preview')
|
75
|
+
singleSelectionPage.steps.checkAnswer();
|
76
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(0);
|
77
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(1);
|
78
|
+
singleSelectionPage.steps.verifyIncorrectOptionIconStudentView(2);
|
79
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(3);
|
80
|
+
singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
81
|
+
singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();*/
|
82
|
+
});
|
88
83
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
84
|
+
it('When user attempts the question correctly, then on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, no icons should be displayed besides unattempted responses, correct answer border, a label and correct answer section should not be displayed below the question preview', () => {
|
85
|
+
singleSelectionPage.steps.resetQuestionPreview();
|
86
|
+
singleSelectionPage.steps.checkOptionInPreviewTab(1);
|
87
|
+
singleSelectionPage.steps.switchToGradingView();
|
88
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(0);
|
89
|
+
singleSelectionPage.steps.verifyCorrectOptionIconStudentView(1);
|
90
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(2);
|
91
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(3);
|
92
|
+
singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
|
93
|
+
singleSelectionPage.steps.verifyCorrectAnswerSectionNotExist();
|
94
|
+
singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
95
|
+
singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
96
|
+
/*cy.log('When the user has attempted the question with correct responses and clicks on \'Check answer\' button, then correct icon should be displayed besides correct response, correct answer border and a label should not be displayed below the question preview')
|
97
|
+
singleSelectionPage.steps.checkAnswer();
|
98
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(0);
|
99
|
+
singleSelectionPage.steps.verifyCorrectOptionIconStudentView(1);
|
100
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(2);
|
101
|
+
singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(3);
|
102
|
+
singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
103
|
+
singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();*/
|
104
|
+
});
|
110
105
|
|
111
|
-
|
112
|
-
|
113
|
-
});
|
106
|
+
it('User should able to save question with non scored scoring type', () => {
|
107
|
+
singleSelectionPage.steps.saveAQuestionAndVerifySnackbar();
|
114
108
|
});
|
115
109
|
});
|
@@ -58,16 +58,12 @@ describe('Create Item page - Single selection grid', () => {
|
|
58
58
|
singleSelectionGridPage.steps.verifyCorrectAnswerSectionExist();
|
59
59
|
})
|
60
60
|
});
|
61
|
-
|
61
|
+
|
62
62
|
describe('Question Preview: Non Scored - Save as you go', () => {
|
63
63
|
abortEarlySetup();
|
64
64
|
before(() => {
|
65
65
|
singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
|
66
66
|
cy.barsPreLoaderWait();
|
67
|
-
singleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
68
|
-
singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
69
|
-
singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
70
|
-
singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
71
67
|
});
|
72
68
|
|
73
69
|
it('When the user selects \'Grading\' view without setting the answer, correct answers section and answer status banner should not be displayed', () => {
|
@@ -23,8 +23,8 @@ const selectors = {
|
|
23
23
|
return cy.get('[aria-labelledby*="Font-Size-dropdown-label"] [role="option"]')
|
24
24
|
}
|
25
25
|
},
|
26
|
-
fontSizeListOptionLabels: () => cy.get('[aria-labelledby
|
27
|
-
fontSizesLabels: () => cy.get('[aria-labelledby
|
26
|
+
fontSizeListOptionLabels: () => cy.get('[aria-labelledby="Font-Size-dropdown-label"] li[role="option"] .dropdown-label-text'),
|
27
|
+
fontSizesLabels: () => cy.get('[aria-labelledby="Font-Size-dropdown-label"] li[role="option"] .dropdown-post-label-text'),
|
28
28
|
}
|
29
29
|
|
30
30
|
const steps = {
|
@@ -81,6 +81,7 @@ const steps = {
|
|
81
81
|
scoringSectionBaseEditTab.scoringTypeDropdownListOptions(convertedString)
|
82
82
|
.should('be.visible') // Ensure the dropdown option is visible
|
83
83
|
.click();
|
84
|
+
cy.wait(2000); // Wait for the dropdown to close
|
84
85
|
utilities.verifyElementVisibilityState(commonComponents.dropdownList(), 'notExist');
|
85
86
|
},
|
86
87
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.368
|
3
|
+
"version": "1.0.368",
|
4
4
|
"description": "",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -52,4 +52,4 @@
|
|
52
52
|
"devDependencies": {
|
53
53
|
"@applitools/eyes-cypress": "^3.47.0"
|
54
54
|
}
|
55
|
-
}
|
55
|
+
}
|
@@ -1,44 +0,0 @@
|
|
1
|
-
import { multipleSelectionGridPage } from "../../../pages";
|
2
|
-
|
3
|
-
describe('Multiple selection grid - Additional settings', () => {
|
4
|
-
before(() => {
|
5
|
-
cy.loginAs('admin');
|
6
|
-
});
|
7
|
-
|
8
|
-
it('Open dropdown', () => {
|
9
|
-
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
10
|
-
cy.barsPreLoaderWait();
|
11
|
-
multipleSelectionGridPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
12
|
-
});
|
13
|
-
|
14
|
-
it('Select dropdown option', () => {
|
15
|
-
multipleSelectionGridPage.steps.expandMinimumScoringDropdown();
|
16
|
-
multipleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
17
|
-
});
|
18
|
-
|
19
|
-
it('Select dropdown option', () => {
|
20
|
-
multipleSelectionGridPage.steps.expandMinimumScoringDropdown();
|
21
|
-
multipleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
22
|
-
});
|
23
|
-
|
24
|
-
it('Select dropdown option', () => {
|
25
|
-
multipleSelectionGridPage.steps.expandMinimumScoringDropdown();
|
26
|
-
multipleSelectionGridPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
27
|
-
});
|
28
|
-
|
29
|
-
it('Open dropdown', () => {
|
30
|
-
multipleSelectionGridPage.steps.expandScoringTypeDropdown();
|
31
|
-
});
|
32
|
-
|
33
|
-
it('Select dropdown option', () => {
|
34
|
-
multipleSelectionGridPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
35
|
-
});
|
36
|
-
|
37
|
-
it('Open dropdown', () => {
|
38
|
-
multipleSelectionGridPage.steps.expandScoringTypeDropdown();
|
39
|
-
});
|
40
|
-
|
41
|
-
it('Select dropdown option', () => {
|
42
|
-
multipleSelectionGridPage.steps.selectOptionFromScoringTypeDropdown('Auto scored');
|
43
|
-
});
|
44
|
-
});
|