mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(editor): Update to personalization survey v4 (#5474)
* feat(editor): update to personalization survey v4 * refactor: rename role other key for consistency * feat: add reported source to survey * test: add unit tests for personalization modal
This commit is contained in:
17
packages/editor-ui/src/__tests__/utils.ts
Normal file
17
packages/editor-ui/src/__tests__/utils.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export const retry = (assertion: () => any, { interval = 20, timeout = 200 } = {}) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const startTime = Date.now();
|
||||
|
||||
const tryAgain = () => {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
resolve(assertion());
|
||||
} catch (err) {
|
||||
Date.now() - startTime > timeout ? reject(err) : tryAgain();
|
||||
}
|
||||
}, interval);
|
||||
};
|
||||
|
||||
tryAgain();
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user