itemengine-cypress-automation 1.0.474-IEI-6720-3277ec2.0 → 1.0.475-IEI-3170-new-e700c1a.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 +2 -1
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +6 -3
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/toleranceThresholdScoring.js +2 -1
- package/cypress/e2e/ILC/NumberLineLabel/editTabScoring.js +6 -3
- package/cypress/pages/components/createQuestionBasePage.js +1 -1
- package/cypress/pages/components/numberLineCommonComponent.js +46 -43
- package/package.json +1 -1
- package/cypress/e2e/ILC/MultipleSelection/responseModeToggle.js +0 -70
- package/cypress/e2e/ILC/SingleSelection/responseModeToggle.js +0 -70
- package/cypress/pages/components/responseModeToggle.js +0 -72
@@ -3,7 +3,8 @@ 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
|
-
|
6
|
+
//Uncomment this line once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
7
|
+
describe.skip('Create item page - Number line: All or nothing with Tolerance/Threshold', () => {
|
7
8
|
before(() => {
|
8
9
|
cy.loginAs('admin');
|
9
10
|
});
|
@@ -33,7 +33,8 @@ describe('Create item page - Number line: Scoring section', () => {
|
|
33
33
|
numberLinePage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
34
34
|
});
|
35
35
|
|
36
|
-
|
36
|
+
//Uncomment this line once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
37
|
+
// numberLinePage.tests.verifyToleranceThresholdLabelAndInputField();
|
37
38
|
});
|
38
39
|
|
39
40
|
describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
|
@@ -83,7 +84,8 @@ describe('Create item page - Number line: Scoring section', () => {
|
|
83
84
|
utilities.verifyElementVisibilityState(numberLinePage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
84
85
|
});
|
85
86
|
|
86
|
-
|
87
|
+
//Uncomment this line once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
88
|
+
// numberLinePage.tests.verifyToleranceThresholdLabelAndInputField();
|
87
89
|
});
|
88
90
|
|
89
91
|
describe('Auto scored: Partial equal weights scoring - Specify correct answer section', () => {
|
@@ -172,7 +174,8 @@ describe('Create item page - Number line: Scoring section', () => {
|
|
172
174
|
utilities.verifyElementVisibilityState(numberLinePage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
173
175
|
});
|
174
176
|
|
175
|
-
|
177
|
+
//Uncomment this line once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
178
|
+
// numberLinePage.tests.verifyToleranceThresholdLabelAndInputField();
|
176
179
|
});
|
177
180
|
|
178
181
|
describe('Auto scored: Partial - different weights scoring - Specify correct answer section', () => {
|
@@ -2,7 +2,8 @@ import { numberLineLabelPage } from "../../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
3
|
const range = 22.2;
|
4
4
|
|
5
|
-
|
5
|
+
// Remove skip this once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
6
|
+
describe.skip('Create item page - Number line: All or nothing with Tolerance/Threshold', () => {
|
6
7
|
before(() => {
|
7
8
|
cy.loginAs('admin');
|
8
9
|
});
|
@@ -35,7 +35,8 @@ describe('Create item page - Number line: Scoring section', () => {
|
|
35
35
|
numberLineLabelPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
36
36
|
});
|
37
37
|
|
38
|
-
|
38
|
+
//Uncomment this line once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
39
|
+
// numberLineLabelPage.tests.verifyToleranceThresholdLabelAndInputField();
|
39
40
|
});
|
40
41
|
|
41
42
|
describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
|
@@ -83,7 +84,8 @@ describe('Create item page - Number line: Scoring section', () => {
|
|
83
84
|
utilities.verifyElementVisibilityState(numberLineLabelPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
84
85
|
});
|
85
86
|
|
86
|
-
|
87
|
+
//Uncomment this line once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
88
|
+
// numberLineLabelPage.tests.verifyToleranceThresholdLabelAndInputField();
|
87
89
|
});
|
88
90
|
|
89
91
|
describe('Auto scored: Partial equal weights scoring - Specify correct answer section', () => {
|
@@ -168,7 +170,8 @@ describe('Create item page - Number line: Scoring section', () => {
|
|
168
170
|
utilities.verifyElementVisibilityState(numberLineLabelPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
169
171
|
});
|
170
172
|
|
171
|
-
|
173
|
+
//Uncomment this line once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
174
|
+
// numberLineLabelPage.tests.verifyToleranceThresholdLabelAndInputField();
|
172
175
|
});
|
173
176
|
|
174
177
|
describe('Auto scored: Partial - different weights scoring - Specify correct answer section', () => {
|
@@ -12,7 +12,7 @@ const css = Cypress.env('css');
|
|
12
12
|
const selectors = {
|
13
13
|
previewTab: () => cy.get('[data-ngie-testid="preview-tab"]'),
|
14
14
|
editTab: () => cy.get('[data-ngie-testid="edit-tab"]'),
|
15
|
-
headerTitle: () => cy.get('
|
15
|
+
headerTitle: () => cy.get('div[class*="HeaderComponentstyles__BlockLabel"]'),
|
16
16
|
cancelButton: () => cy.get('[class*="header-wrapper"] .ngie-button').eq(0),
|
17
17
|
saveQuestionButton: () => cy.get('[class*="header-wrapper"] .ngie-button').eq(1),
|
18
18
|
//Note: Adding visible as this is hidden in tools and does not exist in questions
|
@@ -25,9 +25,10 @@ const selectors = {
|
|
25
25
|
nodesOnNumberLineOfSpecifyCorrectAnswerSection: () => cy.get('[class*="AnswerAccordionstyles__AnswerPanel"] .ngie-jxgbox [id*="ticks"][stroke-linecap="round"]'),
|
26
26
|
nodesOnNumberLineInPreviewTab: () => cy.get('[class*="TabsComponentstyles__PreviewWrapper"] .ngie-jxgbox [id*="ticks"][stroke-linecap="round"]'),
|
27
27
|
//scoring section
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
//Uncomment this lines once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
29
|
+
// toleranceThresholdLabel: () => cy.get('[class*="AllocatedPointsstyles__PointsWrapper"] .points-label'),
|
30
|
+
// toleranceThresholdInputField: () => cy.get('[class*="AllocatedPointsstyles__PointsWrapper"] input'),
|
31
|
+
// pointsInputField: () => cy.get('.ngie-accordion-detail .points-input-field input[type="text"]'),
|
31
32
|
}
|
32
33
|
|
33
34
|
const steps = {
|
@@ -341,38 +342,39 @@ const steps = {
|
|
341
342
|
});
|
342
343
|
},
|
343
344
|
|
345
|
+
//Uncomment this lines once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
344
346
|
/**
|
345
347
|
* Sets the tolerance threshold value for the numberline plot.
|
346
348
|
* @param {number} value - The value for the tolerance threshold.
|
347
349
|
*/
|
348
|
-
setToleranceThresholdValue: (value) => {
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
},
|
350
|
+
// setToleranceThresholdValue: (value) => {
|
351
|
+
// numberLineCommonComponent.toleranceThresholdInputField()
|
352
|
+
// .clear()
|
353
|
+
// .type(value)
|
354
|
+
// .blur();
|
355
|
+
// numberLineCommonComponent.toleranceThresholdInputField()
|
356
|
+
// .should('have.value', value)
|
357
|
+
// },
|
356
358
|
|
357
359
|
/**
|
358
360
|
* @param {number} points - The points to be allotted.
|
359
361
|
* @description - Allots points in the scoring section.
|
360
362
|
*/
|
361
|
-
allotPoints: (points) => {
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
},
|
370
|
-
|
371
|
-
focusInOutOfToleranceThresholdInputField: () => {
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
},
|
363
|
+
// allotPoints: (points) => {
|
364
|
+
// numberLineCommonComponent.pointsInputField()
|
365
|
+
// .clear()
|
366
|
+
// .type(`${points}`)
|
367
|
+
// .wait(1000);
|
368
|
+
// numberLineCommonComponent.pointsInputField()
|
369
|
+
// .should('have.value', points)
|
370
|
+
// .blur();
|
371
|
+
// },
|
372
|
+
|
373
|
+
// focusInOutOfToleranceThresholdInputField: () => {
|
374
|
+
// numberLineCommonComponent.toleranceThresholdInputField()
|
375
|
+
// .focus()
|
376
|
+
// .blur();
|
377
|
+
// },
|
376
378
|
|
377
379
|
}
|
378
380
|
|
@@ -783,23 +785,24 @@ const tests = {
|
|
783
785
|
});
|
784
786
|
},
|
785
787
|
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
}
|
788
|
+
//Uncomment this lines once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
789
|
+
// verifyToleranceThresholdLabelAndInputField: () => {
|
790
|
+
// it('Tolerance/Threshold label and input field should be displayed and by default input field should be empty', () => {
|
791
|
+
// utilities.verifyElementVisibilityState(numberLineCommonComponent.toleranceThresholdLabel(), 'visible');
|
792
|
+
// utilities.verifyInnerText(numberLineCommonComponent.toleranceThresholdLabel(), 'Tolerance');
|
793
|
+
// utilities.verifyElementVisibilityState(numberLineCommonComponent.toleranceThresholdInputField(), 'visible');
|
794
|
+
// numberLineCommonComponent.toleranceThresholdInputField().should('have.value', '');
|
795
|
+
// });
|
796
|
+
|
797
|
+
// it('When user focuses in and out of the Tolerance/Threshold input field then error message should not be displayed', () => {
|
798
|
+
// numberLineCommonComponent.steps.focusInOutOfToleranceThresholdInputField();
|
799
|
+
// utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
800
|
+
// });
|
801
|
+
|
802
|
+
// it('User should be able to enter text in Tolerance/Threshold input field', () => {
|
803
|
+
// numberLineCommonComponent.steps.setToleranceThresholdValue(2);
|
804
|
+
// });
|
805
|
+
// }
|
803
806
|
}
|
804
807
|
|
805
808
|
export const numberLineCommonComponent = {
|
package/package.json
CHANGED
@@ -1,70 +0,0 @@
|
|
1
|
-
import { createItemPage, itemPreviewPage, multipleSelectionPage, singleSelectionPage } from "../../../pages";
|
2
|
-
import utilities from "../../../support/helpers/utilities";
|
3
|
-
import { responseModeToggle } from "../../../pages/components/responseModeToggle";
|
4
|
-
|
5
|
-
const options = ['Animal', 'Vehicle', 'Birds', 'Insects'];
|
6
|
-
|
7
|
-
let itemReferenceID = '';
|
8
|
-
|
9
|
-
describe('Multiple selection - Response mode toggle', () => {
|
10
|
-
describe('response mode toggle', () => {
|
11
|
-
before(() => {
|
12
|
-
cy.loginAs('admin');
|
13
|
-
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
14
|
-
cy.barsPreLoaderWait();
|
15
|
-
multipleSelectionPage.steps.addQuestionInstructions();
|
16
|
-
multipleSelectionPage.steps.addInputToOptionsInputField(options);
|
17
|
-
multipleSelectionPage.steps.allotPoints(20);
|
18
|
-
});
|
19
|
-
|
20
|
-
after(() => {
|
21
|
-
cy.deleteItem(itemReferenceID);
|
22
|
-
cy.logout();
|
23
|
-
});
|
24
|
-
|
25
|
-
it('should load multiple selection create page with responseMode toggle button', () => {
|
26
|
-
});
|
27
|
-
|
28
|
-
it('should be able to change responseMode when no answer is provided', () => {
|
29
|
-
responseModeToggle.tests.shouldChangeResponseMode('Multiple selection', 'Single selection');
|
30
|
-
});
|
31
|
-
|
32
|
-
it('should not be able to change responseMode when an answer is provided', () => {
|
33
|
-
responseModeToggle.tests.shouldChangeResponseMode('Single selection', 'Multiple selection');
|
34
|
-
multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(1);
|
35
|
-
responseModeToggle.tests.shouldWarnResponseModeChange('Multiple selection', 'Single selection', false);
|
36
|
-
});
|
37
|
-
|
38
|
-
it('should be able to change response mode when warning popup is accepted', () => {
|
39
|
-
responseModeToggle.tests.shouldWarnResponseModeChange('Multiple selection', 'Single selection', true);
|
40
|
-
responseModeToggle.tests.shouldChangeResponseMode('Single selection', 'Multiple selection');
|
41
|
-
multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(1);
|
42
|
-
});
|
43
|
-
|
44
|
-
it('should be able to change response mode of a saved item and save with different question type', () => {
|
45
|
-
multipleSelectionPage.steps.saveAQuestionAndVerifySnackbar();
|
46
|
-
cy.wait(5000).then(() => {
|
47
|
-
itemPreviewPage.referenceID().invoke('text').then(($text) => {
|
48
|
-
itemReferenceID = $text;
|
49
|
-
cy.visit(`/item-engine/demo/edit-item/${
|
50
|
-
utilities.base64Encoding(itemReferenceID)
|
51
|
-
}`);
|
52
|
-
})
|
53
|
-
});
|
54
|
-
createItemPage.steps.editItem();
|
55
|
-
responseModeToggle.tests.shouldWarnResponseModeChange('Multiple selection', 'Single selection', true);
|
56
|
-
singleSelectionPage.steps.checkOptionInSpecifyCorrectAnswerSection(1);
|
57
|
-
multipleSelectionPage.steps.saveAQuestionAndVerifySnackbar();
|
58
|
-
cy.wait(5000).then(() => {
|
59
|
-
itemPreviewPage.referenceID().invoke('text').then(($text) => {
|
60
|
-
itemReferenceID = $text;
|
61
|
-
cy.visit(`/item-engine/demo/edit-item/${
|
62
|
-
utilities.base64Encoding(itemReferenceID)
|
63
|
-
}`);
|
64
|
-
})
|
65
|
-
});
|
66
|
-
createItemPage.steps.editItem();
|
67
|
-
responseModeToggle.tests.shouldloadQuestionWithResponseMode('Single selection');
|
68
|
-
});
|
69
|
-
});
|
70
|
-
});
|
@@ -1,70 +0,0 @@
|
|
1
|
-
import { createItemPage, itemPreviewPage, singleSelectionPage, multipleSelectionPage } from "../../../pages";
|
2
|
-
import utilities from "../../../support/helpers/utilities";
|
3
|
-
import { responseModeToggle } from "../../../pages/components/responseModeToggle";
|
4
|
-
|
5
|
-
const options = ['Animal', 'Vehicle', 'Birds', 'Insects'];
|
6
|
-
|
7
|
-
let itemReferenceID = '';
|
8
|
-
|
9
|
-
describe('Single selection - Response mode toggle', () => {
|
10
|
-
describe('response mode toggle', () => {
|
11
|
-
before(() => {
|
12
|
-
cy.loginAs('admin');
|
13
|
-
singleSelectionPage.steps.navigateToCreateQuestion('single selection');
|
14
|
-
cy.barsPreLoaderWait();
|
15
|
-
singleSelectionPage.steps.addQuestionInstructions();
|
16
|
-
singleSelectionPage.steps.addInputToOptionsInputField(options);
|
17
|
-
singleSelectionPage.steps.allotPoints(20);
|
18
|
-
});
|
19
|
-
|
20
|
-
after(() => {
|
21
|
-
cy.deleteItem(itemReferenceID);
|
22
|
-
cy.logout();
|
23
|
-
});
|
24
|
-
|
25
|
-
it('should load Single selection create page with responseMode toggle button', () => {
|
26
|
-
});
|
27
|
-
|
28
|
-
it('should be able to change responseMode when no answer is provided', () => {
|
29
|
-
responseModeToggle.tests.shouldChangeResponseMode('Single selection', 'Multiple selection');
|
30
|
-
});
|
31
|
-
|
32
|
-
it('should not be able to change responseMode when an answer is provided', () => {
|
33
|
-
responseModeToggle.tests.shouldChangeResponseMode('Multiple selection', 'Single selection');
|
34
|
-
singleSelectionPage.steps.checkOptionInSpecifyCorrectAnswerSection(1);
|
35
|
-
responseModeToggle.tests.shouldWarnResponseModeChange('Single selection', 'Multiple selection', false);
|
36
|
-
});
|
37
|
-
|
38
|
-
it('should be able to change response mode when warning popup is accepted', () => {
|
39
|
-
responseModeToggle.tests.shouldWarnResponseModeChange('Single selection', 'Multiple selection', true);
|
40
|
-
responseModeToggle.tests.shouldChangeResponseMode('Multiple selection', 'Single selection');
|
41
|
-
singleSelectionPage.steps.checkOptionInSpecifyCorrectAnswerSection(1);
|
42
|
-
});
|
43
|
-
|
44
|
-
it('should be able to change response mode of a saved item and save with different question type', () => {
|
45
|
-
singleSelectionPage.steps.saveAQuestionAndVerifySnackbar();
|
46
|
-
cy.wait(5000).then(() => {
|
47
|
-
itemPreviewPage.referenceID().invoke('text').then(($text) => {
|
48
|
-
itemReferenceID = $text;
|
49
|
-
cy.visit(`/item-engine/demo/edit-item/${
|
50
|
-
utilities.base64Encoding(itemReferenceID)
|
51
|
-
}`);
|
52
|
-
})
|
53
|
-
});
|
54
|
-
createItemPage.steps.editItem();
|
55
|
-
responseModeToggle.tests.shouldWarnResponseModeChange('Single selection', 'Multiple selection', true);
|
56
|
-
multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(1);
|
57
|
-
singleSelectionPage.steps.saveAQuestionAndVerifySnackbar();
|
58
|
-
cy.wait(5000).then(() => {
|
59
|
-
itemPreviewPage.referenceID().invoke('text').then(($text) => {
|
60
|
-
itemReferenceID = $text;
|
61
|
-
cy.visit(`/item-engine/demo/edit-item/${
|
62
|
-
utilities.base64Encoding(itemReferenceID)
|
63
|
-
}`);
|
64
|
-
})
|
65
|
-
});
|
66
|
-
createItemPage.steps.editItem();
|
67
|
-
responseModeToggle.tests.shouldloadQuestionWithResponseMode('Multiple selection');
|
68
|
-
});
|
69
|
-
});
|
70
|
-
});
|
@@ -1,72 +0,0 @@
|
|
1
|
-
import utilities from "../../support/helpers/utilities";
|
2
|
-
import { createQuestionBasePage } from "./createQuestionBasePage";
|
3
|
-
const css = Cypress.env('css');
|
4
|
-
|
5
|
-
const responseModeText = "Response mode";
|
6
|
-
const popupTitleText = "Change response mode?";
|
7
|
-
const popupContent = "Are you sure you want to switch from {from} to {to}? The correct answer you've chosen will be reset.";
|
8
|
-
|
9
|
-
const selectors = {
|
10
|
-
responseModeLabel: () => cy.get('[class*="response-mode-detail-label"]'),
|
11
|
-
responseModeToggleButtons: () => cy.get('[class*="response-mode-detail-label"] [class*="MuiToggleButtonGroup-grouped"]'),
|
12
|
-
responseModeToggleSelectedButton: () => cy.get(
|
13
|
-
'.edit-question-response-mode-wrapper [aria-pressed="true"]'
|
14
|
-
),
|
15
|
-
getResponseModeToggleButton: (value) => cy.get(
|
16
|
-
`.edit-question-response-mode-wrapper [value="${value.toLowerCase()}"]`
|
17
|
-
),
|
18
|
-
ResponseModeChangePopup: () => cy.get('.ngie-popover-container.change-response-mode-dialog'),
|
19
|
-
ResponseModeChangePopupTitle: () => cy.get('.ngie-popover-container.change-response-mode-dialog .dialog-title-wrapper'),
|
20
|
-
ResponseModeChangePopupContent: () => cy.get('.ngie-popover-container.change-response-mode-dialog .dialog-content'),
|
21
|
-
ResponseModeChangePopupReject: () => cy.get('.ngie-popover-container.change-response-mode-dialog .reject-button'),
|
22
|
-
ResponseModeChangePopupAccept: () => cy.get('.ngie-popover-container.change-response-mode-dialog .accept-button'),
|
23
|
-
opacityLabel: () => cy.get('[class*="OpacityWrapper"] [class*="Label"]').last(),
|
24
|
-
opacityInputField: () => cy.get('[class*="OpacityWrapper"] input[type="text"]').last(),
|
25
|
-
opacitySlider: () => cy.get('[class*="OpacityWrapper"] .MuiSlider-colorPrimary'),
|
26
|
-
};
|
27
|
-
|
28
|
-
const steps = {
|
29
|
-
selectResponseModetoggleButton: (mode) => {
|
30
|
-
selectors.getResponseModeToggleButton(mode).click();
|
31
|
-
},
|
32
|
-
confirmResponseModeChange: (accept) => {
|
33
|
-
if(accept) {
|
34
|
-
selectors.ResponseModeChangePopupAccept().click();
|
35
|
-
} else {
|
36
|
-
selectors.ResponseModeChangePopupReject().click();
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
40
|
-
|
41
|
-
const tests = {
|
42
|
-
|
43
|
-
shouldloadQuestionWithResponseMode: (mode) => {
|
44
|
-
utilities.verifyElementVisibilityState(responseModeToggle.responseModeLabel(), 'visible');
|
45
|
-
utilities.verifyInnerText(responseModeToggle.responseModeLabel(), responseModeText);
|
46
|
-
utilities.verifyInnerText(createQuestionBasePage.headerTitle(), mode);
|
47
|
-
utilities.verifyInnerText(responseModeToggle.responseModeToggleSelectedButton(), mode);
|
48
|
-
},
|
49
|
-
shouldChangeResponseMode: (initialMode, changedMode) => {
|
50
|
-
utilities.verifyInnerText(responseModeToggle.responseModeToggleSelectedButton(), initialMode);
|
51
|
-
utilities.verifyInnerText(createQuestionBasePage.headerTitle(), initialMode);
|
52
|
-
responseModeToggle.steps.selectResponseModetoggleButton(changedMode);
|
53
|
-
utilities.verifyInnerText(responseModeToggle.responseModeToggleSelectedButton(), changedMode);
|
54
|
-
utilities.verifyInnerText(createQuestionBasePage.headerTitle(), changedMode);
|
55
|
-
},
|
56
|
-
shouldWarnResponseModeChange: (initialMode, changedMode, acceptChange) => {
|
57
|
-
responseModeToggle.steps.selectResponseModetoggleButton(changedMode);
|
58
|
-
utilities.verifyElementVisibilityState(responseModeToggle.ResponseModeChangePopup(), 'visible');
|
59
|
-
utilities.verifyInnerText(responseModeToggle.ResponseModeChangePopupTitle(), popupTitleText);
|
60
|
-
utilities.verifyInnerText(
|
61
|
-
responseModeToggle.ResponseModeChangePopupContent(),
|
62
|
-
popupContent.replace('{from}', initialMode).replace('{to}', changedMode)
|
63
|
-
);
|
64
|
-
responseModeToggle.steps.confirmResponseModeChange(acceptChange);
|
65
|
-
}
|
66
|
-
};
|
67
|
-
|
68
|
-
export const responseModeToggle = {
|
69
|
-
...selectors,
|
70
|
-
tests,
|
71
|
-
steps
|
72
|
-
};
|