-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
641 changed files
with
21,510 additions
and
5,530 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+53.2 KB
...rser-npm-7.25.9-0502808380-ebb68d80b1.zip → ...rser-npm-7.26.5-991a268186-b9e4141f2a.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+22.2 KB
.yarn/cache/@babel-helper-compilation-targets-npm-7.26.5-e3b4215b3c-f3b5f0bfcd.zip
Binary file not shown.
Binary file removed
BIN
-100 KB
.yarn/cache/@babel-helper-create-class-features-plugin-npm-7.24.4-96c11021da-86153719d9.zip
Binary file not shown.
Binary file removed
BIN
-15.7 KB
...n/cache/@babel-helper-member-expression-to-functions-npm-7.23.0-4eb0647557-325feb6e20.zip
Binary file not shown.
Binary file removed
BIN
-4.15 KB
.yarn/cache/@babel-helper-optimise-call-expression-npm-7.22.5-846964ef82-c70ef6cc6b.zip
Binary file not shown.
Binary file added
BIN
+6.18 KB
.yarn/cache/@babel-helper-plugin-utils-npm-7.26.5-f9c17c9880-1cc0fd8514.zip
Binary file not shown.
Binary file removed
BIN
-10.1 KB
.yarn/cache/@babel-helper-replace-supers-npm-7.24.1-0f96b0a406-1103b28ce0.zip
Binary file not shown.
Binary file removed
BIN
-4.19 KB
...e/@babel-helper-skip-transparent-expression-wrappers-npm-7.22.5-a398428942-1012ef2295.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-37.1 KB
.yarn/cache/@babel-plugin-proposal-decorators-npm-7.24.7-b145211162-456ed3143b.zip
Binary file not shown.
Binary file added
BIN
+13.1 KB
.yarn/cache/@babel-plugin-proposal-decorators-npm-7.25.9-5f30995d50-f564de219a.zip
Binary file not shown.
Binary file removed
BIN
-28.9 KB
.yarn/cache/@babel-plugin-syntax-decorators-npm-7.24.7-fcb66bfb39-067f20c410.zip
Binary file not shown.
Binary file added
BIN
+5.39 KB
.yarn/cache/@babel-plugin-syntax-decorators-npm-7.25.9-2b13eb2692-e22e85c0a7.zip
Binary file not shown.
Binary file removed
BIN
-23.1 KB
.yarn/cache/@babel-plugin-transform-parameters-npm-7.24.1-26a2b19512-c289c18871.zip
Binary file not shown.
Binary file removed
BIN
-42.3 KB
.yarn/cache/@babel-plugin-transform-runtime-npm-7.25.4-bb709b3de5-081dcc4fb8.zip
Binary file not shown.
Binary file added
BIN
+18.7 KB
.yarn/cache/@babel-plugin-transform-runtime-npm-7.25.9-4f4b0f8e6b-d8d4f04a47.zip
Binary file not shown.
Binary file renamed
BIN
+128 KB
...time-npm-7.25.6-6725f0979a-0c4134734d.zip → ...time-npm-7.26.7-685f05ad2c-c7a661a683.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+65.8 KB
...tcss-npm-8.4.47-2f4d4be1fa-f2b50ba9b6.zip → ...stcss-npm-8.5.1-90fd898a99-1fbd287531.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import { AllureReport, resolveConfig } from "@allurereport/core"; | ||
import * as console from "node:console"; | ||
import { createCommand } from "../utils/commands.js"; | ||
|
||
type ClassicCommandOptions = { | ||
output?: string; | ||
reportName?: string; | ||
reportLanguage?: string; | ||
singleFile?: boolean; | ||
historyPath?: string; | ||
knownIssues?: string; | ||
}; | ||
|
||
export const ClassicLegacyCommandAction = async (resultsDir: string, options: ClassicCommandOptions) => { | ||
const before = new Date().getTime(); | ||
const { output, reportName: name, historyPath, knownIssues: knownIssuesPath, ...rest } = options; | ||
const config = await resolveConfig({ | ||
output, | ||
name, | ||
historyPath, | ||
knownIssuesPath, | ||
plugins: { | ||
"@allurereport/plugin-allure2": { | ||
options: rest, | ||
}, | ||
}, | ||
}); | ||
const allureReport = new AllureReport(config); | ||
|
||
await allureReport.start(); | ||
await allureReport.readDirectory(resultsDir); | ||
await allureReport.done(); | ||
|
||
const after = new Date().getTime(); | ||
|
||
console.log(`the report successfully generated (${after - before}ms)`); | ||
}; | ||
|
||
export const ClassicLegacyCommand = createCommand({ | ||
name: "allure2 <resultsDir>", | ||
description: "Generates Allure Classic report based on provided Allure Results", | ||
options: [ | ||
[ | ||
"--output, -o <file>", | ||
{ | ||
description: "The output directory name. Absolute paths are accepted as well", | ||
default: "allure-report", | ||
}, | ||
], | ||
[ | ||
"--report-name, --name <string>", | ||
{ | ||
description: "The report name", | ||
default: "Allure Report", | ||
}, | ||
], | ||
[ | ||
"--report-language, --lang <string>", | ||
{ | ||
description: "Default language of the report (default: OS language)", | ||
}, | ||
], | ||
[ | ||
"--single-file", | ||
{ | ||
description: "Generate single file report", | ||
default: false, | ||
}, | ||
], | ||
[ | ||
"--history-path, -h <file>", | ||
{ | ||
description: "The path to history file", | ||
}, | ||
], | ||
[ | ||
"--known-issues <file>", | ||
{ | ||
description: "Path to the known issues file. Updates the file and quarantines failed tests when specified", | ||
}, | ||
], | ||
], | ||
action: ClassicLegacyCommandAction, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
env: { browser: true, es2020: true }, | ||
extends: ["../../.eslintrc.cjs"], | ||
ignorePatterns: ["dist", ".eslintrc.cjs"], | ||
parser: "@typescript-eslint/parser", | ||
overrides: [ | ||
{ | ||
extends: ["plugin:@typescript-eslint/disable-type-checked"], | ||
files: [".eslintrc.cjs"], | ||
}, | ||
|
||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Classic Plugin | ||
|
||
[<img src="https://allurereport.org/public/img/allure-report.svg" height="85px" alt="Allure Report logo" align="right" />](https://allurereport.org "Allure Report") | ||
|
||
- Learn more about Allure Report at https://allurereport.org | ||
- 📚 [Documentation](https://allurereport.org/docs/) – discover official documentation for Allure Report | ||
- ❓ [Questions and Support](https://github.com/orgs/allure-framework/discussions/categories/questions-support) – get help from the team and community | ||
- 📢 [Official announcements](https://github.com/orgs/allure-framework/discussions/categories/announcements) – be in touch with the latest updates | ||
- 💬 [General Discussion ](https://github.com/orgs/allure-framework/discussions/categories/general-discussion) – engage in casual conversations, share insights and ideas with the community | ||
|
||
--- | ||
|
||
## Overview | ||
|
||
The plugin generates a classic Allure Report. | ||
|
||
## Install | ||
|
||
Use your favorite package manager to install the package: | ||
|
||
```shell | ||
npm add @allurereport/plugin-classic | ||
yarn add @allurereport/plugin-classic | ||
pnpm add @allurereport/plugin-classic | ||
``` | ||
|
||
Then, add the plugin to the Allure configuration file: | ||
|
||
```diff | ||
import { defineConfig } from "allure"; | ||
|
||
export default defineConfig({ | ||
name: "Allure Report", | ||
output: "./allure-report", | ||
historyPath: "./history.jsonl", | ||
plugins: { | ||
+ classic: { | ||
+ options: { | ||
+ reportName: "HelloWorld", | ||
+ }, | ||
+ }, | ||
}, | ||
}); | ||
``` | ||
|
||
## Options | ||
|
||
The plugin accepts the following options: | ||
|
||
| Option | Description | Type | Default | | ||
|------------------|-------------------------------------------------|--------------------------------------------------------------|-----------------| | ||
| `reportName` | Name of the report | `string` | `Allure Report` | | ||
| `singleFile` | Writes the report as a single `index.html` file | `boolean` | `false` | | ||
| `reportLanguage` | Default language of the report | `string` | OS language | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"name": "@allurereport/plugin-allure2", | ||
"version": "3.0.0-beta.7", | ||
"description": "The classic version of Allure HTML report", | ||
"keywords": [ | ||
"allure", | ||
"testing", | ||
"report", | ||
"plugin", | ||
"html" | ||
], | ||
"repository": "https://github.com/allure-framework/allure3", | ||
"license": "Apache-2.0", | ||
"author": "Qameta Software", | ||
"type": "module", | ||
"exports": { | ||
".": "./dist/index.js" | ||
}, | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"./dist" | ||
], | ||
"scripts": { | ||
"build": "run clean && tsc --project ./tsconfig.json", | ||
"clean": "rimraf ./dist", | ||
"eslint": "eslint ./src/**/*.{js,jsx,ts,tsx}", | ||
"eslint:format": "eslint --fix ./src/**/*.{js,jsx,ts,tsx}", | ||
"test": "rimraf ./out && vitest run" | ||
}, | ||
"dependencies": { | ||
"@allurereport/core-api": "workspace:*", | ||
"@allurereport/plugin-api": "workspace:*", | ||
"@allurereport/web-allure2": "workspace:*", | ||
"@allurereport/web-commons": "workspace:*", | ||
"handlebars": "^4.7.8" | ||
}, | ||
"devDependencies": { | ||
"@stylistic/eslint-plugin": "^2.6.1", | ||
"@types/eslint": "^8.56.11", | ||
"@types/node": "^20.17.9", | ||
"@typescript-eslint/eslint-plugin": "^8.0.0", | ||
"@typescript-eslint/parser": "^8.0.0", | ||
"@vitest/runner": "^2.1.8", | ||
"allure-vitest": "^3.0.9", | ||
"eslint": "^8.57.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-jsdoc": "^50.0.0", | ||
"eslint-plugin-n": "^17.10.1", | ||
"eslint-plugin-no-null": "^1.0.2", | ||
"eslint-plugin-prefer-arrow": "^1.2.3", | ||
"rimraf": "^6.0.1", | ||
"typescript": "^5.6.3", | ||
"vitest": "^2.1.8" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import type { Allure2Category, Allure2Status } from "./model.js"; | ||
|
||
const productDefects: Allure2Category = { | ||
name: "Product defects", | ||
matchedStatuses: ["failed"], | ||
}; | ||
|
||
const testDefects: Allure2Category = { | ||
name: "Test defects", | ||
matchedStatuses: ["broken"], | ||
}; | ||
|
||
export const matchCategories = ( | ||
categories: Allure2Category[], | ||
result: { statusMessage?: string; statusTrace?: string; status: Allure2Status; flaky: boolean }, | ||
) => { | ||
const matched = categories.filter((category) => categoryMatch(category, result)); | ||
|
||
if (matched.length === 0 && categoryMatch(productDefects, result)) { | ||
matched.push(productDefects); | ||
} | ||
if (matched.length === 0 && categoryMatch(testDefects, result)) { | ||
matched.push(testDefects); | ||
} | ||
return matched; | ||
}; | ||
|
||
const categoryMatch = ( | ||
category: Allure2Category, | ||
result: { statusMessage?: string; statusTrace?: string; status: Allure2Status; flaky: boolean }, | ||
): boolean => { | ||
const { status, statusMessage, statusTrace, flaky } = result; | ||
const matchesStatus = | ||
!category.matchedStatuses || category.matchedStatuses.length === 0 || category.matchedStatuses.includes(status); | ||
const matchesMessage = match(category.messageRegex, statusMessage); | ||
const matchesTrace = match(category.traceRegex, statusTrace); | ||
const matchesFlaky = (category.flaky ?? flaky) === flaky; | ||
return matchesStatus && matchesMessage && matchesTrace && matchesFlaky; | ||
}; | ||
|
||
const match = (regex?: string, value?: string): boolean => { | ||
if (!regex) { | ||
return true; | ||
} | ||
if (!value) { | ||
return false; | ||
} | ||
try { | ||
const b = new RegExp(regex, "s").test(value); | ||
return b; | ||
} catch (ignored) { | ||
return false; | ||
} | ||
}; |
Oops, something went wrong.