mirror of
https://github.com/nasa/openmct.git
synced 2025-05-15 15:02:51 +00:00
fix test flake: calculate persisted time last (#5923)
* fix: calculate persisted time last
This commit is contained in:
parent
393cb9767f
commit
e8ee5b3fc9
@ -377,12 +377,14 @@ export default class ObjectAPI {
|
|||||||
this.#mutate(domainObject, 'modifiedBy', username);
|
this.#mutate(domainObject, 'modifiedBy', username);
|
||||||
|
|
||||||
if (isNewObject) {
|
if (isNewObject) {
|
||||||
const persistedTime = Date.now();
|
|
||||||
|
|
||||||
this.#mutate(domainObject, 'persisted', persistedTime);
|
|
||||||
this.#mutate(domainObject, 'created', persistedTime);
|
|
||||||
this.#mutate(domainObject, 'createdBy', username);
|
this.#mutate(domainObject, 'createdBy', username);
|
||||||
|
|
||||||
|
const createdTime = Date.now();
|
||||||
|
this.#mutate(domainObject, 'created', createdTime);
|
||||||
|
|
||||||
|
const persistedTime = Date.now();
|
||||||
|
this.#mutate(domainObject, 'persisted', persistedTime);
|
||||||
|
|
||||||
savedObjectPromise = provider.create(domainObject);
|
savedObjectPromise = provider.create(domainObject);
|
||||||
} else {
|
} else {
|
||||||
const persistedTime = Date.now();
|
const persistedTime = Date.now();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user