Browse Source

test: remove repeated test

pull/6018/head
danstarns 1 year ago
parent
commit
e01d4af64e
  1. 30
      test/specs/data_sources/model/StyleDataVariable.ts

30
test/specs/data_sources/model/StyleDataVariable.ts

@ -118,36 +118,6 @@ describe('StyleDataVariable', () => {
expect(updatedStyle).toHaveProperty('color', 'black');
});
test('component updates on style change', () => {
const styleDataSource: DataSourceProps = {
id: 'colors-data',
records: [{ id: 'id1', color: 'red' }],
};
dsm.add(styleDataSource);
const cmp = cmpRoot.append({
tagName: 'h1',
type: 'text',
content: 'Hello World',
style: {
color: {
type: DataVariableType,
defaultValue: 'black',
path: 'colors-data.id1.color',
},
},
})[0];
const style = cmp.getStyle();
expect(style).toHaveProperty('color', 'red');
const colorsDatasource = dsm.get('colors-data');
colorsDatasource.getRecord('id1')?.set({ color: 'blue' });
const updatedStyle = cmp.getStyle();
expect(updatedStyle).toHaveProperty('color', 'blue');
});
test("should use default value if data source doesn't exist", () => {
const cmp = cmpRoot.append({
tagName: 'h1',

Loading…
Cancel
Save