chore: additional stylistic fixes
This commit is contained in:
parent
f41edcb756
commit
e9c16cad10
1 changed files with 37 additions and 36 deletions
|
@ -16,7 +16,8 @@ function onClickFollow(event) {
|
|||
* wait for element to appear
|
||||
* @param {string} selector
|
||||
* @param {number} timeout
|
||||
* @see {@link https://github.com/storybookjs/test-runner/blob/6d41927154e8dd1e4c9e7493122e24e2739a7a0f/src/setup-page.ts#L134} from which this was adapted
|
||||
* @see {@link https://github.com/storybookjs/test-runner/blob/6d41927154e8dd1e4c9e7493122e24e2739a7a0f/src/setup-page.ts#L134}
|
||||
* from which this was adapted
|
||||
*/
|
||||
function waitForElement(selector, timeout) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
@ -35,7 +36,7 @@ function waitForElement(selector, timeout) {
|
|||
resolve(element);
|
||||
observer.disconnect();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
observer.observe(document.body, {
|
||||
childList: true,
|
||||
|
@ -45,7 +46,7 @@ function waitForElement(selector, timeout) {
|
|||
window.setTimeout(() => {
|
||||
reject();
|
||||
}, timeout);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue