Skip to content

Commit 066b140

Browse files
widgets: fix unit tests
1 parent 42c5321 commit 066b140

1 file changed

Lines changed: 2 additions & 40 deletions

File tree

frontend/src/app/components/dashboard/db-table-view/db-table-widgets/db-table-widgets.component.spec.ts

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ describe('DbTableWidgetsComponent', () => {
158158
},
159159
{
160160
field_name: '',
161-
widget_type: '',
162-
widget_params: '',
161+
widget_type: 'Default',
162+
widget_params: '// No settings required',
163163
name: '',
164164
description: ''
165165
}
@@ -173,44 +173,6 @@ describe('DbTableWidgetsComponent', () => {
173173
expect(component.fields).toEqual(['user_id', 'last_name', 'email']);
174174
});
175175

176-
it('should set empty string in widget_type if widget does not need another appearance', () => {
177-
component.widgets = [
178-
{
179-
field_name: 'user_id',
180-
widget_type: 'textarea',
181-
widget_params: '',
182-
name: '',
183-
description: ''
184-
},
185-
{
186-
field_name: 'user_name',
187-
widget_type: 'Default',
188-
widget_params: '// No settings required',
189-
name: 'name',
190-
description: ''
191-
}
192-
];
193-
194-
component.widgetTypeChange('user_name');
195-
196-
expect(component.widgets).toEqual([
197-
{
198-
field_name: 'user_id',
199-
widget_type: 'textarea',
200-
widget_params: '',
201-
name: '',
202-
description: ''
203-
},
204-
{
205-
field_name: 'user_name',
206-
widget_type: '',
207-
widget_params: '// No settings required',
208-
name: 'name',
209-
description: ''
210-
}
211-
])
212-
});
213-
214176
xit('should open dialog to confirm deletion of widget', () => {
215177
component.fields = ['user_age'];
216178
component.widgets = [

0 commit comments

Comments
 (0)