UI: Fix flaky time-related tests (#19521)

This commit is contained in:
Chelsea Shaw
2023-03-22 13:19:11 -05:00
committed by GitHub
parent 3dbe94678f
commit bf2f1a88d6
65 changed files with 643 additions and 525 deletions

View File

@@ -11,7 +11,7 @@ import { task } from 'ember-concurrency';
import { waitFor } from '@ember/test-waiters';
import { add } from 'date-fns';
import errorMessage from 'vault/utils/error-message';
import timestamp from 'vault/utils/timestamp';
/**
* @module Credentials
* CredentialsPage component is a child component to show the generate and view
@@ -33,7 +33,7 @@ export default class CredentialsPageComponent extends Component {
@tracked credentials;
get leaseExpiry() {
return add(new Date(), { seconds: this.credentials.lease_duration });
return add(timestamp.now(), { seconds: this.credentials.lease_duration });
}
@action