Skip to content

Commit

Permalink
fix: dependency vulnerabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr Shevtsov committed Dec 1, 2023
1 parent 8af1143 commit 68165b1
Show file tree
Hide file tree
Showing 7 changed files with 4,754 additions and 4,345 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ jobs:
runs-on: ubuntu-latest
name: Publish
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Download Cypress
uses: bahmutov/npm-install@v1
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,13 @@ There are several ways to avoid this situation:
- specify your own function for all tests to not only take test.title, but also concatenate it with some other information in `cypress/support/index` or `cypress/support/e2e.js` file, for example:
- use relative spec file path like "cypress/e2e/results2/test.cy.js" and test title:
```js
Cypress.Allure.reporter.getInterface().defineHistoryId((title) => {
Cypress.Allure.reporter.getInterface().defineHistoryId((title, fullTitle) => {
return `${Cypress.spec.relative}${title}`;
});
```
- use browser name and test title:
```js
Cypress.Allure.reporter.getInterface().defineHistoryId((title) => {
Cypress.Allure.reporter.getInterface().defineHistoryId((title, fullTitle) => {
return `${Cypress.browser.name}${title}`;
});
```
Expand Down
9,071 changes: 4,737 additions & 4,334 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
"lint": "npx eslint ."
},
"dependencies": {
"@shelex/allure-js-commons-browser": "1.4.1",
"crypto-js": "4.1.1",
"@shelex/allure-js-commons-browser": "1.5.0",
"crypto-js": "4.2.0",
"debug": "4.3.4",
"object-inspect": "1.12.3",
"object-inspect": "1.13.1",
"path-browserify": "1.0.1",
"uuid": "9.0.0"
"uuid": "9.0.1"
},
"devDependencies": {
"@badeball/cypress-cucumber-preprocessor": "17.0.0",
Expand All @@ -58,7 +58,7 @@
"eslint-plugin-cypress": "2.12.1",
"eslint-plugin-prettier": "4.2.1",
"prettier": "2.8.3",
"semantic-release": "20.1.0"
"semantic-release": "22.0.8"
},
"cypress-cucumber-preprocessor": {
"nonGlobalStepDefinitions": true,
Expand Down
2 changes: 1 addition & 1 deletion reporter/allure-cypress/AllureReporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ module.exports = class AllureReporter {
}

this.currentTest.info.historyId = crypto
.MD5(this.defineHistoryId(test.title))
.MD5(this.defineHistoryId(test.title, test.fullTitle()))
.toString(crypto.enc.Hex);
this.currentTest.info.stage = Stage.RUNNING;
this.addPackageLabel();
Expand Down
2 changes: 1 addition & 1 deletion reporter/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ declare global {
/**
* Specify string which will be used to calculate historyId for test
*/
defineHistoryId(fn: (testTitle: string) => string): void;
defineHistoryId(fn: (testTitle: string, fullTitle: string) => string): void;
}
}
}
4 changes: 3 additions & 1 deletion writer/customTestName.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ const overwriteTestNameMaybe = (test, defineHistoryId) => {
const name = test.parameters[overrideIndex].value;
logger.writer('overwriting test "%s" name to "%s"', test.name, name);
test.name = name;
test.historyId = crypto
.MD5(historyIdFn(name, test.fullName))
.toString(crypto.enc.Hex);
test.fullName = name;
test.historyId = crypto.MD5(historyIdFn(name)).toString(crypto.enc.Hex);
test.parameters.splice(overrideIndex, 1);
}
return test;
Expand Down

0 comments on commit 68165b1

Please sign in to comment.