itemengine-cypress-automation 1.0.514-IEI-3834-060a7e4.0 → 1.0.514-IEI-6793-v4-1dee8d0.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.
@@ -2,7 +2,6 @@
|
|
2
2
|
import { chartsDotPlotPage, dialogBoxBase } from "../../../pages";
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
4
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
5
|
-
const css = Cypress.env('css');
|
6
5
|
|
7
6
|
describe('Dot plot - Dot type and Label options', () => {
|
8
7
|
before(() => {
|
@@ -233,70 +232,4 @@ describe('Dot plot - Dot type and Label options', () => {
|
|
233
232
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
234
233
|
});
|
235
234
|
});
|
236
|
-
|
237
|
-
describe('Display minor nodes checkbox - content and functionality', () => {
|
238
|
-
abortEarlySetup();
|
239
|
-
before(() => {
|
240
|
-
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
241
|
-
cy.barsPreLoaderWait();
|
242
|
-
chartsDotPlotPage.steps.selectDotPlot();
|
243
|
-
chartsDotPlotPage.steps.enterTextInMinInputField(2);
|
244
|
-
chartsDotPlotPage.steps.enterTextInMaxInputField(5);
|
245
|
-
|
246
|
-
});
|
247
|
-
|
248
|
-
it('Display minor nodes label and checkbox should be displayed and by default checkbox should be checked', () => {
|
249
|
-
utilities.verifyInnerText(chartsDotPlotPage.displayMinorNodeLabel(), 'Display minor nodes');
|
250
|
-
utilities.verifyElementVisibilityState(chartsDotPlotPage.displayMinorNodeLabel(), 'visible');
|
251
|
-
chartsDotPlotPage.steps.verifyDisplayMinorNodesCheckboxChecked();
|
252
|
-
});
|
253
|
-
|
254
|
-
it('When the Display minor nodes checkbox is checked then minor nodes should be displayed in the chart', () => {
|
255
|
-
chartsDotPlotPage.steps.verifyMinorNodesInSelectChartTypeSectionIsVisible();
|
256
|
-
chartsDotPlotPage.steps.verifyMinorNodesInSpecifyCorrectAnswerSectionIsVisible();
|
257
|
-
});
|
258
|
-
|
259
|
-
it('When user unchecks the Display minor nodes checkbox then minor nodes should not be displayed in the chart', () => {
|
260
|
-
chartsDotPlotPage.steps.clickOnDisplayMinorNodeCheckbox();
|
261
|
-
chartsDotPlotPage.steps.verifyDisplayMinorNodesCheckboxUnchecked();
|
262
|
-
chartsDotPlotPage.steps.verifyMinorNodesNotDisplayedInSelectChartTypeSection();
|
263
|
-
chartsDotPlotPage.steps.verifyMinorNodesNotDisplayedInSpecifyCorrectAnswerSection();
|
264
|
-
});
|
265
|
-
|
266
|
-
it('CSS of Display minor nodes checkbox', { tags: 'css' }, () => {
|
267
|
-
utilities.verifyCSS(chartsDotPlotPage.displayMinorNodeLabel(), {
|
268
|
-
'color': css.color.labels,
|
269
|
-
'font-size': css.fontSize.normal,
|
270
|
-
'font-weight': css.fontWeight.regular
|
271
|
-
});
|
272
|
-
});
|
273
|
-
|
274
|
-
it('Accessibility of Display minor nodes checkbox', { tags: 'a11y' }, () => {
|
275
|
-
cy.checkAccessibility(chartsDotPlotPage.displayMinorNodeLabel().parents('[class*="Chartsstyles__ChartsQuestionWrapper"]'));
|
276
|
-
});
|
277
|
-
});
|
278
|
-
|
279
|
-
describe('Display minor nodes checkbox - preview tab functionality', () => {
|
280
|
-
abortEarlySetup();
|
281
|
-
before(() => {
|
282
|
-
chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
|
283
|
-
cy.barsPreLoaderWait();
|
284
|
-
chartsDotPlotPage.steps.selectDotPlot();
|
285
|
-
chartsDotPlotPage.steps.enterTextInMinInputField(2);
|
286
|
-
chartsDotPlotPage.steps.enterTextInMaxInputField(5);
|
287
|
-
chartsDotPlotPage.steps.switchToPreviewTab();
|
288
|
-
});
|
289
|
-
|
290
|
-
it('When the Display minor nodes checkbox is checked in edit tab then minor nodes should be displayed in the graph in preview tab', () => {
|
291
|
-
chartsDotPlotPage.steps.verifyMinorNodesInPreviewTabSectionIsVisible();
|
292
|
-
});
|
293
|
-
|
294
|
-
it('When user unchecks the Display minor nodes checkbox in edit tab then minor nodes should not be displayed in the graph in preview tab', () => {
|
295
|
-
chartsDotPlotPage.steps.switchToEditTab();
|
296
|
-
chartsDotPlotPage.steps.clickOnDisplayMinorNodeCheckbox();
|
297
|
-
chartsDotPlotPage.steps.verifyDisplayMinorNodesCheckboxUnchecked();
|
298
|
-
chartsDotPlotPage.steps.switchToPreviewTab();
|
299
|
-
chartsDotPlotPage.steps.verifyMinorNodesNotDisplayedInPreviewTabSection();
|
300
|
-
});
|
301
|
-
});
|
302
235
|
})
|
@@ -172,8 +172,7 @@
|
|
172
172
|
"deletePageColor": "rgb(124, 0, 0)",
|
173
173
|
"dropdownDefaultBG": "rgb(227, 240, 237)",
|
174
174
|
"strategyTextDisabled": "rgb(107, 107, 142)",
|
175
|
-
"secondaryBtnBorderDisabled": "rgba(186, 201, 255, 0.5)"
|
176
|
-
"minorNodeBorderColor": "rgb(132, 133, 205)"
|
175
|
+
"secondaryBtnBorderDisabled": "rgba(186, 201, 255, 0.5)"
|
177
176
|
},
|
178
177
|
"fontSize": {
|
179
178
|
"extraSmall": "10px",
|
@@ -4,7 +4,6 @@ import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage
|
|
4
4
|
import { dialogBoxBase } from "./dialogBoxBase";
|
5
5
|
import { createItemPage } from "./createItemPage";
|
6
6
|
const css = Cypress.env('css');
|
7
|
-
const minorNodesPosition = [1,2,4,5,6,8,9,10]
|
8
7
|
|
9
8
|
const selectors = {
|
10
9
|
...questionInstructionsComponent,
|
@@ -48,7 +47,6 @@ const selectors = {
|
|
48
47
|
allowStudentsToEditLabel: () => cy.get('[class*="LabelOptionsWrapper"] .additional-settings-label'),
|
49
48
|
xAxisLabelSelectChartType: () => cy.get('[class*="LabelOptionsWrapper"] .MuiFormControlLabel-label'),
|
50
49
|
xAxisCheckBox: () => cy.get('[class*="LabelOptionsWrapper"] input'),
|
51
|
-
minorNodesEditTab: () => cy.get('.ngie-dot-plot-chart .number-line'),
|
52
50
|
|
53
51
|
//Specify correct answer
|
54
52
|
dotColumnSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail .ngie-chart-point'),
|
@@ -68,7 +66,6 @@ const selectors = {
|
|
68
66
|
numberLineAxisSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail .number-line-wrapper'),
|
69
67
|
dotColumnLockIconSpecifyCorrectAnswer: () => cy.get('[class*="LockIconWrapper"]'),
|
70
68
|
dotPlotChartSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail [class*="DotPlotChartstyles__ChartWrapper"]'),
|
71
|
-
minorNodesSpecifyCorrectAnswerSection: () => cy.get('.ngie-accordion-detail .number-line'),
|
72
69
|
|
73
70
|
//scoring
|
74
71
|
toleranceThresholdLabel: () => cy.get('[class*="AllocatedPointsstyles__PointsWrapper"] .points-label'),
|
@@ -92,8 +89,6 @@ const selectors = {
|
|
92
89
|
dotPlotChartPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__ChartWrapper"]').eq(0),
|
93
90
|
numberLineAxisPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .number-line-wrapper').eq(0),
|
94
91
|
labelsNumberLineAxisPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__BottomWrapper"]').eq(0).find('.label-wrapper [class*="DotPlotChartstyles__Label"]'),
|
95
|
-
minorNodesPreviewTabSection: () => cy.get('[class*="question-preview-wrapper"] .number-line'),
|
96
|
-
|
97
92
|
//Correct answer section
|
98
93
|
correctAnswersLabel: () => cy.get('[class*="CorrectAnswerHeader"]:visible'),
|
99
94
|
dotPlotChartCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__ChartWrapper"]').eq(1),
|
@@ -1679,69 +1674,6 @@ const steps = {
|
|
1679
1674
|
.should('have.value', points);
|
1680
1675
|
});
|
1681
1676
|
},
|
1682
|
-
|
1683
|
-
clickOnDisplayMinorNodeCheckbox:()=>{
|
1684
|
-
layoutSectionComponent.displayMinorNodeCheckbox()
|
1685
|
-
.click();
|
1686
|
-
},
|
1687
|
-
|
1688
|
-
verifyDisplayMinorNodesCheckboxChecked:()=>{
|
1689
|
-
layoutSectionComponent.displayMinorNodeCheckbox()
|
1690
|
-
.should('be.checked');
|
1691
|
-
},
|
1692
|
-
|
1693
|
-
verifyDisplayMinorNodesCheckboxUnchecked:()=>{
|
1694
|
-
layoutSectionComponent.displayMinorNodeCheckbox()
|
1695
|
-
.should('not.be.checked');
|
1696
|
-
},
|
1697
|
-
|
1698
|
-
verifyMinorNodesInSelectChartTypeSectionIsVisible: () => {
|
1699
|
-
minorNodesPosition.forEach((index) => {
|
1700
|
-
chartsDotPlotPage.minorNodesEditTab()
|
1701
|
-
.eq(index)
|
1702
|
-
.should('have.css', 'border-right', `1px solid ${css.color.minorNodeBorderColor}`);
|
1703
|
-
});
|
1704
|
-
},
|
1705
|
-
|
1706
|
-
verifyMinorNodesInSpecifyCorrectAnswerSectionIsVisible: () => {
|
1707
|
-
minorNodesPosition.forEach((index) => {
|
1708
|
-
chartsDotPlotPage.minorNodesSpecifyCorrectAnswerSection()
|
1709
|
-
.eq(index)
|
1710
|
-
.should('have.css', 'border-right', `1px solid ${css.color.minorNodeBorderColor}`);
|
1711
|
-
});
|
1712
|
-
},
|
1713
|
-
|
1714
|
-
verifyMinorNodesInPreviewTabSectionIsVisible: () => {
|
1715
|
-
minorNodesPosition.forEach((index) => {
|
1716
|
-
chartsDotPlotPage.minorNodesPreviewTabSection()
|
1717
|
-
.eq(index)
|
1718
|
-
.should('have.css', 'border-right', `1px solid ${css.color.minorNodeBorderColor}`);
|
1719
|
-
});
|
1720
|
-
},
|
1721
|
-
|
1722
|
-
verifyMinorNodesNotDisplayedInSelectChartTypeSection: () => {
|
1723
|
-
minorNodesPosition.forEach((index) => {
|
1724
|
-
chartsDotPlotPage.minorNodesEditTab()
|
1725
|
-
.eq(index)
|
1726
|
-
.should('have.css', 'border-right-style', 'none');
|
1727
|
-
});
|
1728
|
-
},
|
1729
|
-
|
1730
|
-
verifyMinorNodesNotDisplayedInSpecifyCorrectAnswerSection: () => {
|
1731
|
-
minorNodesPosition.forEach((index) => {
|
1732
|
-
chartsDotPlotPage.minorNodesSpecifyCorrectAnswerSection()
|
1733
|
-
.eq(index)
|
1734
|
-
.should('have.css', 'border-right-style', 'none');
|
1735
|
-
});
|
1736
|
-
},
|
1737
|
-
|
1738
|
-
verifyMinorNodesNotDisplayedInPreviewTabSection: () => {
|
1739
|
-
minorNodesPosition.forEach((index) => {
|
1740
|
-
chartsDotPlotPage.minorNodesPreviewTabSection()
|
1741
|
-
.eq(index)
|
1742
|
-
.should('have.css', 'border-right-style', 'none');
|
1743
|
-
});
|
1744
|
-
}
|
1745
1677
|
}
|
1746
1678
|
|
1747
1679
|
const tests = {
|
package/package.json
CHANGED
@@ -315,5 +315,19 @@ export function runSorryCypressTest() {
|
|
315
315
|
console.log('envArgs:', envArgs);
|
316
316
|
let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec "cypress/e2e/ILC/test/**/*.js"`;
|
317
317
|
console.log(`command: ${command}`);
|
318
|
-
|
318
|
+
try {
|
319
|
+
execSync(command, { stdio: "inherit" });
|
320
|
+
} catch (error) {
|
321
|
+
console.error("One or more tests failed to pass, OR an error occurred during run");
|
322
|
+
console.error("Cypress run error details:", {
|
323
|
+
status: error.status,
|
324
|
+
message: error.message,
|
325
|
+
stack: error.stack
|
326
|
+
});
|
327
|
+
|
328
|
+
console.log("Exiting process with code: 1");
|
329
|
+
process.exit(1);
|
330
|
+
}
|
331
|
+
console.log("Cypress tests all passed successfully. Exiting process with code: 0");
|
332
|
+
process.exit(0);
|
319
333
|
}
|