itemengine-cypress-automation 1.0.10 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- package/currents.config.js +3 -3
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAdditionalSettings.js +861 -0
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAutoScoredScoring.js +418 -0
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseEditTabBasicSections.js +587 -0
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseEditTabScoringSection.js +99 -0
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseHeaderSection.js +109 -0
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseManuallyScoredNonScoredScoringSection.js +120 -0
- package/cypress/support/commands.js +4 -4
- package/cypress/support/e2e.js +0 -1
- package/cypress/support/helpers/accessibility.js +2 -2
- package/cypress.config.js +0 -2
- package/deploy.yaml +2 -2
- package/package.json +6 -3
- package/scripts/sorry-cypress.mjs +2 -7
@@ -0,0 +1,99 @@
|
|
1
|
+
import { shortTextResponsePage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
const css = Cypress.env('css');
|
4
|
+
|
5
|
+
describe('Create Item page - Short text response: Scoring Section', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Scoring Section contents', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
cy.log('Navigate to Short text response question type');
|
14
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
15
|
+
});
|
16
|
+
|
17
|
+
shortTextResponsePage.tests.verifyScoringTypeLabelAndDropdown('autoScored');
|
18
|
+
|
19
|
+
it('CSS of Scoring section', { tags: 'css' }, () => {
|
20
|
+
shortTextResponsePage.minimumScoreIfAttemptedLabel()
|
21
|
+
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
22
|
+
shortTextResponsePage.pointsLabel()
|
23
|
+
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
24
|
+
});
|
25
|
+
|
26
|
+
it('Accessibility of Scoring Section', { tags: 'a11y' }, () => {
|
27
|
+
cy.checkAccessibility(shortTextResponsePage.scoringTypeDropdown());
|
28
|
+
cy.checkAccessibility(shortTextResponsePage.minimumScoreIfAttemptedInputField());
|
29
|
+
cy.checkAccessibility(shortTextResponsePage.pointsInputField());
|
30
|
+
});
|
31
|
+
});
|
32
|
+
|
33
|
+
describe('Auto scored - Edit tab', () => {
|
34
|
+
abortEarlySetup();
|
35
|
+
before(() => {
|
36
|
+
cy.log('Navigate to Short text response question type');
|
37
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
38
|
+
});
|
39
|
+
|
40
|
+
it('The \'Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed and it should be empty by default', () => {
|
41
|
+
shortTextResponsePage.pointsLabel()
|
42
|
+
.verifyInnerText('Points')
|
43
|
+
.and('be.visible');
|
44
|
+
shortTextResponsePage.pointsInputField()
|
45
|
+
.should('have.value', '')
|
46
|
+
.and('be.visible');
|
47
|
+
shortTextResponsePage.minimumScoreIfAttemptedLabel()
|
48
|
+
.verifyInnerText('Minimum score awarded (if attempted)')
|
49
|
+
.and('be.visible');
|
50
|
+
shortTextResponsePage.minimumScoreIfAttemptedInputField()
|
51
|
+
.should('have.value', '')
|
52
|
+
.and('be.visible');
|
53
|
+
});
|
54
|
+
|
55
|
+
shortTextResponsePage.tests.verifyPointsFieldErrorState(10);
|
56
|
+
shortTextResponsePage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 20, 10);
|
57
|
+
});
|
58
|
+
|
59
|
+
describe('Manually scored scoring - Edit tab', () => {
|
60
|
+
abortEarlySetup();
|
61
|
+
before(() => {
|
62
|
+
cy.log('Navigate to Short text response question type');
|
63
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
64
|
+
});
|
65
|
+
|
66
|
+
it('User should be able to select \'Manually scored\' scoring type from scoring type dropdown', () => {
|
67
|
+
shortTextResponsePage.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored');
|
68
|
+
});
|
69
|
+
|
70
|
+
it('When the user has selected \'Manually scored\' option from the Scoring Type dropdown then the \'Set Correct Answer\' section should not be displayed; \'Points\' and \'Minimum score awarded (if attempted)\' labels and input field should be displayed; and inside \'Additional settings accordion\', \'Check answer\' section i.e. \'Check answer\' label and \'Allow students to check answer\' checkbox should not be displayed', () => {
|
71
|
+
shortTextResponsePage.setCorrectAnswerLabel()
|
72
|
+
.should('not.exist');
|
73
|
+
shortTextResponsePage.minimumScoreIfAttemptedLabel()
|
74
|
+
.verifyInnerText('Minimum score awarded (if attempted)')
|
75
|
+
.and('be.visible');
|
76
|
+
shortTextResponsePage.minimumScoreIfAttemptedInputField()
|
77
|
+
.should('have.value', '')
|
78
|
+
.and('be.visible');
|
79
|
+
shortTextResponsePage.steps.expandAdditonalSettings();
|
80
|
+
shortTextResponsePage.checkAnswerLabel()
|
81
|
+
.should('not.exist');
|
82
|
+
shortTextResponsePage.allowStudentsToCheckAnswerLabel()
|
83
|
+
.should('not.exist');
|
84
|
+
});
|
85
|
+
|
86
|
+
shortTextResponsePage.tests.verifyPointsFieldErrorState(10);
|
87
|
+
shortTextResponsePage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 20, 10);
|
88
|
+
});
|
89
|
+
|
90
|
+
describe('Non scored scoring - Edit tab', () => {
|
91
|
+
abortEarlySetup();
|
92
|
+
before(() => {
|
93
|
+
cy.log('Navigate to Short text response question type');
|
94
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
95
|
+
});
|
96
|
+
|
97
|
+
shortTextResponsePage.tests.verifyEditTabNonScoredScoringSectionContents();
|
98
|
+
});
|
99
|
+
});
|
@@ -0,0 +1,109 @@
|
|
1
|
+
import { dialogBoxBase, shortTextResponsePage } from "../../../pages";
|
2
|
+
import { commonComponents } from "../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create item page - Short text response: Header section and saving question', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Header section contents', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigate to short text response question type');
|
15
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
16
|
+
});
|
17
|
+
|
18
|
+
shortTextResponsePage.tests.verifyCreateQuestionPageQuestionTypeHeader('Short text response');
|
19
|
+
});
|
20
|
+
|
21
|
+
describe('Tabs section', () => {
|
22
|
+
abortEarlySetup();
|
23
|
+
before(() => {
|
24
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
25
|
+
});
|
26
|
+
shortTextResponsePage.tests.verifyTabsSection();
|
27
|
+
});
|
28
|
+
|
29
|
+
describe('Cancel button', () => {
|
30
|
+
abortEarlySetup();
|
31
|
+
before(() => {
|
32
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
33
|
+
});
|
34
|
+
shortTextResponsePage.tests.verifyCancelButton('short text response');
|
35
|
+
});
|
36
|
+
|
37
|
+
describe('Save Question button', () => {
|
38
|
+
abortEarlySetup();
|
39
|
+
before(() => {
|
40
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
41
|
+
});
|
42
|
+
|
43
|
+
describe('Validation error messages', () => {
|
44
|
+
abortEarlySetup();
|
45
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
|
46
|
+
|
47
|
+
it('Validation error messages should be displayed below required input fields', () => {
|
48
|
+
shortTextResponsePage.questionInstructionsLabelEditTab()
|
49
|
+
.parents('.edit-question-instruction-wrapper')
|
50
|
+
.within(() => {
|
51
|
+
commonComponents.errorMessage()
|
52
|
+
.verifyInnerText('Error: Question instructions are required.')
|
53
|
+
.and('be.visible');
|
54
|
+
});
|
55
|
+
shortTextResponsePage.pointsInputField()
|
56
|
+
.parents('.set-correct-answer-points-wrapper')
|
57
|
+
.within(() => {
|
58
|
+
shortTextResponsePage.pleaseEnterPointsErrorMessage()
|
59
|
+
.verifyInnerText('Error: Please enter points.')
|
60
|
+
.and('be.visible');
|
61
|
+
});
|
62
|
+
shortTextResponsePage.setCorrectAnswerResponseField()
|
63
|
+
.parents('[class*="ShortTextResponsestyles__ResponseFieldSpecialCharacterButtonWrapper"]')
|
64
|
+
.within(() => {
|
65
|
+
shortTextResponsePage.errorMessage()
|
66
|
+
.verifyInnerText('Error: Please set a correct answer.')
|
67
|
+
.and('be.visible');
|
68
|
+
});
|
69
|
+
shortTextResponsePage.setCorrectAnswerErrorIcon()
|
70
|
+
.should('be.visible');
|
71
|
+
});
|
72
|
+
|
73
|
+
it('Validation error messages should disappear when required input fields are filled', () => {
|
74
|
+
shortTextResponsePage.steps.addQuestionInstructions();
|
75
|
+
shortTextResponsePage.questionInstructionsLabelEditTab()
|
76
|
+
.parents('.edit-question-instruction-wrapper')
|
77
|
+
.within(() => {
|
78
|
+
commonComponents.errorMessage()
|
79
|
+
.should('not.exist');
|
80
|
+
});
|
81
|
+
shortTextResponsePage.steps.allotPoints(20);
|
82
|
+
shortTextResponsePage.pointsInputField()
|
83
|
+
.parents('.set-correct-answer-points-wrapper')
|
84
|
+
.within(() => {
|
85
|
+
shortTextResponsePage.pleaseEnterPointsErrorMessage()
|
86
|
+
.should('not.exist');
|
87
|
+
});
|
88
|
+
shortTextResponsePage.setCorrectAnswerResponseField()
|
89
|
+
.type('Response');
|
90
|
+
shortTextResponsePage.setCorrectAnswerResponseField()
|
91
|
+
.parents('[class*="ShortTextResponsestyles__ResponseFieldSpecialCharacterButtonWrapper"]')
|
92
|
+
.within(() => {
|
93
|
+
shortTextResponsePage.errorMessage()
|
94
|
+
.should('not.exist');
|
95
|
+
});
|
96
|
+
shortTextResponsePage.setCorrectAnswerErrorIcon()
|
97
|
+
.should('not.exist');
|
98
|
+
});
|
99
|
+
});
|
100
|
+
|
101
|
+
describe('Saving a question', () => {
|
102
|
+
abortEarlySetup();
|
103
|
+
it('When user has filled all the mandatory fields then on clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
104
|
+
shortTextResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
105
|
+
});
|
106
|
+
shortTextResponsePage.tests.verifySavedSuccessfullySnackbarCSSanda11y();
|
107
|
+
});
|
108
|
+
});
|
109
|
+
});
|
package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseManuallyScoredNonScoredScoringSection.js
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
import { selectQuestionResourceToolPage, shortTextResponsePage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
const css = Cypress.env('css');
|
4
|
+
|
5
|
+
describe('Create Item page - Short text response: Scoring Section - Manually scored and Non scored', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Question Preview: Manually scored', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
cy.log('Adding question instructions and correct answer response, select Manually scored scoring type and add points for the question');
|
14
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
15
|
+
shortTextResponsePage.steps.addQuestionInstructions();
|
16
|
+
shortTextResponsePage.steps.allotPoints(20);
|
17
|
+
shortTextResponsePage.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored')
|
18
|
+
cy.log('Switching to Preview tab')
|
19
|
+
shortTextResponsePage.steps.switchToPreviewTab();
|
20
|
+
});
|
21
|
+
|
22
|
+
it('In Preview tab, Question Instructions and response field should be displayed', () => {
|
23
|
+
shortTextResponsePage.steps.verifyQuestionInstructionsText();
|
24
|
+
});
|
25
|
+
|
26
|
+
shortTextResponsePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab()
|
27
|
+
});
|
28
|
+
|
29
|
+
describe('Question Preview: Non scored', () => {
|
30
|
+
abortEarlySetup();
|
31
|
+
before(() => {
|
32
|
+
cy.log('Adding question instructions, correct answer response, and selecting Non scored scoring type');
|
33
|
+
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
34
|
+
shortTextResponsePage.steps.addQuestionInstructions();
|
35
|
+
shortTextResponsePage.setCorrectAnswerResponseField()
|
36
|
+
.type('Response');
|
37
|
+
shortTextResponsePage.steps.selectAScoringTypeFromScoringTypeDropdown('Non scored');
|
38
|
+
shortTextResponsePage.steps.expandAdditonalSettings()
|
39
|
+
shortTextResponsePage.steps.setMaximumCheckAnswerAttempts(3)
|
40
|
+
cy.log('Switching to Preview tab')
|
41
|
+
shortTextResponsePage.steps.switchToPreviewTab();
|
42
|
+
});
|
43
|
+
|
44
|
+
shortTextResponsePage.tests.verifyShowCorrectAnswerLabelAndCheckboxExistAndPreviewScoreNotExistInPreviewTab();
|
45
|
+
|
46
|
+
it('On selecting Show correct answer checkbox, no green checkmark or red crossmark icon should be displayed besides response field and no label should be displayed below the field', () => {
|
47
|
+
shortTextResponsePage.showCorrectAnswerCheckbox()
|
48
|
+
.click()
|
49
|
+
.should('be.checked');
|
50
|
+
shortTextResponsePage.correctIcon()
|
51
|
+
.should('not.exist');
|
52
|
+
shortTextResponsePage.incorrectIcon()
|
53
|
+
.should('not.exist');
|
54
|
+
shortTextResponsePage.correctIncorectAnswerLabel()
|
55
|
+
.should('not.exist');
|
56
|
+
shortTextResponsePage.correctIncorrectAnswerBorder()
|
57
|
+
.should('not.exist');
|
58
|
+
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
59
|
+
.should('be.visible');
|
60
|
+
cy.log('Post step: Uncheck show correct answer button');
|
61
|
+
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
62
|
+
});
|
63
|
+
|
64
|
+
it('Case: When user enters an incorrect answer', () => {
|
65
|
+
cy.log('When the user selects show correct answer checkbox, red crossmark icon should be displayed besides the response fields, Incorrect answer label and border should not be displayed')
|
66
|
+
shortTextResponsePage.previewTabResponseField()
|
67
|
+
.type('Incorrect');
|
68
|
+
shortTextResponsePage.showCorrectAnswerCheckbox()
|
69
|
+
.click()
|
70
|
+
.should('be.checked');
|
71
|
+
shortTextResponsePage.steps.verifyIncorrectOptionCrossmarkIcon();
|
72
|
+
shortTextResponsePage.correctIncorrectAnswerBorder()
|
73
|
+
.should('not.exist');
|
74
|
+
shortTextResponsePage.correctIncorectAnswerLabel()
|
75
|
+
.should('not.exist');
|
76
|
+
cy.log('Correct answer container should be displayed')
|
77
|
+
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
78
|
+
.should('be.visible');
|
79
|
+
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
80
|
+
cy.log('When the user clicks on \'Check answer\' button, red crossmark icon should be displayed besides the response fields, Incorrect answer label and border should not be displayed and no correct answer container should be displayed');
|
81
|
+
shortTextResponsePage.checkAnswerButton()
|
82
|
+
.click();
|
83
|
+
shortTextResponsePage.steps.verifyIncorrectOptionCrossmarkIcon();
|
84
|
+
shortTextResponsePage.correctIncorrectAnswerBorder()
|
85
|
+
.should('not.exist');
|
86
|
+
shortTextResponsePage.correctIncorectAnswerLabel()
|
87
|
+
.should('not.exist');
|
88
|
+
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
89
|
+
.should('not.exist');
|
90
|
+
});
|
91
|
+
|
92
|
+
it('Case: When user enters correct answer response', () => {
|
93
|
+
cy.log('When the user selects the show correct answer checkbox, green checkmark icon should be displayed besides the response fields, Correct answer label and border should not be displayed and no correct answer container should be displayed')
|
94
|
+
shortTextResponsePage.previewTabResponseField()
|
95
|
+
.clear()
|
96
|
+
.type('Response');
|
97
|
+
shortTextResponsePage.showCorrectAnswerCheckbox()
|
98
|
+
.click()
|
99
|
+
.should('be.checked');
|
100
|
+
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
101
|
+
shortTextResponsePage.correctIncorrectAnswerBorder()
|
102
|
+
.should('not.exist');
|
103
|
+
shortTextResponsePage.correctIncorectAnswerLabel()
|
104
|
+
.should('not.exist');
|
105
|
+
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
106
|
+
.should('not.exist');
|
107
|
+
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
108
|
+
cy.log('When the user clicks on \'Check answer\' button, then green checkmark icon should be displayed besides response fields, Correct answer label and border should not be displayed and no correct answer container should be displayed and no correct answer container should be displayed')
|
109
|
+
shortTextResponsePage.checkAnswerButton()
|
110
|
+
.click();
|
111
|
+
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
112
|
+
shortTextResponsePage.correctIncorrectAnswerBorder()
|
113
|
+
.should('not.exist');
|
114
|
+
shortTextResponsePage.correctIncorectAnswerLabel()
|
115
|
+
.should('not.exist');
|
116
|
+
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
117
|
+
.should('not.exist');
|
118
|
+
});
|
119
|
+
});
|
120
|
+
});
|
@@ -3,7 +3,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|
3
3
|
import "cypress-real-events/support";
|
4
4
|
import 'cypress-file-upload';
|
5
5
|
require('cy-verify-downloads').addCustomCommand();
|
6
|
-
import addContext from "mochawesome/addContext";
|
6
|
+
//import addContext from "mochawesome/addContext";
|
7
7
|
|
8
8
|
const randomUser = (j, username, i) => ({
|
9
9
|
id: uuidv4(),
|
@@ -129,9 +129,9 @@ Cypress.Commands.add('fill', { prevSubject: 'element' }, ($subj, text) => {
|
|
129
129
|
return cy.wrap($subj).type('{enter}');
|
130
130
|
});
|
131
131
|
|
132
|
-
Cypress.Commands.add('addContext', (context) => {
|
133
|
-
|
134
|
-
});
|
132
|
+
// Cypress.Commands.add('addContext', (context) => {
|
133
|
+
// cy.once('test:after:run', (test) => addContext({ test }, context));
|
134
|
+
// });
|
135
135
|
|
136
136
|
Cypress.Commands.add('barsPreLoaderWait', () => {
|
137
137
|
cy.get('[id="question-item-instruction-loader"]')
|
package/cypress/support/e2e.js
CHANGED
@@ -20,10 +20,10 @@ function checkAccessibility(cySelector = null) {
|
|
20
20
|
cy.injectAxe()
|
21
21
|
.then(() => {
|
22
22
|
if (cySelector === null) {
|
23
|
-
return cy.checkA11y(null, config
|
23
|
+
return cy.checkA11y(null, config);
|
24
24
|
} else {
|
25
25
|
cySelector.then(($element) => {
|
26
|
-
return cy.checkA11y($element.selector, config
|
26
|
+
return cy.checkA11y($element.selector, config);
|
27
27
|
});
|
28
28
|
};
|
29
29
|
});
|
package/cypress.config.js
CHANGED
@@ -19,7 +19,6 @@ async function getConfigurationByFile(file, theme) {
|
|
19
19
|
}
|
20
20
|
|
21
21
|
module.exports = defineConfig({
|
22
|
-
reporter: 'cypress-mochawesome-reporter',
|
23
22
|
reporterOptions: {
|
24
23
|
reportDir: 'cypress/reports',
|
25
24
|
charts: true,
|
@@ -63,7 +62,6 @@ module.exports = defineConfig({
|
|
63
62
|
},
|
64
63
|
isFileExist
|
65
64
|
});
|
66
|
-
require('cypress-mochawesome-reporter/plugin')(on);
|
67
65
|
require('@cypress/grep/src/plugin')()
|
68
66
|
return cloudPlugin(on, config), getConfigurationByFile(file, theme);
|
69
67
|
},
|
package/deploy.yaml
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.12",
|
4
4
|
"description": "",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -8,7 +8,11 @@
|
|
8
8
|
"test": "echo 'success'",
|
9
9
|
"spinnaker": "node scripts/spinnaker.mjs --env theme=ilc",
|
10
10
|
"spinnaker:untagged": "node scripts/spinnaker.mjs --env theme=ilc,grepUntagged=true",
|
11
|
-
"local": "node scripts/
|
11
|
+
"local": "node scripts/local.mjs --env fileConfig=ilqa",
|
12
|
+
"cy:ildev": "cypress open --env fileConfig=ildev",
|
13
|
+
"cy:ilprod": "cypress open --env fileConfig=ilprod",
|
14
|
+
"cy:ilqa": "cypress open --env fileConfig=ilqa",
|
15
|
+
"cy:ilstage": "cypress open --env fileConfig=ilstage"
|
12
16
|
},
|
13
17
|
"repository": {
|
14
18
|
"type": "git",
|
@@ -22,7 +26,6 @@
|
|
22
26
|
"cypress-axe": "^1.5.0",
|
23
27
|
"cypress-cloud": "^1.9.6",
|
24
28
|
"cypress-file-upload": "^5.0.8",
|
25
|
-
"cypress-mochawesome-reporter": "^3.3.0",
|
26
29
|
"cypress-real-events": "^1.7.6",
|
27
30
|
"react-uuid": "^2.0.0"
|
28
31
|
}
|
@@ -17,14 +17,11 @@ if (process.argv.includes('--env')) {
|
|
17
17
|
|
18
18
|
const env = process.env.STAGE ? process.env.STAGE : envArgs.fileConfig;
|
19
19
|
|
20
|
-
console.log(envArgs, env)
|
21
|
-
|
22
20
|
/**
|
23
21
|
* @param {string} user
|
24
22
|
* @param {string} startTime
|
25
23
|
*/
|
26
24
|
function setCiBuildId(user, startTime) {
|
27
|
-
console.log('process.argv', process.argv)
|
28
25
|
let tags;
|
29
26
|
if (envArgs.grepUntagged) {
|
30
27
|
tags = 'untagged';
|
@@ -77,10 +74,7 @@ function runSorryCypress(ciBuildId, envArgs) {
|
|
77
74
|
* @method runSorryCypressSpinnaker
|
78
75
|
*/
|
79
76
|
export function runSorryCypressSpinnaker() {
|
80
|
-
console.log('process.argv', process.argv)
|
81
|
-
console.log('process.env.STAGE', process.env.STAGE)
|
82
77
|
startTime = process.env.START_TIME;
|
83
|
-
console.log('START_TIME', startTime)
|
84
78
|
ciBuildId = setCiBuildId("spinnaker", startTime);
|
85
79
|
const envArgs = setCommandLineEnvArgs()
|
86
80
|
runSorryCypress(ciBuildId, envArgs);
|
@@ -92,7 +86,8 @@ export function runSorryCypressSpinnaker() {
|
|
92
86
|
export function runSorryCypressLocal() {
|
93
87
|
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.engineering/";
|
94
88
|
const user = OS.userInfo().username;
|
95
|
-
startTime = Math.round(Date.now() /
|
89
|
+
startTime = Math.round(Date.now() / 1000000);
|
96
90
|
ciBuildId = setCiBuildId(user, startTime);
|
91
|
+
const envArgs = setCommandLineEnvArgs()
|
97
92
|
runSorryCypress(ciBuildId, envArgs);
|
98
93
|
}
|