mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Adding testId to the widget iframe once it receives the ready message
Summary: Iframe with custom widget is marked with a test class `test-custom-widget-ready` when it receives the `ready` message from the rendered widget. Test Plan: Added and updated. Existing test should pass. Reviewers: georgegevoian Reviewed By: georgegevoian Subscribers: georgegevoian Differential Revision: https://phab.getgrist.com/D4023
This commit is contained in:
9
app/client/lib/domUtils.ts
Normal file
9
app/client/lib/domUtils.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import {BindableValue, dom} from 'grainjs';
|
||||
|
||||
/**
|
||||
* Version of makeTestId that can be appended conditionally.
|
||||
* TODO: update grainjs typings, as this is already supported there.
|
||||
*/
|
||||
export function makeTestId(prefix: string) {
|
||||
return (id: string, obs?: BindableValue<boolean>) => dom.cls(prefix + id, obs ?? true);
|
||||
}
|
||||
Reference in New Issue
Block a user