itemengine-cypress-automation 1.0.504-IEI-3415-3a7f542.0 → 1.0.504-IEI-3170-task-5158cdd.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/NumberLine/Scoring/toleranceThresholdScoring.js +1 -2
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +3 -6
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/toleranceThresholdScoring.js +1 -2
- package/cypress/e2e/ILC/NumberLineLabel/editTabScoring.js +3 -6
- package/cypress/pages/chartsLinePage.js +0 -1
- package/cypress/pages/components/layoutSectionComponent.js +12 -23
- package/cypress/pages/components/numberLineCommonComponent.js +33 -37
- package/package.json +1 -1
- package/cypress/e2e/ILC/ChartsBar/lineSettings.js +0 -64
- package/cypress/e2e/ILC/ChartsLine/lineSettings.js +0 -64
@@ -3,8 +3,7 @@ import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
const unselectedToolOption = ['Left ray', 'Right ray', 'Open left ray', 'Open right ray'];
|
4
4
|
const range = 22.18;
|
5
5
|
|
6
|
-
|
7
|
-
describe.skip('Create item page - Number line: All or nothing with Tolerance/Threshold', () => {
|
6
|
+
describe('Create item page - Number line: All or nothing with Tolerance/Threshold', () => {
|
8
7
|
before(() => {
|
9
8
|
cy.loginAs('admin');
|
10
9
|
});
|
@@ -33,8 +33,7 @@ describe('Create item page - Number line: Scoring section', () => {
|
|
33
33
|
numberLinePage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
34
34
|
});
|
35
35
|
|
36
|
-
|
37
|
-
// numberLinePage.tests.verifyToleranceThresholdLabelAndInputField();
|
36
|
+
numberLinePage.tests.verifyToleranceThresholdLabelAndInputField();
|
38
37
|
});
|
39
38
|
|
40
39
|
describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
|
@@ -84,8 +83,7 @@ describe('Create item page - Number line: Scoring section', () => {
|
|
84
83
|
utilities.verifyElementVisibilityState(numberLinePage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
85
84
|
});
|
86
85
|
|
87
|
-
|
88
|
-
// numberLinePage.tests.verifyToleranceThresholdLabelAndInputField();
|
86
|
+
numberLinePage.tests.verifyToleranceThresholdLabelAndInputField();
|
89
87
|
});
|
90
88
|
|
91
89
|
describe('Auto scored: Partial equal weights scoring - Specify correct answer section', () => {
|
@@ -174,8 +172,7 @@ describe('Create item page - Number line: Scoring section', () => {
|
|
174
172
|
utilities.verifyElementVisibilityState(numberLinePage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
175
173
|
});
|
176
174
|
|
177
|
-
|
178
|
-
// numberLinePage.tests.verifyToleranceThresholdLabelAndInputField();
|
175
|
+
numberLinePage.tests.verifyToleranceThresholdLabelAndInputField();
|
179
176
|
});
|
180
177
|
|
181
178
|
describe('Auto scored: Partial - different weights scoring - Specify correct answer section', () => {
|
@@ -2,8 +2,7 @@ import { numberLineLabelPage } from "../../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
3
|
const range = 22.2;
|
4
4
|
|
5
|
-
|
6
|
-
describe.skip('Create item page - Number line: All or nothing with Tolerance/Threshold', () => {
|
5
|
+
describe('Create item page - Number line: All or nothing with Tolerance/Threshold', () => {
|
7
6
|
before(() => {
|
8
7
|
cy.loginAs('admin');
|
9
8
|
});
|
@@ -35,8 +35,7 @@ describe('Create item page - Number line: Scoring section', () => {
|
|
35
35
|
numberLineLabelPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
36
36
|
});
|
37
37
|
|
38
|
-
|
39
|
-
// numberLineLabelPage.tests.verifyToleranceThresholdLabelAndInputField();
|
38
|
+
numberLineLabelPage.tests.verifyToleranceThresholdLabelAndInputField();
|
40
39
|
});
|
41
40
|
|
42
41
|
describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
|
@@ -84,8 +83,7 @@ describe('Create item page - Number line: Scoring section', () => {
|
|
84
83
|
utilities.verifyElementVisibilityState(numberLineLabelPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
85
84
|
});
|
86
85
|
|
87
|
-
|
88
|
-
// numberLineLabelPage.tests.verifyToleranceThresholdLabelAndInputField();
|
86
|
+
numberLineLabelPage.tests.verifyToleranceThresholdLabelAndInputField();
|
89
87
|
});
|
90
88
|
|
91
89
|
describe('Auto scored: Partial equal weights scoring - Specify correct answer section', () => {
|
@@ -170,8 +168,7 @@ describe('Create item page - Number line: Scoring section', () => {
|
|
170
168
|
utilities.verifyElementVisibilityState(numberLineLabelPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
171
169
|
});
|
172
170
|
|
173
|
-
|
174
|
-
// numberLineLabelPage.tests.verifyToleranceThresholdLabelAndInputField();
|
171
|
+
numberLineLabelPage.tests.verifyToleranceThresholdLabelAndInputField();
|
175
172
|
});
|
176
173
|
|
177
174
|
describe('Auto scored: Partial - different weights scoring - Specify correct answer section', () => {
|
@@ -15,7 +15,6 @@ const selectors = {
|
|
15
15
|
...selectQuestionResourceToolPage,
|
16
16
|
...autoScoredScoringSectionMultiResponseType,
|
17
17
|
...chartsCommonComponent,
|
18
|
-
...layoutSectionComponent,
|
19
18
|
...autoScoredSpecifyCorrectAnswerSection,
|
20
19
|
point: () => cy.get('.ngie-chart-point'),
|
21
20
|
selectChartTypePoint: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] .ngie-chart-point'),
|
@@ -57,8 +57,8 @@ const selectors = {
|
|
57
57
|
titlePopupAddLabelInputField: () => cy.get('[aria-labelledby="alert-dialog-title"] input'),
|
58
58
|
titlePopupCancelButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(0),
|
59
59
|
titlePopupSaveButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(1),
|
60
|
-
numberLineNumberLineSection: () => cy.get('
|
61
|
-
numberLineAxisNumberLineSection: () => cy.get('
|
60
|
+
numberLineNumberLineSection: () => cy.get('.number-line-grid-setting .ngie-jxgbox svg'),
|
61
|
+
numberLineAxisNumberLineSection: () => cy.get('.number-line-grid-setting .ngie-jxgbox svg line'),
|
62
62
|
numberLineTitleNumberLineSection: () => cy.get('[class*="LineGraphComponentsstyles__TitleContainer"]'),
|
63
63
|
minLabel: () => cy.get('[class*="CustomInputFieldWrapper"] [class*="CustomInputFieldLabel"]').eq(0),
|
64
64
|
minInputField: () => cy.get('[class*="CustomInputFieldWrapper"] input').eq(0),
|
@@ -68,27 +68,26 @@ const selectors = {
|
|
68
68
|
intervalInputField: () => cy.get('input[id="Interval"]'),
|
69
69
|
annotateEveryLabel: () => cy.get('[for="Annotate every"]'),
|
70
70
|
annotateEveryInputField: () => cy.get('input[id="Annotate every"]'),
|
71
|
-
lineSettingsToggleButtonWrapper: () => cy.get('
|
72
|
-
lineSettingsLabel: () => cy.get('
|
71
|
+
lineSettingsToggleButtonWrapper: () => cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(0),
|
72
|
+
lineSettingsLabel: () => cy.get('.number-line-grid-setting .single-select-toggle-group-title').eq(0),
|
73
73
|
lineSettingsToggleButton: (ariaLabel = null) => {
|
74
74
|
if (ariaLabel !== null) {
|
75
|
-
return cy.get('
|
75
|
+
return cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(0).find(`button[aria-label*="${ariaLabel}"]`);
|
76
76
|
} else {
|
77
|
-
return cy.get('
|
77
|
+
return cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(0).find('button');
|
78
78
|
}
|
79
79
|
},
|
80
|
-
displayNumbersToggleButtonWrapper: () => cy.get('
|
81
|
-
displayNumbersLabel: () => cy.get('
|
80
|
+
displayNumbersToggleButtonWrapper: () => cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(1),
|
81
|
+
displayNumbersLabel: () => cy.get('.number-line-grid-setting .single-select-toggle-group-title').eq(1),
|
82
82
|
displayNumbersToggleButton: (ariaLabel = null) => {
|
83
83
|
if (ariaLabel !== null) {
|
84
|
-
return cy.get('
|
84
|
+
return cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(1).find(`button[aria-label*="${ariaLabel}"]`);
|
85
85
|
} else {
|
86
|
-
return cy.get('
|
86
|
+
return cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(1).find('button');
|
87
87
|
}
|
88
88
|
},
|
89
|
-
displaySpecificAnnotationLabel: () => cy.get('
|
90
|
-
displaySpecificAnnotationInputField: () => cy.get('
|
91
|
-
chartYAxisLabels: () => cy.get('.ngie-charts-authoring .row-header-container .value-container'),
|
89
|
+
displaySpecificAnnotationLabel: () => cy.get('.number-line-grid-setting [class*="SpecificAnnotationWrapper"] [class*="PropertyLabel"]'),
|
90
|
+
displaySpecificAnnotationInputField: () => cy.get('.number-line-grid-setting [class*="SpecificAnnotationWrapper"] input')
|
92
91
|
}
|
93
92
|
|
94
93
|
const steps = {
|
@@ -824,16 +823,6 @@ const steps = {
|
|
824
823
|
verifyTextInHeightInputField: (value) => {
|
825
824
|
layoutSectionComponent.heightInputField()
|
826
825
|
.should('have.value', value);
|
827
|
-
},
|
828
|
-
|
829
|
-
/**
|
830
|
-
* Verifies that each chart Y-axis label matches the corresponding value in the expectedValues array.
|
831
|
-
* @param {string[]} expectedValues - An array of expected Y-axis label values to verify against the chart.
|
832
|
-
*/
|
833
|
-
verifyChartYAxisValues: (expectedValues) => {
|
834
|
-
layoutSectionComponent.chartYAxisLabels().each(($element, index) => {
|
835
|
-
cy.wrap($element).should('have.text', expectedValues[index]);
|
836
|
-
});
|
837
826
|
}
|
838
827
|
}
|
839
828
|
|
@@ -30,9 +30,8 @@ const selectors = {
|
|
30
30
|
nodesOnNumberLineOfSpecifyCorrectAnswerSection: () => cy.get('[class*="AnswerAccordionstyles__AnswerPanel"] .ngie-jxgbox [id*="ticks"][stroke-linecap="round"]'),
|
31
31
|
nodesOnNumberLineInPreviewTab: () => cy.get('[class*="TabsComponentstyles__PreviewWrapper"] .ngie-jxgbox [id*="ticks"][stroke-linecap="round"]'),
|
32
32
|
//scoring section
|
33
|
-
|
34
|
-
|
35
|
-
// toleranceThresholdInputField: () => cy.get('[class*="AllocatedPointsstyles__PointsWrapper"] input'),
|
33
|
+
toleranceThresholdLabel: () => cy.get('[class*="AllocatedPointsstyles__PointsWrapper"] .points-label'),
|
34
|
+
toleranceThresholdInputField: () => cy.get('[class*="AllocatedPointsstyles__PointsWrapper"] input'),
|
36
35
|
pointsInputField: () => cy.get('.ngie-accordion-detail .points-input-field input[type="text"]'),
|
37
36
|
pointsInputFieldForManualScoring: () => cy.get('.points-input-field input[type="text"]'),
|
38
37
|
|
@@ -355,19 +354,18 @@ const steps = {
|
|
355
354
|
});
|
356
355
|
},
|
357
356
|
|
358
|
-
//Uncomment these lines once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
359
357
|
/**
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
358
|
+
* Sets the tolerance threshold value for the numberline plot.
|
359
|
+
* @param {number} value - The value for the tolerance threshold.
|
360
|
+
*/
|
361
|
+
setToleranceThresholdValue: (value) => {
|
362
|
+
numberLineCommonComponent.toleranceThresholdInputField()
|
363
|
+
.clear()
|
364
|
+
.type(value)
|
365
|
+
.blur();
|
366
|
+
numberLineCommonComponent.toleranceThresholdInputField()
|
367
|
+
.should('have.value', value)
|
368
|
+
},
|
371
369
|
|
372
370
|
/**
|
373
371
|
* @param {number} points - The points to be allotted.
|
@@ -383,12 +381,11 @@ const steps = {
|
|
383
381
|
.blur();
|
384
382
|
},
|
385
383
|
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
// },
|
384
|
+
focusInOutOfToleranceThresholdInputField: () => {
|
385
|
+
numberLineCommonComponent.toleranceThresholdInputField()
|
386
|
+
.focus()
|
387
|
+
.blur();
|
388
|
+
},
|
392
389
|
|
393
390
|
/**
|
394
391
|
* @description - Allots points in the scoring section for manual scoring.
|
@@ -930,24 +927,23 @@ const tests = {
|
|
930
927
|
});
|
931
928
|
},
|
932
929
|
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
// });
|
930
|
+
verifyToleranceThresholdLabelAndInputField: () => {
|
931
|
+
it('Tolerance/Threshold label and input field should be displayed and by default input field should be empty', () => {
|
932
|
+
utilities.verifyElementVisibilityState(numberLineCommonComponent.toleranceThresholdLabel(), 'visible');
|
933
|
+
utilities.verifyInnerText(numberLineCommonComponent.toleranceThresholdLabel(), 'Tolerance');
|
934
|
+
utilities.verifyElementVisibilityState(numberLineCommonComponent.toleranceThresholdInputField(), 'visible');
|
935
|
+
numberLineCommonComponent.toleranceThresholdInputField().should('have.value', '');
|
936
|
+
});
|
941
937
|
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
938
|
+
it('When user focuses in and out of the Tolerance/Threshold input field then error message should not be displayed', () => {
|
939
|
+
numberLineCommonComponent.steps.focusInOutOfToleranceThresholdInputField();
|
940
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
941
|
+
});
|
946
942
|
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
943
|
+
it('User should be able to enter text in Tolerance/Threshold input field', () => {
|
944
|
+
numberLineCommonComponent.steps.setToleranceThresholdValue(2);
|
945
|
+
});
|
946
|
+
},
|
951
947
|
|
952
948
|
verifyThousandSeparatorContent: () => {
|
953
949
|
it(`Thousand separator label and 3 options ${thousandsSeparatorOptions} should be displayed and by default ${thousandsSeparatorOptions[0]} should be selected`, () => {
|
package/package.json
CHANGED
@@ -1,64 +0,0 @@
|
|
1
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
-
import { chartsBarPage } from "../../../pages";
|
3
|
-
import utilities from "../../../support/helpers/utilities";
|
4
|
-
|
5
|
-
const lineSettingsOptions = ['Integers', 'Decimals', 'Fractions', 'Mixed fractions'];
|
6
|
-
const integerValues = ['10', '9', '8', '7', '6', '5', '4', '3', '2', '1', '0'];
|
7
|
-
const integerIfDecimalsExist = ['10', '', '9', '', '8', '', '7', '', '6', '', '5', '', '4', '', '3', '', '2', '', '1', '', '0'];
|
8
|
-
const decimalValues = ['10', '9.5', '9', '8.5', '8', '7.5', '7', '6.5', '6', '5.5', '5', '4.5', '4', '3.5', '3', '2.5', '2', '1.5', '1', '0.5', '0'];
|
9
|
-
// The fraction values are represented like this: 19/2 = 192, 17/2 = 172, 3/2 = 32, 1/2 = 12 etc.
|
10
|
-
const fractionValues = ['10', '192', '9', '172', '8', '152', '7', '132', '6', '112', '5', '92', '4', '72', '3', '52', '2', '32', '1', '12', '0'];
|
11
|
-
// The mixed fraction values are represented like this: 9(1/2) = 912, 8(1/2) = 812, 2(1/2) = 212, 1/2 = 12 etc.
|
12
|
-
const mixedFractionValues = ['10', '912', '9', '812', '8', '712', '7', '612', '6', '512', '5', '412', '4', '312', '3', '212', '2', '112', '1', '12', '0'];
|
13
|
-
|
14
|
-
describe('Create item page - Charts - Bar: Line setting section', () => {
|
15
|
-
before(() => {
|
16
|
-
cy.loginAs('admin');
|
17
|
-
chartsBarPage.steps.navigateToCreateQuestion('charts');
|
18
|
-
cy.barsPreLoaderWait();
|
19
|
-
chartsBarPage.steps.selectLineButton();
|
20
|
-
});
|
21
|
-
|
22
|
-
describe('Line setting section contents', () => {
|
23
|
-
abortEarlySetup();
|
24
|
-
it(`Line settings label and 4 options ${lineSettingsOptions} should be displayed and by default ${lineSettingsOptions[0]} should be selected`, () => {
|
25
|
-
utilities.verifyInnerText(chartsBarPage.lineSettingsLabel(), 'Line settings');
|
26
|
-
utilities.verifyElementVisibilityState(chartsBarPage.lineSettingsLabel(), 'visible');
|
27
|
-
utilities.verifyElementVisibilityState(chartsBarPage.lineSettingsToggleButton(), 'visible');
|
28
|
-
utilities.verifyElementCount(chartsBarPage.lineSettingsToggleButton(), 4);
|
29
|
-
lineSettingsOptions.forEach((label) => {
|
30
|
-
utilities.verifyInnerText(chartsBarPage.lineSettingsToggleButton(label), label);
|
31
|
-
utilities.verifyElementVisibilityState(chartsBarPage.lineSettingsToggleButton(label), 'visible');
|
32
|
-
});
|
33
|
-
chartsBarPage.steps.verifyLineSettingsToggleButtonSelected(lineSettingsOptions[0]);
|
34
|
-
chartsBarPage.steps.verifyChartYAxisValues(integerValues);
|
35
|
-
});
|
36
|
-
});
|
37
|
-
|
38
|
-
describe('Functionality of line settings section', () => {
|
39
|
-
abortEarlySetup();
|
40
|
-
it('When integer option is selected in line settings, integer values should be displayed in labels and decimal values should not be displayed in labels', () => {
|
41
|
-
chartsBarPage.steps.enterTextInIntervalInputField(0.5);
|
42
|
-
cy.wait(500);
|
43
|
-
chartsBarPage.steps.verifyChartYAxisValues(integerIfDecimalsExist);
|
44
|
-
});
|
45
|
-
|
46
|
-
it('When decimal option is selected in line settings, decimal values should be displayed in labels', () => {
|
47
|
-
chartsBarPage.steps.selectLineSettingsToggleButton(lineSettingsOptions[1]);
|
48
|
-
cy.wait(500);
|
49
|
-
chartsBarPage.steps.verifyChartYAxisValues(decimalValues);
|
50
|
-
});
|
51
|
-
|
52
|
-
it('When fraction option is selected in line settings, fraction values should be displayed in labels', () => {
|
53
|
-
chartsBarPage.steps.selectLineSettingsToggleButton(lineSettingsOptions[2]);
|
54
|
-
cy.wait(500);
|
55
|
-
chartsBarPage.steps.verifyChartYAxisValues(fractionValues);
|
56
|
-
});
|
57
|
-
|
58
|
-
it('When mixed fraction option is selected in line settings, mixed fraction values should be displayed in labels', () => {
|
59
|
-
chartsBarPage.steps.selectLineSettingsToggleButton(lineSettingsOptions[3]);
|
60
|
-
cy.wait(500);
|
61
|
-
chartsBarPage.steps.verifyChartYAxisValues(mixedFractionValues);
|
62
|
-
});
|
63
|
-
});
|
64
|
-
});
|
@@ -1,64 +0,0 @@
|
|
1
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
-
import { chartsLinePage, dialogBoxBase } from "../../../pages";
|
3
|
-
import utilities from "../../../support/helpers/utilities";
|
4
|
-
|
5
|
-
const lineSettingsOptions = ['Integers', 'Decimals', 'Fractions', 'Mixed fractions'];
|
6
|
-
const integerValues = ['10', '9', '8', '7', '6', '5', '4', '3', '2', '1', '0'];
|
7
|
-
const integerIfDecimalsExist = ['10', '', '9', '', '8', '', '7', '', '6', '', '5', '', '4', '', '3', '', '2', '', '1', '', '0'];
|
8
|
-
const decimalValues = ['10', '9.5', '9', '8.5', '8', '7.5', '7', '6.5', '6', '5.5', '5', '4.5', '4', '3.5', '3', '2.5', '2', '1.5', '1', '0.5', '0'];
|
9
|
-
// The fraction values are represented like this: 19/2 = 192, 17/2 = 172, 3/2 = 32, 1/2 = 12 etc.
|
10
|
-
const fractionValues = ['10', '192', '9', '172', '8', '152', '7', '132', '6', '112', '5', '92', '4', '72', '3', '52', '2', '32', '1', '12', '0'];
|
11
|
-
// The mixed fraction values are represented like this: 9(1/2) = 912, 8(1/2) = 812, 2(1/2) = 212, 1/2 = 12 etc.
|
12
|
-
const mixedFractionValues = ['10', '912', '9', '812', '8', '712', '7', '612', '6', '512', '5', '412', '4', '312', '3', '212', '2', '112', '1', '12', '0'];
|
13
|
-
|
14
|
-
describe('Create item page - Charts - Line: Line setting section', () => {
|
15
|
-
before(() => {
|
16
|
-
cy.loginAs('admin');
|
17
|
-
chartsLinePage.steps.navigateToCreateQuestion('charts');
|
18
|
-
cy.barsPreLoaderWait();
|
19
|
-
chartsLinePage.steps.selectLineButton();
|
20
|
-
});
|
21
|
-
|
22
|
-
describe('Line setting section contents', () => {
|
23
|
-
abortEarlySetup();
|
24
|
-
it(`Line settings label and 4 options ${lineSettingsOptions} should be displayed and by default ${lineSettingsOptions[0]} should be selected`, () => {
|
25
|
-
utilities.verifyInnerText(chartsLinePage.lineSettingsLabel(), 'Line settings');
|
26
|
-
utilities.verifyElementVisibilityState(chartsLinePage.lineSettingsLabel(), 'visible');
|
27
|
-
utilities.verifyElementVisibilityState(chartsLinePage.lineSettingsToggleButton(), 'visible');
|
28
|
-
utilities.verifyElementCount(chartsLinePage.lineSettingsToggleButton(), 4);
|
29
|
-
lineSettingsOptions.forEach((label) => {
|
30
|
-
utilities.verifyInnerText(chartsLinePage.lineSettingsToggleButton(label), label);
|
31
|
-
utilities.verifyElementVisibilityState(chartsLinePage.lineSettingsToggleButton(label), 'visible');
|
32
|
-
});
|
33
|
-
chartsLinePage.steps.verifyLineSettingsToggleButtonSelected(lineSettingsOptions[0]);
|
34
|
-
chartsLinePage.steps.verifyChartYAxisValues(integerValues);
|
35
|
-
});
|
36
|
-
});
|
37
|
-
|
38
|
-
describe('Functionality of line settings section', () => {
|
39
|
-
abortEarlySetup();
|
40
|
-
it('When integer option is selected in line settings, integer values should be displayed in labels and decimal values should not be displayed in labels', () => {
|
41
|
-
chartsLinePage.steps.enterTextInIntervalInputField(0.5);
|
42
|
-
cy.wait(500);
|
43
|
-
chartsLinePage.steps.verifyChartYAxisValues(integerIfDecimalsExist);
|
44
|
-
});
|
45
|
-
|
46
|
-
it('When decimal option is selected in line settings, decimal values should be displayed in labels', () => {
|
47
|
-
chartsLinePage.steps.selectLineSettingsToggleButton(lineSettingsOptions[1]);
|
48
|
-
cy.wait(500);
|
49
|
-
chartsLinePage.steps.verifyChartYAxisValues(decimalValues);
|
50
|
-
});
|
51
|
-
|
52
|
-
it('When fraction option is selected in line settings, fraction values should be displayed in labels', () => {
|
53
|
-
chartsLinePage.steps.selectLineSettingsToggleButton(lineSettingsOptions[2]);
|
54
|
-
cy.wait(500);
|
55
|
-
chartsLinePage.steps.verifyChartYAxisValues(fractionValues);
|
56
|
-
});
|
57
|
-
|
58
|
-
it('When mixed fraction option is selected in line settings, mixed fraction values should be displayed in labels', () => {
|
59
|
-
chartsLinePage.steps.selectLineSettingsToggleButton(lineSettingsOptions[3]);
|
60
|
-
cy.wait(500);
|
61
|
-
chartsLinePage.steps.verifyChartYAxisValues(mixedFractionValues);
|
62
|
-
});
|
63
|
-
});
|
64
|
-
});
|