add unit test for YMMNotfFoundWidget
This commit is contained in:
parent
1cb0ee4119
commit
8bbacb66c6
1 changed files with 21 additions and 0 deletions
|
|
@ -211,6 +211,27 @@ describe('Bailout page', () => {
|
|||
// Assert
|
||||
expect(name).toBe(expected);
|
||||
});
|
||||
test('returns YMMNotFound widget name when bailout code is BailoutCode.YMMNotFound', () => {
|
||||
// Arrange
|
||||
const mainInitialState = {
|
||||
applicationUser: {
|
||||
pageData: {
|
||||
'bailout-page': {
|
||||
bailoutCode: bailoutCode.YMMNotFound
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
const initialData = { };
|
||||
const { wrapper } = getMountedComponent(mainInitialState, initialData);
|
||||
const expected = 'YMMNotFoundWidget';
|
||||
|
||||
// Act
|
||||
const name = wrapper.vm.subHeaderCmsWidgetName;
|
||||
|
||||
// Assert
|
||||
expect(name).toBe(expected);
|
||||
});
|
||||
test('returns default widget name when bailoutCode does not match any other content bailout codes', () => {
|
||||
// Arrange
|
||||
const mainInitialState = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue