allure-js-commons

  • Version 3.2.1
  • Published
  • 845 kB
  • 1 dependency
  • Apache-2.0 license

Install

npm i allure-js-commons
yarn add allure-js-commons
pnpm add allure-js-commons

Overview

Allure JS Commons

Index

Variables

variable StatusByPriority

const StatusByPriority: Status[];

    Functions

    function allureId

    allureId: (value: string) => PromiseLike<void>;

      function attachment

      attachment: (
      name: string,
      content: Buffer | string,
      options: ContentType | string | AttachmentOptions
      ) => PromiseLike<void>;

        function attachmentPath

        attachmentPath: (
        name: string,
        path: string,
        options: ContentType | string | Omit<AttachmentOptions, 'encoding'>
        ) => PromiseLike<void>;

          function attachTrace

          attachTrace: (name: string, path: string) => PromiseLike<void>;

            function description

            description: (markdown: string) => PromiseLike<void>;

              function descriptionHtml

              descriptionHtml: (html: string) => PromiseLike<void>;

                function displayName

                displayName: (name: string) => PromiseLike<void>;

                  function epic

                  epic: (name: string) => PromiseLike<void>;

                    function feature

                    feature: (name: string) => PromiseLike<void>;

                      function historyId

                      historyId: (value: string) => PromiseLike<void>;

                        function issue

                        issue: (url: string, name?: string) => PromiseLike<void>;

                          function label

                          label: (name: LabelName | string, value: string) => PromiseLike<void>;

                            function labels

                            labels: (...labelsList: Label[]) => PromiseLike<void>;

                              function layer

                              layer: (name: string) => PromiseLike<void>;
                                link: (
                                url: string,
                                name?: string,
                                type?: LinkType | string
                                ) => PromiseLike<void>;
                                  links: (...linksList: Link[]) => PromiseLike<void>;

                                    function logStep

                                    logStep: (name: string, status?: Status, error?: Error) => PromiseLike<void>;

                                      function owner

                                      owner: (name: string) => PromiseLike<void>;

                                        function parameter

                                        parameter: (
                                        name: string,
                                        value: string,
                                        options?: ParameterOptions
                                        ) => PromiseLike<void>;

                                          function parentSuite

                                          parentSuite: (name: string) => PromiseLike<void>;

                                            function severity

                                            severity: (name: string) => PromiseLike<void>;

                                              function step

                                              step: <T = void>(
                                              name: string,
                                              body: (context: StepContext) => T | PromiseLike<T>
                                              ) => PromiseLike<T>;

                                                function story

                                                story: (name: string) => PromiseLike<void>;

                                                  function subSuite

                                                  subSuite: (name: string) => PromiseLike<void>;

                                                    function suite

                                                    suite: (name: string) => PromiseLike<void>;

                                                      function tag

                                                      tag: (name: string) => PromiseLike<void>;

                                                        function tags

                                                        tags: (...tagsList: string[]) => PromiseLike<void>;

                                                          function testCaseId

                                                          testCaseId: (value: string) => PromiseLike<void>;

                                                            function tms

                                                            tms: (url: string, name?: string) => PromiseLike<void>;

                                                              Interfaces

                                                              interface Attachment

                                                              interface Attachment {}

                                                                property name

                                                                name: string;

                                                                  property source

                                                                  source: string;

                                                                    property type

                                                                    type?: string;

                                                                      interface AttachmentOptions

                                                                      interface AttachmentOptions {}

                                                                        property contentType

                                                                        contentType: ContentType | string;

                                                                          property encoding

                                                                          encoding?: BufferEncoding;

                                                                            property fileExtension

                                                                            fileExtension?: string;

                                                                              interface FixtureResult

                                                                              interface FixtureResult extends Executable {}

                                                                                interface ImageDiffAttachment

                                                                                interface ImageDiffAttachment {}

                                                                                  property actual

                                                                                  actual: string | undefined;

                                                                                    property diff

                                                                                    diff: string | undefined;

                                                                                      property expected

                                                                                      expected: string | undefined;

                                                                                        property name

                                                                                        name: string;

                                                                                          interface Label

                                                                                          interface Label {}

                                                                                            property name

                                                                                            name: LabelName | string;

                                                                                              property value

                                                                                              value: string;
                                                                                                interface Link {}

                                                                                                  property name

                                                                                                  name?: string;

                                                                                                    property type

                                                                                                    type?: LinkType | string;

                                                                                                      property url

                                                                                                      url: string;

                                                                                                        interface Parameter

                                                                                                        interface Parameter {}

                                                                                                          property excluded

                                                                                                          excluded?: boolean;

                                                                                                            property mode

                                                                                                            mode?: ParameterMode;

                                                                                                              property name

                                                                                                              name: string;

                                                                                                                property value

                                                                                                                value: string;

                                                                                                                  interface StatusDetails

                                                                                                                  interface StatusDetails {}

                                                                                                                    property actual

                                                                                                                    actual?: string;

                                                                                                                      property expected

                                                                                                                      expected?: string;

                                                                                                                        property message

                                                                                                                        message?: string;

                                                                                                                          property trace

                                                                                                                          trace?: string;

                                                                                                                            interface StepResult

                                                                                                                            interface StepResult extends Executable {}

                                                                                                                              interface TestResult

                                                                                                                              interface TestResult extends Executable {}

                                                                                                                                property fullName

                                                                                                                                fullName?: string;

                                                                                                                                  property historyId

                                                                                                                                  historyId?: string;

                                                                                                                                    property labels

                                                                                                                                    labels: Label[];
                                                                                                                                      links: Link[];

                                                                                                                                        property testCaseId

                                                                                                                                        testCaseId?: string;

                                                                                                                                          property uuid

                                                                                                                                          uuid: string;

                                                                                                                                            interface TestResultContainer

                                                                                                                                            interface TestResultContainer {}

                                                                                                                                              property afters

                                                                                                                                              afters: FixtureResult[];

                                                                                                                                                property befores

                                                                                                                                                befores: FixtureResult[];

                                                                                                                                                  property children

                                                                                                                                                  children: string[];

                                                                                                                                                    property name

                                                                                                                                                    name?: string;

                                                                                                                                                      property uuid

                                                                                                                                                      uuid: string;

                                                                                                                                                        Enums

                                                                                                                                                        enum ContentType

                                                                                                                                                        enum ContentType {
                                                                                                                                                        TEXT = 'text/plain',
                                                                                                                                                        XML = 'application/xml',
                                                                                                                                                        HTML = 'text/html',
                                                                                                                                                        CSV = 'text/csv',
                                                                                                                                                        TSV = 'text/tab-separated-values',
                                                                                                                                                        CSS = 'text/css',
                                                                                                                                                        URI = 'text/uri-list',
                                                                                                                                                        SVG = 'image/svg+xml',
                                                                                                                                                        PNG = 'image/png',
                                                                                                                                                        JSON = 'application/json',
                                                                                                                                                        ZIP = 'application/zip',
                                                                                                                                                        WEBM = 'video/webm',
                                                                                                                                                        JPEG = 'image/jpeg',
                                                                                                                                                        MP4 = 'video/mp4',
                                                                                                                                                        IMAGEDIFF = 'application/vnd.allure.image.diff',
                                                                                                                                                        }

                                                                                                                                                          member CSS

                                                                                                                                                          CSS = 'text/css'

                                                                                                                                                            member CSV

                                                                                                                                                            CSV = 'text/csv'

                                                                                                                                                              member HTML

                                                                                                                                                              HTML = 'text/html'

                                                                                                                                                                member IMAGEDIFF

                                                                                                                                                                IMAGEDIFF = 'application/vnd.allure.image.diff'

                                                                                                                                                                  member JPEG

                                                                                                                                                                  JPEG = 'image/jpeg'

                                                                                                                                                                    member JSON

                                                                                                                                                                    JSON = 'application/json'

                                                                                                                                                                      member MP4

                                                                                                                                                                      MP4 = 'video/mp4'

                                                                                                                                                                        member PNG

                                                                                                                                                                        PNG = 'image/png'

                                                                                                                                                                          member SVG

                                                                                                                                                                          SVG = 'image/svg+xml'

                                                                                                                                                                            member TEXT

                                                                                                                                                                            TEXT = 'text/plain'

                                                                                                                                                                              member TSV

                                                                                                                                                                              TSV = 'text/tab-separated-values'

                                                                                                                                                                                member URI

                                                                                                                                                                                URI = 'text/uri-list'

                                                                                                                                                                                  member WEBM

                                                                                                                                                                                  WEBM = 'video/webm'

                                                                                                                                                                                    member XML

                                                                                                                                                                                    XML = 'application/xml'

                                                                                                                                                                                      member ZIP

                                                                                                                                                                                      ZIP = 'application/zip'

                                                                                                                                                                                        enum LabelName

                                                                                                                                                                                        enum LabelName {
                                                                                                                                                                                        ALLURE_ID = 'ALLURE_ID',
                                                                                                                                                                                        AS_ID = 'ALLURE_ID',
                                                                                                                                                                                        SUITE = 'suite',
                                                                                                                                                                                        PARENT_SUITE = 'parentSuite',
                                                                                                                                                                                        SUB_SUITE = 'subSuite',
                                                                                                                                                                                        EPIC = 'epic',
                                                                                                                                                                                        FEATURE = 'feature',
                                                                                                                                                                                        STORY = 'story',
                                                                                                                                                                                        SEVERITY = 'severity',
                                                                                                                                                                                        TAG = 'tag',
                                                                                                                                                                                        OWNER = 'owner',
                                                                                                                                                                                        LEAD = 'lead',
                                                                                                                                                                                        HOST = 'host',
                                                                                                                                                                                        THREAD = 'thread',
                                                                                                                                                                                        TEST_METHOD = 'testMethod',
                                                                                                                                                                                        TEST_CLASS = 'testClass',
                                                                                                                                                                                        PACKAGE = 'package',
                                                                                                                                                                                        FRAMEWORK = 'framework',
                                                                                                                                                                                        LANGUAGE = 'language',
                                                                                                                                                                                        LAYER = 'layer',
                                                                                                                                                                                        }

                                                                                                                                                                                          member ALLURE_ID

                                                                                                                                                                                          ALLURE_ID = 'ALLURE_ID'

                                                                                                                                                                                            member AS_ID

                                                                                                                                                                                            AS_ID = 'ALLURE_ID'
                                                                                                                                                                                            • Deprecated

                                                                                                                                                                                              please use ALLURE_ID instead

                                                                                                                                                                                            member EPIC

                                                                                                                                                                                            EPIC = 'epic'

                                                                                                                                                                                              member FEATURE

                                                                                                                                                                                              FEATURE = 'feature'

                                                                                                                                                                                                member FRAMEWORK

                                                                                                                                                                                                FRAMEWORK = 'framework'

                                                                                                                                                                                                  member HOST

                                                                                                                                                                                                  HOST = 'host'

                                                                                                                                                                                                    member LANGUAGE

                                                                                                                                                                                                    LANGUAGE = 'language'

                                                                                                                                                                                                      member LAYER

                                                                                                                                                                                                      LAYER = 'layer'

                                                                                                                                                                                                        member LEAD

                                                                                                                                                                                                        LEAD = 'lead'

                                                                                                                                                                                                          member OWNER

                                                                                                                                                                                                          OWNER = 'owner'

                                                                                                                                                                                                            member PACKAGE

                                                                                                                                                                                                            PACKAGE = 'package'

                                                                                                                                                                                                              member PARENT_SUITE

                                                                                                                                                                                                              PARENT_SUITE = 'parentSuite'

                                                                                                                                                                                                                member SEVERITY

                                                                                                                                                                                                                SEVERITY = 'severity'

                                                                                                                                                                                                                  member STORY

                                                                                                                                                                                                                  STORY = 'story'

                                                                                                                                                                                                                    member SUB_SUITE

                                                                                                                                                                                                                    SUB_SUITE = 'subSuite'

                                                                                                                                                                                                                      member SUITE

                                                                                                                                                                                                                      SUITE = 'suite'

                                                                                                                                                                                                                        member TAG

                                                                                                                                                                                                                        TAG = 'tag'

                                                                                                                                                                                                                          member TEST_CLASS

                                                                                                                                                                                                                          TEST_CLASS = 'testClass'

                                                                                                                                                                                                                            member TEST_METHOD

                                                                                                                                                                                                                            TEST_METHOD = 'testMethod'

                                                                                                                                                                                                                              member THREAD

                                                                                                                                                                                                                              THREAD = 'thread'

                                                                                                                                                                                                                                enum LinkType

                                                                                                                                                                                                                                enum LinkType {
                                                                                                                                                                                                                                DEFAULT = 'link',
                                                                                                                                                                                                                                ISSUE = 'issue',
                                                                                                                                                                                                                                TMS = 'tms',
                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                  member DEFAULT

                                                                                                                                                                                                                                  DEFAULT = 'link'

                                                                                                                                                                                                                                    member ISSUE

                                                                                                                                                                                                                                    ISSUE = 'issue'

                                                                                                                                                                                                                                      member TMS

                                                                                                                                                                                                                                      TMS = 'tms'

                                                                                                                                                                                                                                        enum Severity

                                                                                                                                                                                                                                        enum Severity {
                                                                                                                                                                                                                                        BLOCKER = 'blocker',
                                                                                                                                                                                                                                        CRITICAL = 'critical',
                                                                                                                                                                                                                                        NORMAL = 'normal',
                                                                                                                                                                                                                                        MINOR = 'minor',
                                                                                                                                                                                                                                        TRIVIAL = 'trivial',
                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                          member BLOCKER

                                                                                                                                                                                                                                          BLOCKER = 'blocker'

                                                                                                                                                                                                                                            member CRITICAL

                                                                                                                                                                                                                                            CRITICAL = 'critical'

                                                                                                                                                                                                                                              member MINOR

                                                                                                                                                                                                                                              MINOR = 'minor'

                                                                                                                                                                                                                                                member NORMAL

                                                                                                                                                                                                                                                NORMAL = 'normal'

                                                                                                                                                                                                                                                  member TRIVIAL

                                                                                                                                                                                                                                                  TRIVIAL = 'trivial'

                                                                                                                                                                                                                                                    enum Stage

                                                                                                                                                                                                                                                    enum Stage {
                                                                                                                                                                                                                                                    SCHEDULED = 'scheduled',
                                                                                                                                                                                                                                                    RUNNING = 'running',
                                                                                                                                                                                                                                                    FINISHED = 'finished',
                                                                                                                                                                                                                                                    PENDING = 'pending',
                                                                                                                                                                                                                                                    INTERRUPTED = 'interrupted',
                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                      member FINISHED

                                                                                                                                                                                                                                                      FINISHED = 'finished'

                                                                                                                                                                                                                                                        member INTERRUPTED

                                                                                                                                                                                                                                                        INTERRUPTED = 'interrupted'

                                                                                                                                                                                                                                                          member PENDING

                                                                                                                                                                                                                                                          PENDING = 'pending'

                                                                                                                                                                                                                                                            member RUNNING

                                                                                                                                                                                                                                                            RUNNING = 'running'

                                                                                                                                                                                                                                                              member SCHEDULED

                                                                                                                                                                                                                                                              SCHEDULED = 'scheduled'

                                                                                                                                                                                                                                                                enum Status

                                                                                                                                                                                                                                                                enum Status {
                                                                                                                                                                                                                                                                FAILED = 'failed',
                                                                                                                                                                                                                                                                BROKEN = 'broken',
                                                                                                                                                                                                                                                                PASSED = 'passed',
                                                                                                                                                                                                                                                                SKIPPED = 'skipped',
                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                  member BROKEN

                                                                                                                                                                                                                                                                  BROKEN = 'broken'

                                                                                                                                                                                                                                                                    member FAILED

                                                                                                                                                                                                                                                                    FAILED = 'failed'

                                                                                                                                                                                                                                                                      member PASSED

                                                                                                                                                                                                                                                                      PASSED = 'passed'

                                                                                                                                                                                                                                                                        member SKIPPED

                                                                                                                                                                                                                                                                        SKIPPED = 'skipped'

                                                                                                                                                                                                                                                                          Type Aliases

                                                                                                                                                                                                                                                                          type ParameterMode

                                                                                                                                                                                                                                                                          type ParameterMode = 'hidden' | 'masked' | 'default';

                                                                                                                                                                                                                                                                            type ParameterOptions

                                                                                                                                                                                                                                                                            type ParameterOptions = Pick<Parameter, 'mode' | 'excluded'>;

                                                                                                                                                                                                                                                                              type StepContext

                                                                                                                                                                                                                                                                              type StepContext = {
                                                                                                                                                                                                                                                                              displayName: (name: string) => void | PromiseLike<void>;
                                                                                                                                                                                                                                                                              parameter: (
                                                                                                                                                                                                                                                                              name: string,
                                                                                                                                                                                                                                                                              value: string,
                                                                                                                                                                                                                                                                              mode?: ParameterMode
                                                                                                                                                                                                                                                                              ) => void | PromiseLike<void>;
                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                type TestOrStepResult

                                                                                                                                                                                                                                                                                type TestOrStepResult = StepResult | TestResult;

                                                                                                                                                                                                                                                                                  Package Files (3)

                                                                                                                                                                                                                                                                                  Dependencies (1)

                                                                                                                                                                                                                                                                                  Dev Dependencies (24)

                                                                                                                                                                                                                                                                                  Peer Dependencies (1)

                                                                                                                                                                                                                                                                                  Badge

                                                                                                                                                                                                                                                                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/allure-js-commons.

                                                                                                                                                                                                                                                                                  • Markdown
                                                                                                                                                                                                                                                                                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/allure-js-commons)
                                                                                                                                                                                                                                                                                  • HTML
                                                                                                                                                                                                                                                                                    <a href="https://www.jsdocs.io/package/allure-js-commons"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>