itemengine-cypress-automation 1.0.378-IEI-5835-f7292f7.0 → 1.0.379-highlight-flakiness-r2-fba67fd.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/CkEditorEquationEditor/equationEditorBasicFile.js +4 -4
- package/cypress/e2e/ILC/CkEditorInsertImage/imageInfo.js +1 -1
- package/cypress/e2e/ILC/GridFill/customizeLayoutSectionShadeCellsGridBorders.js +2 -0
- package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +3 -0
- package/cypress/pages/components/ckEditorEquationEditorComponent.js +4 -4
- package/cypress/pages/components/ckEditorInsertImageComponent.js +3 -3
- package/cypress/pages/components/ckEditorLinkComponent.js +3 -3
- package/package.json +1 -1
- package/cypress/e2e/ILC/LiveItem/liveItem.js +0 -56
- package/cypress/pages/components/liveItemPage.js +0 -58
@@ -44,8 +44,8 @@ describe('Equation Editor: Edit tab', () => {
|
|
44
44
|
utilities.verifyElementVisibilityState(multipleSelectionPage.equationEditorLabel(), 'visible');
|
45
45
|
utilities.verifyInnerText(multipleSelectionPage.okButton(), 'OK');
|
46
46
|
utilities.verifyElementVisibilityState(multipleSelectionPage.okButton(), 'visible');
|
47
|
-
utilities.verifyInnerText(multipleSelectionPage.
|
48
|
-
utilities.verifyElementVisibilityState(multipleSelectionPage.
|
47
|
+
utilities.verifyInnerText(multipleSelectionPage.editorCancelButton(), 'Cancel');
|
48
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.editorCancelButton(), 'visible');
|
49
49
|
});
|
50
50
|
|
51
51
|
it('\'Select Mode\' label with \'Editor\', \'LaTex code\' and \'MathML\' radio button should be displayed. Also \'ARIA label\' label should be displayed with chevron down icon.', () => {
|
@@ -84,7 +84,7 @@ describe('Equation Editor: Edit tab', () => {
|
|
84
84
|
|
85
85
|
it('When user writes any equation and clicks on cancel button it should not be visible on question instruction section', () => {
|
86
86
|
multipleSelectionPage.steps.writeEquationUsingTools();
|
87
|
-
multipleSelectionPage.steps.
|
87
|
+
multipleSelectionPage.steps.closeEquationEditor();
|
88
88
|
utilities.verifyElementVisibilityState(multipleSelectionPage.equationWrapper(), 'notExist');
|
89
89
|
});
|
90
90
|
|
@@ -93,7 +93,7 @@ describe('Equation Editor: Edit tab', () => {
|
|
93
93
|
multipleSelectionPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
94
94
|
multipleSelectionPage.steps.writeEquationUsingTools();
|
95
95
|
multipleSelectionPage.steps.clickOnOkButton();
|
96
|
-
utilities.verifyTextContent(multipleSelectionPage.equationInInputField(), '
|
96
|
+
utilities.verifyTextContent(multipleSelectionPage.equationInInputField(), 'N∨tan(N−P)');
|
97
97
|
});
|
98
98
|
});
|
99
99
|
|
@@ -152,7 +152,7 @@ describe('Insert Image: Edit tab', () => {
|
|
152
152
|
});
|
153
153
|
|
154
154
|
it('The changes and the pic should also be visible in the \'Preview Tab\'', () => {
|
155
|
-
multipleSelectionPage.steps.
|
155
|
+
multipleSelectionPage.steps.focusInAndOutOfQuestionInstructionsInputField();
|
156
156
|
multipleSelectionPage.steps.switchToPreviewTab();
|
157
157
|
multipleSelectionPage.steps.verifyCssOfImageInDifferentViews('300', '150', '5', '3', '10', 'Preview Tab');
|
158
158
|
});
|
@@ -475,6 +475,8 @@ describe('Create item page - Grid fill: Customize layout section - \'Shade the c
|
|
475
475
|
gridFillPage.steps.selectGridBordersToggleButton('None');
|
476
476
|
gridFillPage.steps.switchToPreviewTab();
|
477
477
|
gridFillPage.steps.switchToStudentView();
|
478
|
+
utilities.hoverAwayFromElement(gridFillPage.gridWrapperPreviewTab());
|
479
|
+
utilities.triggerMouseout(gridFillPage.gridWrapperPreviewTab());
|
478
480
|
gridFillPage.steps.verifyCellBorderNotDisplayedForNoneToggleButtonInPreviewTab();
|
479
481
|
});
|
480
482
|
|
@@ -168,6 +168,9 @@ describe('Create item page - Grid fill: Scoring section', () => {
|
|
168
168
|
before(() => {
|
169
169
|
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
170
170
|
cy.barsPreLoaderWait();
|
171
|
+
gridFillPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.')
|
172
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
|
173
|
+
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 1);
|
171
174
|
});
|
172
175
|
|
173
176
|
it('User should be able to select \'Non scored\' scoring type from scoring type dropdown', () => {
|
@@ -8,8 +8,8 @@ const selectors = {
|
|
8
8
|
//Basic
|
9
9
|
equationEditorIcon: () => cy.get('.cke_button__nextgeneqneditor_icon:visible'),
|
10
10
|
equationEditorLabel: () => cy.get('[class*="EquationEditorstyles__Heading"]'),
|
11
|
-
okButton: () => cy.get('
|
12
|
-
|
11
|
+
okButton: () => cy.get('[title="OK"]'),
|
12
|
+
editorCancelButton: () => cy.get('[title="Cancel"]'),
|
13
13
|
equationEditorPopUp: () => cy.get('[class*="EquationEditorstyles__EquationEditorContainer"]'),
|
14
14
|
equationWrapper: () => cy.get('.cke_widget_ngie_equation [class*="NGMathJax"]'),
|
15
15
|
equationInInputField: () => cy.get('[class*="ngie_latex"]').eq(0),
|
@@ -84,8 +84,8 @@ const steps = {
|
|
84
84
|
return null;
|
85
85
|
},
|
86
86
|
|
87
|
-
|
88
|
-
ckEditorEquationEditorComponent.
|
87
|
+
closeEquationEditor: () => {
|
88
|
+
ckEditorEquationEditorComponent.editorCancelButton()
|
89
89
|
.click();
|
90
90
|
},
|
91
91
|
|
@@ -23,7 +23,7 @@ const selectors = {
|
|
23
23
|
widthInputField: () => cy.get('.cke_dialog_ui_input_text').eq(5),
|
24
24
|
heightLabel: () => cy.get('.dialog-input-label').eq(3),
|
25
25
|
heightInputField: () => cy.get('.cke_dialog_ui_input_text').eq(7),
|
26
|
-
borderLabel: () => cy.get('
|
26
|
+
borderLabel: () => cy.get('[class="cke_dialog_ui_html"]').eq(2),
|
27
27
|
borderInputField: () => cy.get('.cke_dialog_ui_input_text').eq(9),
|
28
28
|
hSpaceLabel: () => cy.get('.dialog-input-label').eq(5),
|
29
29
|
hSpaceInputField: () => cy.get('.cke_dialog_ui_input_text').eq(11),
|
@@ -36,8 +36,8 @@ const selectors = {
|
|
36
36
|
fixedRadioButton: () => cy.get('[class*="image-responsiveness-radio-wrapper"]').eq(3),
|
37
37
|
fixedRadioLabel: () => cy.get('[class*="image-responsiveness-radio-wrapper"]').eq(4),
|
38
38
|
//Alignment
|
39
|
-
alignmentLabel: () => cy.get('.dialog-input-label').eq(
|
40
|
-
alignmentDropDown: () => cy.get('.cke_dialog_ui_input_select').eq(
|
39
|
+
alignmentLabel: () => cy.get('.dialog-input-label').eq(9),
|
40
|
+
alignmentDropDown: () => cy.get('.cke_dialog_ui_input_select').eq(3),
|
41
41
|
alignmentOptions: (alignment = null) => {
|
42
42
|
if (alignment) {
|
43
43
|
return cy.get(`[class*="cke_dialog_ui_input_select"] option[value="${alignment}"]`)
|
@@ -12,7 +12,7 @@ const selectors = {
|
|
12
12
|
linkLabel: () => cy.get('.dialog-header-label'),
|
13
13
|
linkPopUpWrapper: () => cy.get('.custom-link-wrapper'),
|
14
14
|
urlInQuestionInstruction: () => cy.get('[data-cke-saved-href*="https"]'),
|
15
|
-
foxImageLinkUrlValueCheck: () => cy.get('[
|
15
|
+
foxImageLinkUrlValueCheck: () => cy.get('[src*="https://cdn.pixabay.com/photo/2016/11/29/03/28/fox-1867062_960_720.jpg"]'),
|
16
16
|
urlInputField: () => cy.get('input[class*="cke_dialog_ui_input_text"]').eq(1),
|
17
17
|
OkButton: () => cy.get('[title="OK"]'),
|
18
18
|
//Link Info
|
@@ -24,8 +24,8 @@ const selectors = {
|
|
24
24
|
linkTypeDropDown: () => cy.get('.cke_dialog_ui_input_select').eq(0),
|
25
25
|
protocolLabel: () => cy.get('.dialog-input-label').eq(2),
|
26
26
|
protocolDropDown: () => cy.get('.cke_dialog_ui_input_select').eq(1),
|
27
|
-
urlLabel: () => cy.get('.dialog-input-label').eq(
|
28
|
-
urlInputField: () => cy.get('.cke_dialog_ui_input_text').eq(
|
27
|
+
urlLabel: () => cy.get('.dialog-input-label').eq(0),
|
28
|
+
urlInputField: () => cy.get('.cke_dialog_ui_input_text').eq(0),
|
29
29
|
//Protocol
|
30
30
|
protocolDropDown: () => cy.get('.dialog-input-area').eq(2),
|
31
31
|
selectProtocolOptionDropdown: (protocolType = null) => {
|
package/package.json
CHANGED
@@ -1,56 +0,0 @@
|
|
1
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
-
import { liveItemPage } from "../../../pages/components/liveItemPage";
|
3
|
-
import utilities from "../../../support/helpers/utilities";
|
4
|
-
|
5
|
-
describe('Navigate to Live item page and view the page contents', () => {
|
6
|
-
before(() => {
|
7
|
-
cy.loginAs('admin');
|
8
|
-
});
|
9
|
-
|
10
|
-
describe('Live item page', () => {
|
11
|
-
abortEarlySetup();
|
12
|
-
before(() => {
|
13
|
-
liveItemPage.steps.navigateToLiveItemPage();
|
14
|
-
});
|
15
|
-
|
16
|
-
it('Live item heading should be displayed', () => {
|
17
|
-
utilities.verifyElementVisibilityState(liveItemPage.liveItemHeaderText(), 'visible');
|
18
|
-
utilities.verifyInnerText(liveItemPage.liveItemHeaderText(), 'Live Item Demo');
|
19
|
-
});
|
20
|
-
|
21
|
-
it('Item id should be displayed', () => {
|
22
|
-
utilities.verifyElementVisibilityState(liveItemPage.liveItemItemId(), 'visible');
|
23
|
-
utilities.verifyInnerText(liveItemPage.liveItemItemId(), 'Item: a61f2-1a16-eff1-421d-ba3defd3e643');
|
24
|
-
});
|
25
|
-
|
26
|
-
it('Student preview should be displayed', () => {
|
27
|
-
utilities.verifyElementVisibilityState(liveItemPage.liveItemStudentPreview(), 'visible');
|
28
|
-
utilities.verifyInnerText(liveItemPage.liveItemStudentPreview(), 'Student Preview');
|
29
|
-
});
|
30
|
-
|
31
|
-
it('Teacher preview should be displayed', () => {
|
32
|
-
utilities.verifyElementVisibilityState(liveItemPage.liveItemTeacherPreview(), 'visible');
|
33
|
-
utilities.verifyInnerText(liveItemPage.liveItemTeacherPreview(), 'Teacher Preview');
|
34
|
-
});
|
35
|
-
});
|
36
|
-
|
37
|
-
describe.only('Student preview content', () => {
|
38
|
-
abortEarlySetup();
|
39
|
-
before(() => {
|
40
|
-
liveItemPage.steps.navigateToLiveItemPage();
|
41
|
-
});
|
42
|
-
|
43
|
-
it('Student preview should be displayed', () => {
|
44
|
-
utilities.verifyElementVisibilityState(liveItemPage.liveItemStudentPreview(), 'visible');
|
45
|
-
utilities.verifyInnerText(liveItemPage.liveItemStudentPreview(), 'Student Preview');
|
46
|
-
cy.wait(2000);
|
47
|
-
liveItemPage.steps.checkOptionForQuestion(0, 1);
|
48
|
-
liveItemPage.steps.checkOptionForQuestion(1, 3);
|
49
|
-
liveItemPage.steps.checkOptionForQuestion(2, [1, 3]);
|
50
|
-
liveItemPage.steps.checkOptionForQuestion(3, 0);
|
51
|
-
liveItemPage.steps.checkOptionForQuestion(4, [0, 2]);
|
52
|
-
liveItemPage.steps.checkOptionForQuestion(5, 0);
|
53
|
-
liveItemPage.steps.checkOptionForQuestion(6, [1, 2, 3]);
|
54
|
-
});
|
55
|
-
});
|
56
|
-
});
|
@@ -1,58 +0,0 @@
|
|
1
|
-
import utilities from "../../support/helpers/utilities";
|
2
|
-
import { commonComponents } from "./commonComponents";
|
3
|
-
const css = Cypress.env('css');
|
4
|
-
|
5
|
-
const selectors = {
|
6
|
-
liveItemHeaderText: () => cy.get('[class*="HeaderTitleComponentstyles__HeaderTitleWrapper"]'),
|
7
|
-
liveItemItemId: () => cy.get('[class*="LiveItemDemostyles__ViewInfoWrapper"]'),
|
8
|
-
liveItemStudentPreview: () => cy.get('[class*="LiveItemDemostyles__LiveStudentHeader"]'),
|
9
|
-
liveItemTeacherPreview: () => cy.get('[class*="LiveTeacherPreviewstyles__LiveTeacherHeader"]'),
|
10
|
-
optionsRadioButtonForCorrectAnswer: () => cy.get('.radio-option-wrapper'),
|
11
|
-
optionsCheckboxForCorrectAnswer: () => cy.get('.mcq-option-wrapper'),
|
12
|
-
selectQuestion: ()=> cy.get('[class*="SinglePageAssessmentQuestionsstyles__QuestionPartContainer"]'),
|
13
|
-
};
|
14
|
-
|
15
|
-
const steps = {
|
16
|
-
navigateToLiveItemPage: () => {
|
17
|
-
cy.visit('/item-engine/demo/live-item-demo');
|
18
|
-
},
|
19
|
-
|
20
|
-
/**
|
21
|
-
* @description Checks the options checkbox in the 'Specify correct answer' section for single selection questions.
|
22
|
-
* @param {number} optionIndex - The index of the option checkbox to be checked.
|
23
|
-
*/
|
24
|
-
checkRadioOptionInStudentPreview: (optionIndex) => {
|
25
|
-
liveItemPage.optionsRadioButtonForCorrectAnswer()
|
26
|
-
.eq(optionIndex)
|
27
|
-
.click()
|
28
|
-
},
|
29
|
-
|
30
|
-
checkCheckboxInStudentPreview: (optionIndex) => {
|
31
|
-
liveItemPage.optionsCheckboxForCorrectAnswer()
|
32
|
-
.eq(optionIndex)
|
33
|
-
.click()
|
34
|
-
},
|
35
|
-
|
36
|
-
checkOptionForQuestion: (questionNumber, optionIndex) => {
|
37
|
-
liveItemPage.selectQuestion()
|
38
|
-
.eq(questionNumber)
|
39
|
-
.within(() => {
|
40
|
-
if (Array.isArray(optionIndex)) {
|
41
|
-
optionIndex.forEach((index) => {
|
42
|
-
liveItemPage.steps.checkCheckboxInStudentPreview(index);
|
43
|
-
});
|
44
|
-
} else {
|
45
|
-
liveItemPage.steps.checkRadioOptionInStudentPreview(optionIndex);
|
46
|
-
}
|
47
|
-
});
|
48
|
-
},
|
49
|
-
|
50
|
-
};
|
51
|
-
|
52
|
-
const tests = {};
|
53
|
-
|
54
|
-
export const liveItemPage = {
|
55
|
-
...selectors,
|
56
|
-
steps,
|
57
|
-
tests,
|
58
|
-
};
|