Skip to main content

externalAboutView <NET>

Interaction object representing the About view in the HTML report.

Shows project information, links to documentation, and version details.

Instantiation

import { AboutView, Navigation } from '@serenity-js/html-reporter/serenity';
import { By, PageElement } from '@serenity-js/web';

const aboutView = new AboutView(
PageElement.located(By.css('[data-testid="about"]')).describedAs('about view'),
new Navigation(),
);

Usage in an integration test

await actor.attemptsTo(
aboutView.open(),
Ensure.that(aboutView.bodyText(), includes('Serenity/JS')),
Ensure.that(aboutView.hasLinkTo('https://serenity-js.org'), equals(true)),
);

Hierarchy

Index

Constructors

externalconstructor

Methods

externalbodyText

  • The full body text of the about view.

    Example

    Ensure.that(aboutView.bodyText(), includes('Serenity/JS'))

    Returns QuestionAdapter<string>

externalhasLinkTo

  • hasLinkTo(url: string): Question<Promise<boolean>>
  • Whether the about view contains a link with the given URL.

    Example

    Ensure.that(aboutView.hasLinkTo('https://serenity-js.org'), equals(true))

    Parameters

    • externalurl: string

      The exact href value to check for

    Returns Question<Promise<boolean>>

externalopen

  • Navigates to the About view via the sidebar navigation.

    Example

    await actor.attemptsTo(
    aboutView.open(),
    );

    Returns Task

externalisPresent

  • Checks whether the interaction object's root element is present in the DOM.

    Since InteractionObject implements Optional, you can assert on presence directly:

    Ensure.that(view, isPresent())

    Returns Answerable<boolean>