Refactor views to support dynamic updates.

This commit is contained in:
Dermot Duffy
2024-07-26 19:15:38 -07:00
parent 33dee47205
commit d5c4e56c45
80 changed files with 3714 additions and 4021 deletions
@@ -1,6 +1,7 @@
import { expect, it } from 'vitest';
import { SubstreamOnAction } from '../../../../src/card-controller/actions/actions/substream-on';
import { createCardAPI } from '../../../test-utils';
import { SubstreamOnViewModifier } from '../../../../src/card-controller/view/modifiers/substream-on';
it('should handle live_substream_on action', async () => {
const api = createCardAPI();
@@ -14,5 +15,7 @@ it('should handle live_substream_on action', async () => {
await action.execute(api);
expect(api.getViewManager().setViewWithSubstream).toBeCalledWith();
expect(api.getViewManager().setViewByParameters).toBeCalledWith({
modifiers: [expect.any(SubstreamOnViewModifier)],
});
});