updated tests
This commit is contained in:
parent
ad4ec7209c
commit
07b6493bda
1 changed files with 11 additions and 6 deletions
|
|
@ -156,9 +156,16 @@ function getMountedComponent(mainInitialState = {}, initialData = {}, methodToRu
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('OrderConfirmation.vue', () => {
|
describe('OrderConfirmation.vue', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
window.sessionStorage.clear();
|
||||||
|
});
|
||||||
|
afterEach(() => {
|
||||||
|
window.sessionStorage.removeItem('submittedOrder');
|
||||||
|
});
|
||||||
describe('Rendering', () => {
|
describe('Rendering', () => {
|
||||||
test('Should render Site Header', () => {
|
test('Should render Site Header', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
|
window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage));
|
||||||
const { wrapper } = getMountedComponent(initialStore);
|
const { wrapper } = getMountedComponent(initialStore);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
@ -169,6 +176,7 @@ describe('OrderConfirmation.vue', () => {
|
||||||
});
|
});
|
||||||
test('Should render Vehicle Banner', () => {
|
test('Should render Vehicle Banner', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
|
window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage));
|
||||||
const { wrapper } = getMountedComponent(initialStore);
|
const { wrapper } = getMountedComponent(initialStore);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
@ -179,6 +187,7 @@ describe('OrderConfirmation.vue', () => {
|
||||||
});
|
});
|
||||||
test('If Advanced flow, should display Site Footer', () => {
|
test('If Advanced flow, should display Site Footer', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
|
window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage));
|
||||||
const testStore = {
|
const testStore = {
|
||||||
order: {
|
order: {
|
||||||
schedule: {
|
schedule: {
|
||||||
|
|
@ -203,6 +212,7 @@ describe('OrderConfirmation.vue', () => {
|
||||||
});
|
});
|
||||||
test('If Essential flow, should not display Site Footer', () => {
|
test('If Essential flow, should not display Site Footer', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
|
window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage));
|
||||||
const { wrapper } = getMountedComponent(initialStore);
|
const { wrapper } = getMountedComponent(initialStore);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
@ -215,6 +225,7 @@ describe('OrderConfirmation.vue', () => {
|
||||||
describe('Navigation', () => {
|
describe('Navigation', () => {
|
||||||
test('If Advanced flow, forward button action navigates to carrier URL', () => {
|
test('If Advanced flow, forward button action navigates to carrier URL', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
|
window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage));
|
||||||
const carrierReturnUrl = 'testURL';
|
const carrierReturnUrl = 'testURL';
|
||||||
const testStore = {
|
const testStore = {
|
||||||
order: {
|
order: {
|
||||||
|
|
@ -240,12 +251,6 @@ describe('OrderConfirmation.vue', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe('Computed properties', () => {
|
describe('Computed properties', () => {
|
||||||
beforeEach(() => {
|
|
||||||
window.sessionStorage.clear();
|
|
||||||
});
|
|
||||||
afterEach(() => {
|
|
||||||
window.sessionStorage.removeItem('submittedOrder');
|
|
||||||
});
|
|
||||||
test('appointmentDateFormatted should return date in expected format', () => {
|
test('appointmentDateFormatted should return date in expected format', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage));
|
window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue