feat: Add flat design for widget (#4065)

This commit is contained in:
Pranav Raj S 2022-02-25 16:18:18 +05:30 committed by GitHub
parent dcecbf4b80
commit 6c94768bdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 251 additions and 109 deletions

View file

@ -0,0 +1,38 @@
import {
getBubbleView,
getWidgetStyle,
isExpandedView,
isFlatWidgetStyle,
} from '../settingsHelper';
describe('#getBubbleView', () => {
it('returns correct view', () => {
expect(getBubbleView('')).toEqual('standard');
expect(getBubbleView('standard')).toEqual('standard');
expect(getBubbleView('expanded_bubble')).toEqual('expanded_bubble');
});
});
describe('#isExpandedView', () => {
it('returns true if it is expanded view', () => {
expect(isExpandedView('')).toEqual(false);
expect(isExpandedView('standard')).toEqual(false);
expect(isExpandedView('expanded_bubble')).toEqual(true);
});
});
describe('#getWidgetStyle', () => {
it('returns correct view', () => {
expect(getWidgetStyle('')).toEqual('standard');
expect(getWidgetStyle('standard')).toEqual('standard');
expect(getWidgetStyle('flat')).toEqual('flat');
});
});
describe('#isFlatWidgetStyle', () => {
it('returns true if it is expanded view', () => {
expect(isFlatWidgetStyle('')).toEqual(false);
expect(isFlatWidgetStyle('standard')).toEqual(false);
expect(isFlatWidgetStyle('flat')).toEqual(true);
});
});