From 474ef257dfbd7388a3a8465319e8026499000a91 Mon Sep 17 00:00:00 2001 From: Gilgard <Hjelljord.alida@gmail.com> Date: Fri, 6 May 2022 17:08:41 +0200 Subject: [PATCH] Tests --- .../__snapshots__/color-button.spec.js.snap | 16 ++++ .../custom-footer-modal.spec.js.snap | 77 +++++++++++++++++++ .../__snapshots__/footer-bar.spec.js.snap | 37 +++++++++ .../form-image-display.spec.js.snap | 21 +++++ .../__snapshots__/icon-button.spec.js.snap | 41 ++++++++++ .../__snapshots__/nav-bar.spec.js.snap | 77 +++++++++++++++++++ .../notification-modal.spec.js.snap | 64 +++++++++++++++ .../pagination-template.spec.js.snap | 12 +++ .../triple-dot-button.spec.js.snap | 26 +++++++ .../base-component-tests/color-button.spec.js | 4 + .../custom-footer-modal.spec.js | 4 + .../base-component-tests/footer-bar.spec.js | 18 +++++ .../form-image-display.spec.js | 23 ++++++ .../base-component-tests/icon-button.spec.js | 4 + .../base-component-tests/nav-bar.spec.js | 4 + .../notification-modal.spec.js | 4 + .../pagination-template.spec.js | 4 + .../triple-dot-button.spec.js | 18 +++++ .../community-header.spec.js.snap | 3 + .../__snapshots__/new-item-form.spec.js.snap | 6 ++ .../__snapshots__/login-form.spec.js.snap | 3 + .../new-password-form.spec.js.snap | 3 + .../register-user-component.spec.js.snap | 3 + .../reset-password-form.spec.js.snap | 3 + .../__snapshots__/user-items.spec.js.snap | 6 ++ 25 files changed, 481 insertions(+) create mode 100644 tests/unit/component-tests/base-component-tests/__snapshots__/color-button.spec.js.snap create mode 100644 tests/unit/component-tests/base-component-tests/__snapshots__/custom-footer-modal.spec.js.snap create mode 100644 tests/unit/component-tests/base-component-tests/__snapshots__/footer-bar.spec.js.snap create mode 100644 tests/unit/component-tests/base-component-tests/__snapshots__/form-image-display.spec.js.snap create mode 100644 tests/unit/component-tests/base-component-tests/__snapshots__/icon-button.spec.js.snap create mode 100644 tests/unit/component-tests/base-component-tests/__snapshots__/nav-bar.spec.js.snap create mode 100644 tests/unit/component-tests/base-component-tests/__snapshots__/notification-modal.spec.js.snap create mode 100644 tests/unit/component-tests/base-component-tests/__snapshots__/pagination-template.spec.js.snap create mode 100644 tests/unit/component-tests/base-component-tests/__snapshots__/triple-dot-button.spec.js.snap create mode 100644 tests/unit/component-tests/base-component-tests/footer-bar.spec.js create mode 100644 tests/unit/component-tests/base-component-tests/form-image-display.spec.js create mode 100644 tests/unit/component-tests/base-component-tests/triple-dot-button.spec.js diff --git a/tests/unit/component-tests/base-component-tests/__snapshots__/color-button.spec.js.snap b/tests/unit/component-tests/base-component-tests/__snapshots__/color-button.spec.js.snap new file mode 100644 index 0000000..23b4e25 --- /dev/null +++ b/tests/unit/component-tests/base-component-tests/__snapshots__/color-button.spec.js.snap @@ -0,0 +1,16 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ColoredButtonComponent renders correctly 1`] = ` +<div + data-v-app="" +> + + <!-- Button with custom text and color --> + <button + class="flex items-center px-2 py-2 font-medium tracking-wide capitalize text-white transition-colors duration-200 transform rounded-md focus:outline-none focus:ring focus:ring-opacity-80 min-w-{20px} bg-primary-medium hover:bg-primary-dark focus:ring-primary-light" + > + hei + </button> + +</div> +`; diff --git a/tests/unit/component-tests/base-component-tests/__snapshots__/custom-footer-modal.spec.js.snap b/tests/unit/component-tests/base-component-tests/__snapshots__/custom-footer-modal.spec.js.snap new file mode 100644 index 0000000..088e1e4 --- /dev/null +++ b/tests/unit/component-tests/base-component-tests/__snapshots__/custom-footer-modal.spec.js.snap @@ -0,0 +1,77 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`IconButtonComponent renders correctly 1`] = ` +<div + data-v-app="" +> + + <!-- Main modal --> + <div + class="fixed grid place-items-center bg-gray-600 bg-opacity-50 top-0 left-0 right-0 z-50 w-full overflow-x-hidden overflow-y-auto inset-0 h-full" + > + <div + class="relative w-full h-full max-w-2xl p-4 md:h-auto" + > + <!-- Modal content --> + <div + class="relative bg-white rounded-lg shadow dark:bg-gray-700" + > + <!-- Modal header --> + <div + class="flex items-start justify-between p-4 border-b rounded-t dark:border-gray-600" + > + <h3 + class="text-xl font-semibold text-gray-900 dark:text-white" + > + String + </h3> + <!-- Close button --> + <button + class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white" + > + <svg + aria-hidden="true" + class="w-5 h-5" + fill="none" + stroke="currentColor" + stroke-width="2" + viewBox="0 0 24 24" + xmlns="http://www.w3.org/2000/svg" + > + <path + d="M6 18L18 6M6 6l12 12" + stroke-linecap="round" + stroke-linejoin="round" + /> + </svg> + </button> + </div> + <!-- Modal body --> + <div + class="p-6 space-y-6" + > + <p + class="text-base leading-relaxed text-gray-500 dark:text-gray-400" + > + String + </p> + </div> + <!-- Modal footer --> + <div + class="rounded-b border-t border-gray-200 dark:border-gray-600" + > + <!-- Slot: Add any html you want here (Must be one div) --> + + <div + class="fake-msg" + > + String + </div> + + </div> + </div> + </div> + </div> + +</div> +`; diff --git a/tests/unit/component-tests/base-component-tests/__snapshots__/footer-bar.spec.js.snap b/tests/unit/component-tests/base-component-tests/__snapshots__/footer-bar.spec.js.snap new file mode 100644 index 0000000..bf4ee8c --- /dev/null +++ b/tests/unit/component-tests/base-component-tests/__snapshots__/footer-bar.spec.js.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`FooterBar component renders correctly 1`] = ` +<div + data-v-app="" +> + + <!-- Footer --> + <footer + class="w-full bg-white dark:bg-gray-800 sm:flex-row border-1 border-t border-gray-600 h-10" + > + <!-- Copyright --> + <p + class="float-left text-xs my-3 ml-4 text-primary-dark" + > + © BoCo 2022 - All rights reserved + </p> + <!-- Icon link to help page --> + <svg + aria-hidden="true" + class="md:mt-0 mt-1 mr-4 float-right cursor-pointer h-8 md:h-10 text-primary-medium" + fill="none" + stroke="currentColor" + stroke-width="2" + viewBox="0 0 24 24" + xmlns="http://www.w3.org/2000/svg" + > + <path + d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" + stroke-linecap="round" + stroke-linejoin="round" + /> + </svg> + </footer> + +</div> +`; diff --git a/tests/unit/component-tests/base-component-tests/__snapshots__/form-image-display.spec.js.snap b/tests/unit/component-tests/base-component-tests/__snapshots__/form-image-display.spec.js.snap new file mode 100644 index 0000000..a6dc51e --- /dev/null +++ b/tests/unit/component-tests/base-component-tests/__snapshots__/form-image-display.spec.js.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`FormImageDisplay component renders correctly 1`] = ` +<div + data-v-app="" +> + + <!-- Image --> + <img + alt="Bilde av gjenstanden" + class="w-2/5 inline" + src="http://localhost:3000/api/images/5" + /> + <!-- Modal --> + + <!-- Main modal --> + <!--v-if--> + + +</div> +`; diff --git a/tests/unit/component-tests/base-component-tests/__snapshots__/icon-button.spec.js.snap b/tests/unit/component-tests/base-component-tests/__snapshots__/icon-button.spec.js.snap new file mode 100644 index 0000000..f38c6fa --- /dev/null +++ b/tests/unit/component-tests/base-component-tests/__snapshots__/icon-button.spec.js.snap @@ -0,0 +1,41 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`IconButtonComponent renders correctly 1`] = ` +<div + data-v-app="" +> + + <!-- Button --> + <button + class="flex items-center px-2 py-2 font-medium tracking-wide capitalize text-white transition-colors duration-200 transform rounded-md focus:outline-none focus:ring focus:ring-opacity-80 bg-primary-medium hover:bg-primary-dark focus:ring-primary-light" + > + <div + class="w-5 h-5 mx-1" + > + <!-- Slot for icon (Default BanIcon) --> + + <svg + aria-hidden="true" + fill="none" + stroke="currentColor" + stroke-width="2" + viewBox="0 0 24 24" + xmlns="http://www.w3.org/2000/svg" + > + <path + d="M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636" + stroke-linecap="round" + stroke-linejoin="round" + /> + </svg> + + </div> + <span + class="mx-1" + > + hei + </span> + </button> + +</div> +`; diff --git a/tests/unit/component-tests/base-component-tests/__snapshots__/nav-bar.spec.js.snap b/tests/unit/component-tests/base-component-tests/__snapshots__/nav-bar.spec.js.snap new file mode 100644 index 0000000..f466c44 --- /dev/null +++ b/tests/unit/component-tests/base-component-tests/__snapshots__/nav-bar.spec.js.snap @@ -0,0 +1,77 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`NavBar component renders correctly 1`] = ` +<div + data-v-app="" +> + + <!-- NavBar --> + <nav + class="flex items-center bg-white justify-between h-10 md:h-14 border-1 border-b border-gray-300 border-solid sticky top-0 z-50" + > + <!-- Logo reroutes to homepage --> + <div + class="logo" + > + <img + alt="BoCo logo" + class="m-1 ml-4 cursor-pointer h-9 md:h-12" + src="" + /> + </div> + <ul + class="flex justify-between" + > + <!-- New listing button --> + <li + class="cursor-pointer" + > + <plus-icon-stub + alt="Legg til" + class="m-6 md:mr-2 h-7 text-primary-medium float-left" + /> + <a + class="hidden md:block mt-7 text-sm float-right" + > + Legg til + </a> + </li> + <!-- My messages button --> + <li + class="cursor-pointer" + > + <div + class="notification-container relative" + > + <chat-alt2-icon-stub + alt="Meldinger" + class="m-6 md:mr-2 h-7 text-primary-medium float-left" + /> + <!--v-if--> + <a + class="hidden md:block mt-7 text-sm float-right" + > + Meldinger + </a> + </div> + </li> + <!-- User profile button --> + <li + class="cursor-pointer" + > + <user-circle-icon-stub + alt="Profil" + class="m-6 md:mr-2 h-7 text-primary-medium float-left" + /> + <!-- Shows "Profil" if user is logged in, else "Logg inn" --> + <a + class="hidden md:block mr-4 mt-7 text-sm float-right" + > + Profil + </a> + </li> + </ul> + </nav> + +</div> +`; diff --git a/tests/unit/component-tests/base-component-tests/__snapshots__/notification-modal.spec.js.snap b/tests/unit/component-tests/base-component-tests/__snapshots__/notification-modal.spec.js.snap new file mode 100644 index 0000000..485fb4f --- /dev/null +++ b/tests/unit/component-tests/base-component-tests/__snapshots__/notification-modal.spec.js.snap @@ -0,0 +1,64 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`NotificationModal component renders correctly 1`] = ` +<div + data-v-app="" +> + + <!-- Main modal --> + <div + class="fixed grid place-items-center bg-gray-600 bg-opacity-50 top-0 left-0 right-0 z-50 w-full overflow-x-hidden overflow-y-auto inset-0 h-full" + > + <div + class="relative w-full h-full max-w-2xl p-4 md:h-auto" + > + <!-- Modal content --> + <div + class="relative bg-white rounded-lg shadow dark:bg-gray-700" + > + <!-- Modal header --> + <div + class="flex items-start justify-between p-4 border-b rounded-t dark:border-gray-600" + > + <h3 + class="text-xl font-semibold text-gray-900 dark:text-white" + > + String + </h3> + <!-- Close button --> + <button + class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white" + > + <svg + aria-hidden="true" + class="w-5 h-5" + fill="none" + stroke="currentColor" + stroke-width="2" + viewBox="0 0 24 24" + xmlns="http://www.w3.org/2000/svg" + > + <path + d="M6 18L18 6M6 6l12 12" + stroke-linecap="round" + stroke-linejoin="round" + /> + </svg> + </button> + </div> + <!-- Modal body --> + <div + class="p-6 space-y-6" + > + <p + class="text-base leading-relaxed text-gray-500 dark:text-gray-400" + > + String + </p> + </div> + </div> + </div> + </div> + +</div> +`; diff --git a/tests/unit/component-tests/base-component-tests/__snapshots__/pagination-template.spec.js.snap b/tests/unit/component-tests/base-component-tests/__snapshots__/pagination-template.spec.js.snap new file mode 100644 index 0000000..e4d76ee --- /dev/null +++ b/tests/unit/component-tests/base-component-tests/__snapshots__/pagination-template.spec.js.snap @@ -0,0 +1,12 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`PaginationTemplate renders correctly 1`] = ` +<div + data-v-app="" +> + + <!-- Pagination --> + <!--v-if--> + +</div> +`; diff --git a/tests/unit/component-tests/base-component-tests/__snapshots__/triple-dot-button.spec.js.snap b/tests/unit/component-tests/base-component-tests/__snapshots__/triple-dot-button.spec.js.snap new file mode 100644 index 0000000..710c50c --- /dev/null +++ b/tests/unit/component-tests/base-component-tests/__snapshots__/triple-dot-button.spec.js.snap @@ -0,0 +1,26 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`TripleDotButton component renders correctly 1`] = ` +<button + class="w-10 h-10 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg float-right text-sm p-1.5" + data-dropdown-toggle="dropdown" + id="dropdownDefault" + type="button" +> + <svg + aria-hidden="true" + class="w-6 h-6" + fill="none" + stroke="currentColor" + stroke-width="2" + viewBox="0 0 24 24" + xmlns="http://www.w3.org/2000/svg" + > + <path + d="M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z" + stroke-linecap="round" + stroke-linejoin="round" + /> + </svg> +</button> +`; diff --git a/tests/unit/component-tests/base-component-tests/color-button.spec.js b/tests/unit/component-tests/base-component-tests/color-button.spec.js index 2930050..90c7a43 100644 --- a/tests/unit/component-tests/base-component-tests/color-button.spec.js +++ b/tests/unit/component-tests/base-component-tests/color-button.spec.js @@ -13,6 +13,10 @@ describe("ColoredButtonComponent", () => { }); }); + it("renders correctly", () => { + expect(wrapper.element).toMatchSnapshot(); + }); + it("is instantiated", () => { expect(wrapper.exists()).toBeTruthy(); }); diff --git a/tests/unit/component-tests/base-component-tests/custom-footer-modal.spec.js b/tests/unit/component-tests/base-component-tests/custom-footer-modal.spec.js index 5afb8f9..4d4db91 100644 --- a/tests/unit/component-tests/base-component-tests/custom-footer-modal.spec.js +++ b/tests/unit/component-tests/base-component-tests/custom-footer-modal.spec.js @@ -18,6 +18,10 @@ describe("IconButtonComponent", () => { }); }); + it("renders correctly", () => { + expect(wrapper.element).toMatchSnapshot(); + }); + it("is instantiated", () => { expect(wrapper.exists()).toBeTruthy(); }); diff --git a/tests/unit/component-tests/base-component-tests/footer-bar.spec.js b/tests/unit/component-tests/base-component-tests/footer-bar.spec.js new file mode 100644 index 0000000..c50efb9 --- /dev/null +++ b/tests/unit/component-tests/base-component-tests/footer-bar.spec.js @@ -0,0 +1,18 @@ +import { mount } from "@vue/test-utils"; +import FooterBar from "@/components/BaseComponents/FooterBar.vue"; + +describe("FooterBar component", () => { + let wrapper; + + beforeEach(() => { + wrapper = mount(FooterBar); + }); + + it("renders correctly", () => { + expect(wrapper.element).toMatchSnapshot(); + }); + + it("is instantiated", () => { + expect(wrapper.exists()).toBeTruthy(); + }); +}); \ No newline at end of file diff --git a/tests/unit/component-tests/base-component-tests/form-image-display.spec.js b/tests/unit/component-tests/base-component-tests/form-image-display.spec.js new file mode 100644 index 0000000..3cb8f55 --- /dev/null +++ b/tests/unit/component-tests/base-component-tests/form-image-display.spec.js @@ -0,0 +1,23 @@ +import { mount } from "@vue/test-utils"; +import FormImageDisplay from "@/components/BaseComponents/FormImageDisplay.vue"; + +describe("FormImageDisplay component", () => { + let wrapper; + + beforeEach(() => { + wrapper = mount(FormImageDisplay, { + //passing prop to component + props: { + image: "http://localhost:3000/api/images/5" + }, + }); + }); + + it("renders correctly", () => { + expect(wrapper.element).toMatchSnapshot(); + }); + + it("is instantiated", () => { + expect(wrapper.exists()).toBeTruthy(); + }); +}); \ No newline at end of file diff --git a/tests/unit/component-tests/base-component-tests/icon-button.spec.js b/tests/unit/component-tests/base-component-tests/icon-button.spec.js index 376fb18..57b6f0f 100644 --- a/tests/unit/component-tests/base-component-tests/icon-button.spec.js +++ b/tests/unit/component-tests/base-component-tests/icon-button.spec.js @@ -13,6 +13,10 @@ describe("IconButtonComponent", () => { }); }); + it("renders correctly", () => { + expect(wrapper.element).toMatchSnapshot(); + }); + it("is instantiated", () => { expect(wrapper.exists()).toBeTruthy(); }); diff --git a/tests/unit/component-tests/base-component-tests/nav-bar.spec.js b/tests/unit/component-tests/base-component-tests/nav-bar.spec.js index c728013..9405075 100644 --- a/tests/unit/component-tests/base-component-tests/nav-bar.spec.js +++ b/tests/unit/component-tests/base-component-tests/nav-bar.spec.js @@ -16,6 +16,10 @@ describe("NavBar component", () => { }); }); + it("renders correctly", () => { + expect(wrapper.element).toMatchSnapshot(); + }); + it("is instantiated", () => { expect(wrapper.exists()).toBeTruthy(); }); diff --git a/tests/unit/component-tests/base-component-tests/notification-modal.spec.js b/tests/unit/component-tests/base-component-tests/notification-modal.spec.js index c005e4f..0fb2c91 100644 --- a/tests/unit/component-tests/base-component-tests/notification-modal.spec.js +++ b/tests/unit/component-tests/base-component-tests/notification-modal.spec.js @@ -15,6 +15,10 @@ describe("NotificationModal component", () => { }); }); + it("renders correctly", () => { + expect(wrapper.element).toMatchSnapshot(); + }); + it("is instantiated", () => { expect(wrapper.exists()).toBeTruthy(); }); diff --git a/tests/unit/component-tests/base-component-tests/pagination-template.spec.js b/tests/unit/component-tests/base-component-tests/pagination-template.spec.js index 91a7495..b727318 100644 --- a/tests/unit/component-tests/base-component-tests/pagination-template.spec.js +++ b/tests/unit/component-tests/base-component-tests/pagination-template.spec.js @@ -15,6 +15,10 @@ describe("PaginationTemplate", () => { }); }); + it("renders correctly", () => { + expect(wrapper.element).toMatchSnapshot(); + }); + it("is instantiated", () => { expect(wrapper.exists()).toBeTruthy(); }); diff --git a/tests/unit/component-tests/base-component-tests/triple-dot-button.spec.js b/tests/unit/component-tests/base-component-tests/triple-dot-button.spec.js new file mode 100644 index 0000000..f796516 --- /dev/null +++ b/tests/unit/component-tests/base-component-tests/triple-dot-button.spec.js @@ -0,0 +1,18 @@ +import { mount } from "@vue/test-utils"; +import TripleDotButton from "@/components/BaseComponents/TripleDotButton.vue"; + +describe("TripleDotButton component", () => { + let wrapper; + + beforeEach(() => { + wrapper = mount(TripleDotButton); + }); + + it("renders correctly", () => { + expect(wrapper.element).toMatchSnapshot(); + }); + + it("is instantiated", () => { + expect(wrapper.exists()).toBeTruthy(); + }); +}); \ No newline at end of file diff --git a/tests/unit/component-tests/community-component-tests/__snapshots__/community-header.spec.js.snap b/tests/unit/component-tests/community-component-tests/__snapshots__/community-header.spec.js.snap index 6389c54..77b8975 100644 --- a/tests/unit/component-tests/community-component-tests/__snapshots__/community-header.spec.js.snap +++ b/tests/unit/component-tests/community-component-tests/__snapshots__/community-header.spec.js.snap @@ -22,6 +22,8 @@ exports[`CommunityHeader component renders correctly 1`] = ` <div class="flex place-content-center mx-4" > + + <!-- PacMan for indicating loading --> <div class="loadingio-spinner-bean-eater-o5tefvffeqm" > @@ -40,6 +42,7 @@ exports[`CommunityHeader component renders correctly 1`] = ` </div> </div> </div> + </div> </div> diff --git a/tests/unit/component-tests/community-component-tests/__snapshots__/new-item-form.spec.js.snap b/tests/unit/component-tests/community-component-tests/__snapshots__/new-item-form.spec.js.snap index 1788f93..c72b816 100644 --- a/tests/unit/component-tests/community-component-tests/__snapshots__/new-item-form.spec.js.snap +++ b/tests/unit/component-tests/community-component-tests/__snapshots__/new-item-form.spec.js.snap @@ -219,11 +219,14 @@ exports[`NewItemForm component renders correctly 1`] = ` type="file" /> <!-- Opens file explorer --> + + <!-- Button with custom text and color --> <button class="flex items-center px-2 py-2 font-medium tracking-wide capitalize text-white transition-colors duration-200 transform rounded-md focus:outline-none focus:ring focus:ring-opacity-80 min-w-{20px} bg-primary-medium hover:bg-primary-dark focus:ring-primary-light" > Velg bilde </button> + <!-- Shows chosen images --> @@ -232,12 +235,15 @@ exports[`NewItemForm component renders correctly 1`] = ` <div class="float-right" > + + <!-- Button with custom text and color --> <button class="flex items-center px-2 py-2 font-medium tracking-wide capitalize text-white transition-colors duration-200 transform rounded-md focus:outline-none focus:ring focus:ring-opacity-80 min-w-{20px} bg-primary-medium hover:bg-primary-dark focus:ring-primary-light" id="saveButton" > Lagre </button> + </div> </div> diff --git a/tests/unit/component-tests/user-component-tests/__snapshots__/login-form.spec.js.snap b/tests/unit/component-tests/user-component-tests/__snapshots__/login-form.spec.js.snap index da0a65a..0c3c3c0 100644 --- a/tests/unit/component-tests/user-component-tests/__snapshots__/login-form.spec.js.snap +++ b/tests/unit/component-tests/user-component-tests/__snapshots__/login-form.spec.js.snap @@ -58,11 +58,14 @@ exports[`LoginForm component renders correctly 1`] = ` Glemt passord? </router-link> <!-- Button for logging in --> + + <!-- Button with custom text and color --> <button class="flex items-center px-2 py-2 font-medium tracking-wide capitalize text-white transition-colors duration-200 transform rounded-md focus:outline-none focus:ring focus:ring-opacity-80 min-w-{20px} bg-primary-medium hover:bg-primary-dark focus:ring-primary-light login" > Logg på </button> + </div> </div> </div> diff --git a/tests/unit/component-tests/user-component-tests/__snapshots__/new-password-form.spec.js.snap b/tests/unit/component-tests/user-component-tests/__snapshots__/new-password-form.spec.js.snap index a62255e..8d4a475 100644 --- a/tests/unit/component-tests/user-component-tests/__snapshots__/new-password-form.spec.js.snap +++ b/tests/unit/component-tests/user-component-tests/__snapshots__/new-password-form.spec.js.snap @@ -78,11 +78,14 @@ exports[`NewPasswordForm component renders correctly 1`] = ` class="mt-6" id="buttonsField" > + + <!-- Button with custom text and color --> <button class="flex items-center px-2 py-2 font-medium tracking-wide capitalize text-white transition-colors duration-200 transform rounded-md focus:outline-none focus:ring focus:ring-opacity-80 min-w-{20px} bg-primary-medium hover:bg-primary-dark focus:ring-primary-light float-right" > Sett ny passord </button> + </div> <!-- Message for user --> <div diff --git a/tests/unit/component-tests/user-component-tests/__snapshots__/register-user-component.spec.js.snap b/tests/unit/component-tests/user-component-tests/__snapshots__/register-user-component.spec.js.snap index af2bbf8..7ac9eff 100644 --- a/tests/unit/component-tests/user-component-tests/__snapshots__/register-user-component.spec.js.snap +++ b/tests/unit/component-tests/user-component-tests/__snapshots__/register-user-component.spec.js.snap @@ -99,11 +99,14 @@ exports[`RegisterFormComponent renders correctly 1`] = ` <div class="flex justify-end mt-6" > + + <!-- Button with custom text and color --> <button class="flex items-center px-2 py-2 font-medium tracking-wide capitalize text-white transition-colors duration-200 transform rounded-md focus:outline-none focus:ring focus:ring-opacity-80 min-w-{20px} bg-primary-medium hover:bg-primary-dark focus:ring-primary-light" > Opprett </button> + </div> </form> </div> diff --git a/tests/unit/component-tests/user-component-tests/__snapshots__/reset-password-form.spec.js.snap b/tests/unit/component-tests/user-component-tests/__snapshots__/reset-password-form.spec.js.snap index 40a038a..417f797 100644 --- a/tests/unit/component-tests/user-component-tests/__snapshots__/reset-password-form.spec.js.snap +++ b/tests/unit/component-tests/user-component-tests/__snapshots__/reset-password-form.spec.js.snap @@ -33,11 +33,14 @@ exports[`ResetPasswordForm component renders correctly 1`] = ` </div> + + <!-- Button with custom text and color --> <button class="flex items-center px-2 py-2 font-medium tracking-wide capitalize text-white transition-colors duration-200 transform rounded-md focus:outline-none focus:ring focus:ring-opacity-80 min-w-{20px} bg-primary-medium hover:bg-primary-dark focus:ring-primary-light float-right" > Tilbakestill passord </button> + </div> </div> `; diff --git a/tests/unit/component-tests/user-component-tests/__snapshots__/user-items.spec.js.snap b/tests/unit/component-tests/user-component-tests/__snapshots__/user-items.spec.js.snap index 6a73973..6144f61 100644 --- a/tests/unit/component-tests/user-component-tests/__snapshots__/user-items.spec.js.snap +++ b/tests/unit/component-tests/user-component-tests/__snapshots__/user-items.spec.js.snap @@ -69,17 +69,23 @@ exports[`UserItems component renders correctly 1`] = ` <div class="flex justify-center" > + + <!-- Pagination --> <div class="mt-10" > + <!-- Prev button --> <!--v-if--> + <!-- Current page --> <label class="mx-2 text-primary-light" > 1 av 1 </label> + <!-- Next button --> <!--v-if--> </div> + </div> </div> -- GitLab