skipping some tests for functionality that was removed but will be added back in on SSR-405. Card was noted.

This commit is contained in:
Jason Wheeler 2023-04-19 15:50:07 -04:00
parent 58194f58e1
commit 4fd87e545a
2 changed files with 15 additions and 12 deletions

View file

@ -1,8 +1,8 @@
import { mount } from "@vue/test-utils"
import servicePackageRadio from "./service-package-radio"
import providerPrefRadio from "./provider-pref-radio"
import inputButtonWrapperMixin from "@/mixins/input-button-wrapper-mixin"
describe("service-package-radio.vue", () => {
describe.skip("provider-pref-radio.vue", () => {
it("Should include buttonLabel in html", async () => {
// Arrange
let { wrapper } = setupMocks({
@ -13,7 +13,7 @@ describe("service-package-radio.vue", () => {
// Act
const outputHtml = wrapper.html()
console.log(outputHtml);
// Assert
expect(outputHtml).toEqual(expect.stringContaining(mockProps["buttonLabel"]))
})
@ -118,7 +118,7 @@ const mockProps = {
}
function setupMocks({ mountOptionsMockData = {} }) {
const wrapper = mount(servicePackageRadio, {
const wrapper = mount(providerPrefRadio, {
...mountOptionsMockData,
mixins: [inputButtonWrapperMixin]
})

View file

@ -75,9 +75,9 @@ const ProviderPreferenceMockData = {
}
}
if (cmsWidgetName === 'StateSpecificSteeringText') {
if (cmsWidgetName === 'StateSteeringModal') {
if (fieldName === 'BodyText') {
return "{if:custom:OH}ohioText{else}{if:custom:CA}cali's Text{end}{end}";
return "{if:custom:OH}ohioText{end}{if:custom:CA}cali's Text{end}";
}
}
@ -135,24 +135,25 @@ describe('provider-preference.vue', () => {
const { wrapper } = setupMocks();
useMainStore().order.customer.address.state = "ca";
let actual = wrapper.vm.steeringModalHeader;
let actual = wrapper.vm.steeringModalBody;
expect(actual).toBe("cali's Text");
useMainStore().order.customer.address.state = "oH";
actual = wrapper.vm.steeringModalHeader;
actual = wrapper.vm.steeringModalBody;
expect(actual).toBe("ohioText");
});
test('"Continue" button is disabled when no Shop Location is selected.', () => {
test.skip('"Continue" button is disabled when no Shop Location is selected.', () => {
const { wrapper } = setupMocks();
const continueButton = wrapper.get('[data-test-id="site-footer-main-button"]');
expect(continueButton.attributes()['aria-disabled']).toBe('true');
});
test('"Continue" button is enabled after a Shop Location is selected.', async () => {
test.skip('"Continue" button is enabled after a Shop Location is selected.', async () => {
const { wrapper } = setupMocks();
const ProviderPreferenceWrapper = wrapper.findComponent({ name: 'provider-preference' });
@ -167,7 +168,9 @@ describe('provider-preference.vue', () => {
const continueButton = wrapper.get('[data-test-id="site-footer-main-button"]');
expect(continueButton.attributes()['aria-disabled']).toBe('false');
});
test('Select "Schedule with Safelite" then click "Continue". Navigates to "service-location" page.', async () => {
test.skip('Select "Schedule with Safelite" then click "Continue". Navigates to "service-location" page.', async () => {
const { mockRoute, mockRouter, wrapper } = setupMocks();
const ProviderPreferenceWrapper = wrapper.findComponent({ name: 'provider-preference' });
@ -190,7 +193,7 @@ describe('provider-preference.vue', () => {
*/
});
test('Click the back button, trigger navigate function from Vue Router with CLICKED_BACK parameter.', async () => {
test.skip('Click the back button, trigger navigate function from Vue Router with CLICKED_BACK parameter.', async () => {
const { mockRoute, mockRouter, wrapper } = setupMocks();
await wrapper.get('[data-test-id="site-footer-back-button"]').trigger('click');