(core) passing language as a query parameter to custom widgets

Summary: to allow custom widget having optional translations, lagunage seeted in user profile is passed as query parameter to custom widget

Test Plan: test added to check if query parameter is existing in url when settings is changed in profile

Reviewers: georgegevoian

Reviewed By: georgegevoian

Subscribers: jarek, paulfitz

Differential Revision: https://phab.getgrist.com/D4045
This commit is contained in:
Jakub Serafin
2023-10-02 15:57:20 +02:00
parent fbae81648c
commit 498ad07d38
4 changed files with 521 additions and 426 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -859,6 +859,19 @@ export async function importUrlDialog(url: string): Promise<void> {
await driver.switchTo().defaultContent();
}
/**
* Executed passed function in the context of given iframe, and then switching back to original context
*
*/
export async function doInIframe<T>(iframe: WebElement, func: () => Promise<T>) {
try {
await driver.switchTo().frame(iframe);
return await func();
} finally {
await driver.switchTo().defaultContent();
}
}
/**
* Starts or resets the collections of UserActions. This should be followed some time later by
* a call to userActionsVerify() to check which UserActions were sent to the server. If the