mocks fixed

This commit is contained in:
Drew Ansbacher
2021-09-01 10:47:24 -06:00
committed by Aiden McClelland
parent 007d9d9d09
commit aef1569e56
2 changed files with 5 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ import { PatchDbService } from 'src/app/services/patch-db/patch-db.service'
import { PackageDataEntry, PackageState } from 'src/app/services/patch-db/data-model'
import { Subscription } from 'rxjs'
import { PkgStatusRendering, renderPkgStatus } from 'src/app/services/pkg-status-rendering.service'
import { delay, filter } from 'rxjs/operators'
import { filter } from 'rxjs/operators'
@Component({
selector: 'app-list',

View File

@@ -348,12 +348,11 @@ export class MockApiService extends ApiService {
unpacked: 0,
'unpack-complete': false,
}
const installedMock = Mock.Pkgs[params.id]
delete installedMock.installed
const pkg: PackageDataEntry = {
...installedMock,
...Mock.Pkgs[params.id],
state: PackageState.Installing,
'install-progress': initialProgress,
installed: undefined,
}
const patch = [
{
@@ -560,8 +559,8 @@ export class MockApiService extends ApiService {
const patch = [
{
op: PatchOp.REPLACE,
path: `/package-data/${id}/state`,
value: PackageState.Installed,
path: `/package-data/${id}`,
value: Mock.Pkgs[id],
},
]
this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })