mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) TypeTransform race condition fix
Summary: TypeTransformation was flaky. Probably after upgrading AceEditor we introduced a race condition between updating the revised formula and doing the transformation. Now we explicitly make sure that the formula is updated. I also fixed some other flaky tests. Test Plan: Updated Reviewers: paulfitz Reviewed By: paulfitz Subscribers: paulfitz Differential Revision: https://phab.getgrist.com/D3984
This commit is contained in:
@@ -42,6 +42,7 @@ describe("GridOptions.ntest", function() {
|
||||
await gu.supportOldTimeyTestCode();
|
||||
await gu.useFixtureDoc(cleanup, "World-v10.grist", true);
|
||||
await $('.test-gristdoc').wait();
|
||||
await gu.hideBanners();
|
||||
});
|
||||
|
||||
beforeEach(async function() {
|
||||
@@ -109,6 +110,7 @@ describe("GridOptions.ntest", function() {
|
||||
await driver.navigate().refresh();
|
||||
//await $.injectIntoPage();
|
||||
await gu.waitForDocToLoad();
|
||||
await gu.hideBanners();
|
||||
await assertHVZ(0, true, true, true); // all on
|
||||
await assertHVZ(1, false, false, false); // all off
|
||||
await assertHVZ(2, false, true, true); // -h +v +z
|
||||
|
||||
@@ -976,6 +976,14 @@ export async function confirm(save = true, remember = false) {
|
||||
}
|
||||
}
|
||||
|
||||
/** Hides all top banners by injecting css style */
|
||||
export async function hideBanners() {
|
||||
const style = `.test-banner-element { display: none !important; }`;
|
||||
await driver.executeScript(`const style = document.createElement('style');
|
||||
style.innerHTML = ${JSON.stringify(style)};
|
||||
document.head.appendChild(style);`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the left-panel item for the given page, given by a full string name, or a RegExp.
|
||||
* You may simply click it to switch to that page.
|
||||
@@ -1582,10 +1590,11 @@ export async function sendKeys(...keys: string[]) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears active input by sending HOME + SHIFT END + DELETE.
|
||||
* Clears active input/textarea by sending CTRL HOME + CTRL + SHIFT END + DELETE.
|
||||
*/
|
||||
export async function clearInput() {
|
||||
return sendKeys(Key.HOME, Key.chord(Key.SHIFT, Key.END), Key.DELETE);
|
||||
const ctrl = await modKey();
|
||||
return sendKeys(Key.chord(ctrl, Key.HOME), Key.chord(ctrl, Key.SHIFT, Key.END), Key.DELETE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user