Skip to content
Snippets Groups Projects
Commit b72b65b1 authored by Erik Borgeteien Hansen's avatar Erik Borgeteien Hansen
Browse files

add mock of store to test

parent 7adace0b
No related branches found
No related tags found
2 merge requests!87Community request,!86Community admin
import { shallowMount } from "@vue/test-utils";
import CommunityHamburger from "@/components/CommunityComponents/CommunityHamburger.vue";
import { route, router, $route, $router } from "../../mock-router";
describe("CommunityHamburger elements rendering", () => {
it("renders all li fields", () => {
const wrapper = shallowMount(CommunityHamburger);
let wrapper;
beforeEach(() => {
wrapper = shallowMount(CommunityHamburger, {
//passing prop to component
props: {
adminStatus: true,
community: {
communityId: 1,
name: "String",
description: "String",
visibility: 0,
location: "String",
picture: "String",
},
},
global: {
mocks: {
route,
router,
$route,
$router,
},
},
});
});
it("renders all li fields", () => {
expect(wrapper.find("#newItem").text()).toMatch("Opprett Utleie");
expect(wrapper.find("#getMembers").text()).toMatch("Se Medlemmer");
expect(wrapper.find("#adminGroup").text()).toMatch("Administrer Gruppe");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment