var __async = (__this, __arguments, generator) => {
  return new Promise((resolve, reject) => {
    var fulfilled = (value) => {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    };
    var rejected = (value) => {
      try {
        step(generator.throw(value));
      } catch (e) {
        reject(e);
      }
    };
    var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
    step((generator = generator.apply(__this, __arguments)).next());
  });
};

// src/relay/Feedback/FeedbackContainer.test.tsx
import { expect, it, describe } from "vitest";
import { page } from "@vitest/browser/context";
import { composeStories } from "@storybook/react";
import * as stories from "./FeedbackContainer.stories.mjs";
import * as React from "react";
import { prepareStoryContextForTest } from "@nova/react-test-utils";
import { render } from "vitest-browser-react";
var { Primary, Liked, LikeFailure } = composeStories(stories);
describe("FeedbackContainer", () => {
  it("should correctly propagate parameters even when multiple stories with same resolvers are rendered", () => __async(void 0, null, function* () {
    render(/* @__PURE__ */ React.createElement(Primary, null));
    render(/* @__PURE__ */ React.createElement(Liked, null));
    render(/* @__PURE__ */ React.createElement(Primary, null));
    const texts = page.getByText("Feedback: Feedback title");
    expect(texts.elements()).toHaveLength(3);
  }));
  it("should show an error if the like button fails", () => __async(void 0, null, function* () {
    var _a;
    const { container } = render(/* @__PURE__ */ React.createElement(LikeFailure, null));
    yield (_a = LikeFailure.play) == null ? void 0 : _a.call(LikeFailure, prepareStoryContextForTest(LikeFailure, container));
    const error = page.getByText("Something went wrong");
    yield expect.element(error).toBeInTheDocument();
  }));
});
