Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 2x 2x 2x 2x 2x 2x 2x 2x | import { composeStories } from "@storybook/react"; import * as sbPreview from "dot-storybook/preview"; import React from "react"; import { stubStoryActions } from "orphic-cypress"; // @ts-ignore import * as stories from "./index.stories.mdx"; const { mdxFileWithExternalTests: MdxFileWithExternalTests } = composeStories( stories, sbPreview ); describe("External test file", () => { it("should contain the external label", () => { const actions = stubStoryActions(MdxFileWithExternalTests, stories); cy.mount(<MdxFileWithExternalTests {...actions} />); cy.dataCy("button").should("contain", "In MDX"); cy.dataCy("button") .click() .then(() => expect(actions.onClick).to.be.calledOnceWith(0)); }); }); |