mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) updates from grist-core
This commit is contained in:
BIN
test/fixtures/docs/SelectBySummary.grist
vendored
BIN
test/fixtures/docs/SelectBySummary.grist
vendored
Binary file not shown.
@@ -391,6 +391,7 @@ describe('Dates.ntest', function() {
|
||||
await gu.clickCellRC(0, 1);
|
||||
await gu.sendKeys([$.ALT, '=']);
|
||||
await gu.waitForServer();
|
||||
await gu.waitAppFocus(false);
|
||||
await gu.sendKeys("Diff", $.ENTER);
|
||||
await gu.waitForServer();
|
||||
await gu.sendKeys('=');
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as gu from 'test/nbrowser/gristUtils';
|
||||
import {server, setupTestSuite} from 'test/nbrowser/testUtils';
|
||||
|
||||
describe('SelectByRefList', function() {
|
||||
this.timeout(60000);
|
||||
this.timeout(80000);
|
||||
setupTestSuite();
|
||||
addToRepl('gu2', gu);
|
||||
gu.bigScreen();
|
||||
|
||||
@@ -130,11 +130,6 @@ describe('SelectionSummary', function () {
|
||||
count: 2,
|
||||
sum: null,
|
||||
});
|
||||
await selectAndAssert({col: 2, row: 0}, {col: 3, row: 5}, {
|
||||
dimensions: '6⨯2',
|
||||
count: 11,
|
||||
sum: null,
|
||||
});
|
||||
|
||||
// Scroll horizontally to the end of the table.
|
||||
await gu.sendKeys(Key.END);
|
||||
@@ -151,6 +146,15 @@ describe('SelectionSummary', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('does not count false values', async function () {
|
||||
// False values in boolean columns should not be included in count
|
||||
await selectAndAssert({col: 2, row: 0}, {col: 3, row: 5}, {
|
||||
dimensions: '6⨯2',
|
||||
count: 9,
|
||||
sum: null,
|
||||
});
|
||||
});
|
||||
|
||||
it('uses the show column of reference columns for computations', async function () {
|
||||
// Column 6 is a Reference column pointing to column 0.
|
||||
await gu.sendKeys(Key.HOME);
|
||||
|
||||
@@ -16,7 +16,6 @@ describe('WebhookOverflow', function () {
|
||||
|
||||
before(async function () {
|
||||
oldEnv = new EnvironmentSnapshot();
|
||||
//host = new URL(server.getHost()).host;
|
||||
process.env.ALLOWED_WEBHOOK_DOMAINS = '*';
|
||||
process.env.GRIST_MAX_QUEUE_SIZE = '2';
|
||||
await server.restart();
|
||||
@@ -50,45 +49,31 @@ describe('WebhookOverflow', function () {
|
||||
await driver.sendKeys(...keys);
|
||||
}
|
||||
|
||||
it('should show a message when overflown', async function () {
|
||||
it('should show a message when overflowed', async function () {
|
||||
await gu.openPage('Table2');
|
||||
await gu.getCell('A', 1).click();
|
||||
await gu.enterCell('123');
|
||||
await gu.getCell('B', 1).click();
|
||||
await enterCellWithoutWaitingOnServer('124');
|
||||
const toast = await driver.wait(() => gu.getToasts(), 10000);
|
||||
assert.include(toast, 'New changes are temporarily suspended. Webhooks queue overflowed.' +
|
||||
' Please check webhooks settings, remove invalid webhooks, and clean the queue.\ngo to webhook settings');
|
||||
await gu.waitToPass(async () => {
|
||||
const toast = await gu.getToasts();
|
||||
assert.include(toast, 'New changes are temporarily suspended. Webhooks queue overflowed.' +
|
||||
' Please check webhooks settings, remove invalid webhooks, and clean the queue.\ngo to webhook settings');
|
||||
}, 4000);
|
||||
});
|
||||
|
||||
it('message should disappear after clearing queue', async function () {
|
||||
await openWebhookPageWithoutWaitForServer();
|
||||
await driver.findContent('button', /Clear Queue/).click();
|
||||
await gu.waitForServer();
|
||||
await waitForOverflownMessageToDisappear();
|
||||
const toast = await driver.wait(() => gu.getToasts());
|
||||
assert.notInclude(toast, 'New changes are temporarily suspended. Webhooks queue overflowed.' +
|
||||
' Please check webhooks settings, remove invalid webhooks, and clean the queue.\ngo to webhook settings');
|
||||
await gu.waitToPass(async () => {
|
||||
const toast = await gu.getToasts();
|
||||
assert.notInclude(toast, 'New changes are temporarily suspended. Webhooks queue overflowed.' +
|
||||
' Please check webhooks settings, remove invalid webhooks, and clean the queue.\ngo to webhook settings');
|
||||
}, 12500);
|
||||
});
|
||||
});
|
||||
|
||||
async function waitForOverflownMessageToDisappear(maxWait = 12500) {
|
||||
await driver.wait(async () => {
|
||||
try {
|
||||
for (;;) {
|
||||
const toasts = await gu.getToasts();
|
||||
const filteredToasts = toasts.find(t => t=='New changes are temporarily suspended. Webhooks queue overflowed.' +
|
||||
' Please check webhooks settings, remove invalid webhooks, and clean the queue.\ngo to webhook settings');
|
||||
if (!filteredToasts) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}, maxWait, 'Overflown message did not disappear');
|
||||
}
|
||||
|
||||
async function openWebhookPageWithoutWaitForServer() {
|
||||
await openDocumentSettings();
|
||||
const button = await driver.findContentWait('a', /Manage Webhooks/, 3000);
|
||||
|
||||
Reference in New Issue
Block a user