mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +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:
parent
1b760d83a9
commit
67aca9ccf6
@ -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);
|
||||
|
@ -557,7 +557,7 @@ export class BillingPage extends Disposable {
|
||||
testId('company-address-country')
|
||||
)
|
||||
) : null,
|
||||
] : 'Fetching address...'
|
||||
] : css.billingHintText('Fetching address...')
|
||||
);
|
||||
}
|
||||
|
||||
@ -568,7 +568,7 @@ export class BillingPage extends Disposable {
|
||||
css.summaryHeader(
|
||||
css.billingBoldText(`Payment Card`),
|
||||
),
|
||||
'Fetching card preview...'
|
||||
css.billingHintText('Fetching card preview...')
|
||||
);
|
||||
} else if (card) {
|
||||
// There is a card attached to the account.
|
||||
|
Loading…
Reference in New Issue
Block a user