itemengine-cypress-automation 1.0.504-IEI-3170-task-5158cdd.0 → 1.0.504-IEI-6793-v4-2e25d65.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/e2e/ILC/test/test.js +21 -0
- package/cypress/pages/components/numberLineCommonComponent.js +37 -33
- package/deploy/test/run.sh +6 -0
- package/deploy/test/service.yaml +42 -0
- package/package.json +3 -2
- package/scripts/sorry-cypress.mjs +11 -0
- package/scripts/testcypress.mjs +3 -0
@@ -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
|
+
//Remove this skip 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 this skip 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', () => {
|
@@ -0,0 +1,21 @@
|
|
1
|
+
describe('Page Load Test for v1', () => {
|
2
|
+
it('should load the page successfully', () => {
|
3
|
+
cy.log('Navigating to Login Page');
|
4
|
+
cy.visit('https://sandbox.itemengine-staging.il-apps.com/login');
|
5
|
+
cy.get('body').should('exist');
|
6
|
+
cy.log('Login page loaded');
|
7
|
+
cy.get('h1').should('have.text', 'Log in');
|
8
|
+
cy.get('button[data-at="Sign-in-button"] span').should('have.text', 'Sign In');
|
9
|
+
});
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Page Load Test for v2', () => {
|
13
|
+
it('should load the page successfully', () => {
|
14
|
+
cy.log('Navigating to Login Page');
|
15
|
+
cy.visit('https://itemengine-sandbox-staging.content-nonprod.imaginelearning.com/login');
|
16
|
+
cy.get('body').should('exist');
|
17
|
+
cy.log('Login page loaded');
|
18
|
+
cy.get('h1').should('have.text', 'Log in');
|
19
|
+
cy.get('button[data-at="Sign-in-button"] span').should('have.text', 'Sign In');
|
20
|
+
});
|
21
|
+
});
|
@@ -30,8 +30,9 @@ 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
|
-
|
33
|
+
//Uncomment these lines once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
34
|
+
// toleranceThresholdLabel: () => cy.get('[class*="AllocatedPointsstyles__PointsWrapper"] .points-label'),
|
35
|
+
// toleranceThresholdInputField: () => cy.get('[class*="AllocatedPointsstyles__PointsWrapper"] input'),
|
35
36
|
pointsInputField: () => cy.get('.ngie-accordion-detail .points-input-field input[type="text"]'),
|
36
37
|
pointsInputFieldForManualScoring: () => cy.get('.points-input-field input[type="text"]'),
|
37
38
|
|
@@ -354,18 +355,19 @@ const steps = {
|
|
354
355
|
});
|
355
356
|
},
|
356
357
|
|
358
|
+
//Uncomment these lines once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
357
359
|
/**
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
setToleranceThresholdValue: (value) => {
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
},
|
360
|
+
* Sets the tolerance threshold value for the numberline plot.
|
361
|
+
* @param {number} value - The value for the tolerance threshold.
|
362
|
+
*/
|
363
|
+
// setToleranceThresholdValue: (value) => {
|
364
|
+
// numberLineCommonComponent.toleranceThresholdInputField()
|
365
|
+
// .clear()
|
366
|
+
// .type(value)
|
367
|
+
// .blur();
|
368
|
+
// numberLineCommonComponent.toleranceThresholdInputField()
|
369
|
+
// .should('have.value', value)
|
370
|
+
// },
|
369
371
|
|
370
372
|
/**
|
371
373
|
* @param {number} points - The points to be allotted.
|
@@ -381,11 +383,12 @@ const steps = {
|
|
381
383
|
.blur();
|
382
384
|
},
|
383
385
|
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
386
|
+
//Uncomment these lines once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
387
|
+
// focusInOutOfToleranceThresholdInputField: () => {
|
388
|
+
// numberLineCommonComponent.toleranceThresholdInputField()
|
389
|
+
// .focus()
|
390
|
+
// .blur();
|
391
|
+
// },
|
389
392
|
|
390
393
|
/**
|
391
394
|
* @description - Allots points in the scoring section for manual scoring.
|
@@ -927,23 +930,24 @@ const tests = {
|
|
927
930
|
});
|
928
931
|
},
|
929
932
|
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
933
|
+
//Uncomment these lines once this ticket is deployed on prod https://weldnorthed.atlassian.net/browse/IEI-3170
|
934
|
+
// verifyToleranceThresholdLabelAndInputField: () => {
|
935
|
+
// it('Tolerance/Threshold label and input field should be displayed and by default input field should be empty', () => {
|
936
|
+
// utilities.verifyElementVisibilityState(numberLineCommonComponent.toleranceThresholdLabel(), 'visible');
|
937
|
+
// utilities.verifyInnerText(numberLineCommonComponent.toleranceThresholdLabel(), 'Tolerance');
|
938
|
+
// utilities.verifyElementVisibilityState(numberLineCommonComponent.toleranceThresholdInputField(), 'visible');
|
939
|
+
// numberLineCommonComponent.toleranceThresholdInputField().should('have.value', '');
|
940
|
+
// });
|
937
941
|
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
+
// it('When user focuses in and out of the Tolerance/Threshold input field then error message should not be displayed', () => {
|
943
|
+
// numberLineCommonComponent.steps.focusInOutOfToleranceThresholdInputField();
|
944
|
+
// utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
945
|
+
// });
|
942
946
|
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
}
|
947
|
+
// it('User should be able to enter text in Tolerance/Threshold input field', () => {
|
948
|
+
// numberLineCommonComponent.steps.setToleranceThresholdValue(2);
|
949
|
+
// });
|
950
|
+
// }
|
947
951
|
|
948
952
|
verifyThousandSeparatorContent: () => {
|
949
953
|
it(`Thousand separator label and 3 options ${thousandsSeparatorOptions} should be displayed and by default ${thousandsSeparatorOptions[0]} should be selected`, () => {
|
@@ -0,0 +1,42 @@
|
|
1
|
+
global:
|
2
|
+
name: ie-test
|
3
|
+
type: test
|
4
|
+
autoDeploy:
|
5
|
+
enabled: true
|
6
|
+
highestEnvironment: dev
|
7
|
+
|
8
|
+
deployment:
|
9
|
+
activeDeadlineSeconds: 28800
|
10
|
+
architecture: amd64
|
11
|
+
backoffLimit: 25
|
12
|
+
completions: 15
|
13
|
+
parallelism: 15
|
14
|
+
restartPolicy: Never
|
15
|
+
image:
|
16
|
+
cmd: /ie-e2e/deploy/test/run.sh
|
17
|
+
buildContext: ../..
|
18
|
+
resources:
|
19
|
+
limits:
|
20
|
+
memory: 8446Mi
|
21
|
+
cpu: 5000m
|
22
|
+
requests:
|
23
|
+
memory: 4096Mi
|
24
|
+
cpu: 2000m
|
25
|
+
|
26
|
+
namespaces:
|
27
|
+
dev:
|
28
|
+
env:
|
29
|
+
- name: STAGE
|
30
|
+
value: "dev"
|
31
|
+
qa:
|
32
|
+
env:
|
33
|
+
- name: STAGE
|
34
|
+
value: "qa"
|
35
|
+
staging:
|
36
|
+
env:
|
37
|
+
- name: STAGE
|
38
|
+
value: "staging"
|
39
|
+
prod:
|
40
|
+
env:
|
41
|
+
- name: STAGE
|
42
|
+
value: "prod"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.504-IEI-
|
3
|
+
"version": "1.0.504-IEI-6793-v4-2e25d65.0",
|
4
4
|
"description": "",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -30,7 +30,8 @@
|
|
30
30
|
"spinnaker:audioResponse": "node scripts/questions.mjs --env theme=ilc,questionType=AudioResponseNew_VideoResponseNew_UploadResponse_ToolAudioPlayerNew,grepTags=-css+-a11y",
|
31
31
|
"spinnaker:feedbackScale": "node scripts/questions.mjs --env theme=ilc,questionType=FeedbackScaleNew_BrainingCampManipulative_EditItem_ToolSettings_CkEditorAudioPlayer_CkEditorEquationEditor_CkEditorInsertImage_CkEditorInsertTable_CkEditorInsertTable,grepTags=-css+-a11y",
|
32
32
|
"spinnaker:resourcesAndTools": "node scripts/questions.mjs --env theme=ilc,questionType=Compass_ContentBlocks_Protractor_ReadingRuler_SimpleCalculator_Ruler,grepTags=-css+-a11y",
|
33
|
-
"spinnaker:dataApiTest": "node scripts/dataApi.mjs --env theme=ilc,questionType=dataApi_Sessions,grepTags=-css+-a11y"
|
33
|
+
"spinnaker:dataApiTest": "node scripts/dataApi.mjs --env theme=ilc,questionType=dataApi_Sessions,grepTags=-css+-a11y",
|
34
|
+
"spinnaker:test": "node scripts/testcypress.mjs --env theme=ilc,questionType=test_Sessions,grepTags=-css+-a11y"
|
34
35
|
},
|
35
36
|
"repository": {
|
36
37
|
"type": "git",
|
@@ -301,4 +301,15 @@ export function runSorryCypressSpinnakerDataApi() {
|
|
301
301
|
let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec "cypress/e2e/ILC/dataApi/**/*.js,cypress/e2e/Sessions/**/*.js"`;
|
302
302
|
console.log(`command: ${command}`);
|
303
303
|
execSync(command, { stdio: "inherit" });
|
304
|
+
}
|
305
|
+
|
306
|
+
export function runSorryCypressTest() {
|
307
|
+
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.tech/";
|
308
|
+
const user = OS.userInfo().username;
|
309
|
+
startTime = Math.round(Date.now() / 1000000);
|
310
|
+
ciBuildId = setCiBuildId(user, startTime);
|
311
|
+
const envArgs = setCommandLineEnvArgs()
|
312
|
+
let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec "cypress/e2e/ILC/test/**/*.js"`;
|
313
|
+
console.log(`command: ${command}`);
|
314
|
+
execSync(command, { stdio: "inherit" });
|
304
315
|
}
|