diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a9f0e705d..a358168d4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -76,4 +76,5 @@ stages: deployFolder: '' region: us-east-1 appDeployVariables: - __VUE_APP_CONSUMER_API_GATEWAY__: $(__VUE_APP_CONSUMER_API_GATEWAY__) \ No newline at end of file + __VUE_APP_CONSUMER_API_GATEWAY__: $(__VUE_APP_CONSUMER_API_GATEWAY__) + cfDistributionId: $(cfDistributionId) \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index e36f1a70d..720237d10 100644 --- a/jest.config.js +++ b/jest.config.js @@ -16,7 +16,7 @@ module.exports = { testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"], coverageThreshold: { global: { - statements: 70, + statements: 85, }, }, }; diff --git a/src/common-components/button-back/button-back.spec.js b/src/common-components/button-back/button-back.spec.js new file mode 100644 index 000000000..b8bc3256d --- /dev/null +++ b/src/common-components/button-back/button-back.spec.js @@ -0,0 +1,23 @@ +import { shallowMount } from "@vue/test-utils"; +import buttonBack from "./button-back"; + +describe("back button", () => { + + test("renders a button", () => { + // Arrange + const myFunction = () => {}; + + // Act + const wrapper = shallowMount(buttonBack, { + propsData: { + backButtonAction: myFunction, + backButtonAccessibleText: "something", + }, + }); + + // Assert + expect(wrapper.find("button").exists()).toBe(true); + wrapper.unmount(); + }); + +}); diff --git a/src/ux-components/button-back/button-back.vue b/src/common-components/button-back/button-back.vue similarity index 64% rename from src/ux-components/button-back/button-back.vue rename to src/common-components/button-back/button-back.vue index aa462accc..23d5dd2f8 100644 --- a/src/ux-components/button-back/button-back.vue +++ b/src/common-components/button-back/button-back.vue @@ -1,5 +1,9 @@