How to use the @times-components/provider-test-tools.article function in @times-components/provider-test-tools

To help you get started, we’ve selected a few @times-components/provider-test-tools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github newsuk / times-components / packages / article-magazine-comment / article-magazine-comment.showcase.js View on Github external
component: ({ select }, { decorateAction }) => {
        const id = "198c4b2f-ecec-4f34-be53-c89f83bc1b44";
        const scale = selectScales(select);
        const section = selectSection(select);

        return mockArticle({
          decorateAction,
          id,
          params: makeParams({
            error: () => new Error("Article error"),
            variables: () => ({
              id
            })
          }),
          scale,
          section
        });
      },
      name: "Magazine Comment - Error",
github newsuk / times-components / packages / article-main-comment / article-main-comment.showcase.js View on Github external
component: ({ select }, { decorateAction }) => {
        const id = "198c4b2f-ecec-4f34-be53-c89f83bc1b44";
        const scale = selectScales(select);
        const section = selectSection(select);

        return mockArticle({
          decorateAction,
          id,
          params: makeParams({
            error: () => new Error("Article error"),
            variables: () => ({
              id
            })
          }),
          scale,
          section
        });
      },
      name: "Main Comment - Error",
github newsuk / times-components / packages / article-main-standard / article-main-standard.showcase.js View on Github external
component: ({ select }, { decorateAction }) => {
        const id = "198c4b2f-ecec-4f34-be53-c89f83bc1b44";
        const scale = selectScales(select);
        const sectionColour = selectSection(select);

        return mockArticle({
          decorateAction,
          id,
          params: makeParams({
            error: () => new Error("Article error"),
            variables: () => ({
              id
            })
          }),
          scale,
          sectionColour
        });
      },
      name: "Error",
github newsuk / times-components / packages / article-magazine-standard / article-magazine-standard.showcase.js View on Github external
component: ({ select }, { decorateAction }) => {
        const id = "198c4b2f-ecec-4f34-be53-c89f83bc1b44";
        const scale = selectScales(select);
        const section = selectSection(select);

        return mockArticle({
          decorateAction,
          id,
          params: makeParams({
            error: () => new Error("Article error"),
            variables: () => ({
              id
            })
          }),
          scale,
          section
        });
      },
      name: "Magazine Standard - Error",
github newsuk / times-components / packages / article-in-depth / article-in-depth.showcase.js View on Github external
component: ({ select }, { decorateAction }) => {
        const id = "198c4b2f-ecec-4f34-be53-c89f83bc1b44";
        const scale = selectScales(select);
        const section = selectSection(select);

        return mockArticle({
          decorateAction,
          id,
          params: makeParams({
            error: () => new Error("Article error"),
            variables: () => ({
              id
            })
          }),
          scale,
          section
        });
      },
      name: "In Depth - Error",
github newsuk / times-components / packages / article / showcase-helper.js View on Github external
componentDidMount() {
    const { configuration, id } = this.props;
    schemaToMocks(
      makeParams({
        makeArticle: makeArticle(configuration),
        variables: () => ({
          id
        })
      })
    ).then(mocks => this.setState({ mocks }));
  }
github newsuk / times-components / packages / article / showcase-helper.js View on Github external
() =>
          schemaToMocks(
            makeParams({
              makeArticle: makeArticle(configuration),
              variables: () => ({
                id
              })
            })
          ).then(mocks => this.setState({ mocks, reRendering: false }))
      );