mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Fix several flaky tests.
Summary: - Fix flaky SamplesWS test, which was occasionally clicking a disabled button - Increase timeout on backupSqliteDatabase test, which sometimes times out - Fix a little flakiness in ExportSection test. - Fix flaky Billing test by adjusting behavior slightly. In Billing, when re-fetching subscription (e.g. on navigating back), we now unset it while the fetch is pending, so that billing pages show a spinner or "Fetching..." messages. This also gives tests something to wait for. Also adjusts Billing styles on the "Fetching..." messages to make them look different from regular text. Test Plan: Mainly making exising tests more robust. Billing changes exercised by existing tests. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2920
This commit is contained in:
@@ -239,6 +239,9 @@ export class BillingModelImpl extends Disposable implements BillingModel {
|
||||
private async _fetchSubscription(forceReload: boolean = false): Promise<void> {
|
||||
if (forceReload || this.subscription.get() === undefined) {
|
||||
try {
|
||||
// Unset while fetching for forceReload, so that the user (and tests) can tell that a
|
||||
// fetch is pending.
|
||||
this.subscription.set(undefined);
|
||||
const sub = await this._billingAPI.getSubscription();
|
||||
bundleChanges(() => {
|
||||
this.plans.set(sub.plans);
|
||||
|
||||
Reference in New Issue
Block a user