import avatar from "../../../.storybook/uk1.patrizia.huggel.jpg";
import AccountMenuContent from "./AccountMenuContent.vue";

const bern = {
  id: 1,
  title: "Bern 2023 a",
};
let selectedSession = bern;
const courseSessions = [
  bern,
  {
    id: 2,
    title: "Zürich 2023 a",
  },
];
const user = {
  first_name: "Vreni",
  last_name: "Schmid",
  email: "vreni.schmid@example.com",
  avatar_url: avatar,
  loggedIn: true,
};

const selectCourseSession = (session) => {
  selectedSession = session;
  console.log("session");
};

describe("<AccountMenuContent />", () => {
  it("renders", () => {
    // see: https://on.cypress.io/mounting-vue
    cy.mount(AccountMenuContent, {
      props: {
        user,
        allCourseSessions: courseSessions,
        selectedCourseSession: selectedSession,
        onSelectCourseSession: selectCourseSession,
      },
    });
  });
});
