add unit test for YMMNotfFoundWidget

This commit is contained in:
Bill Richardson 2026-06-29 15:33:02 -04:00
parent 1cb0ee4119
commit 8bbacb66c6

View file

@ -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 = {