@hot-updater/test-utils 1.2.0-rc.24 → 1.2.0-rc.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +50 -3
  2. package/package.json +9 -9
package/dist/index.mjs CHANGED
@@ -434,6 +434,36 @@ const setupCoreAdminTestSuite = (options) => {
434
434
  destination: "testflight",
435
435
  version: "1.0.0 (7)"
436
436
  }))).data).toBeNull();
437
+ const androidBuiltIn = bundleRow("64");
438
+ const androidResponse = await admin("/native-builds", jsonRequest("POST", {
439
+ id: bundleRow("864").id,
440
+ platform: "android",
441
+ channel,
442
+ fingerprintHash: "android-fingerprint",
443
+ appVersion: null,
444
+ minBundleId: androidBuiltIn.id,
445
+ gitCommitHash: null,
446
+ buildKey: null,
447
+ buildNumber: "64",
448
+ artifact: {
449
+ kind: "aab",
450
+ storageUri: "storage://native-builds/android/64/app.aab",
451
+ byteSize: 1e3
452
+ },
453
+ embeddedBundle: {
454
+ manifestStorageUri: androidBuiltIn.manifest_storage_uri,
455
+ manifestFileHash: androidBuiltIn.manifest_file_hash,
456
+ assetBaseStorageUri: androidBuiltIn.asset_base_storage_uri
457
+ }
458
+ }));
459
+ expect(androidResponse.status).toBe(201);
460
+ await androidResponse.text();
461
+ const production = await admin(`/native-builds/${bundleRow("864").id}/submission`, jsonRequest("POST", {
462
+ destination: "play-production",
463
+ version: "1.0.0 (64)"
464
+ }));
465
+ expect(production.status).toBe(200);
466
+ expect((await production.json()).data.submitted_to).toBe("play-production");
437
467
  const wrongStore = await admin(`/native-builds/${newest.id}/submission`, jsonRequest("POST", {
438
468
  destination: "play-internal",
439
469
  version: "1.0.0 (7)"
@@ -598,9 +628,24 @@ const setupCoreAdminTestSuite = (options) => {
598
628
  channel: sandboxChannel,
599
629
  isSandbox: "yes"
600
630
  })).toBe(400);
631
+ expect(await refusal("74", {
632
+ channel,
633
+ sandboxUrlScheme: "acme-preview"
634
+ })).toBe(400);
635
+ expect(await refusal("74", {
636
+ channel: sandboxChannel,
637
+ isSandbox: true,
638
+ sandboxUrlScheme: "Acme"
639
+ })).toBe(400);
640
+ expect(await refusal("74", {
641
+ channel: sandboxChannel,
642
+ isSandbox: true,
643
+ sandboxUrlScheme: 42
644
+ })).toBe(400);
601
645
  const tagged = await post("72", {
602
646
  channel: sandboxChannel,
603
- isSandbox: true
647
+ isSandbox: true,
648
+ sandboxUrlScheme: "acme-preview"
604
649
  });
605
650
  expect(tagged.status).toBe(201);
606
651
  const sandboxBuild = (await tagged.json()).data;
@@ -612,11 +657,13 @@ const setupCoreAdminTestSuite = (options) => {
612
657
  const plainBuild = (await plain.json()).data;
613
658
  expect(sandboxBuild).toMatchObject({
614
659
  is_sandbox: true,
615
- is_store_build: false
660
+ is_store_build: false,
661
+ sandbox_url_scheme: "acme-preview"
616
662
  });
617
663
  expect(plainBuild).toMatchObject({
618
664
  is_sandbox: false,
619
- is_store_build: false
665
+ is_store_build: false,
666
+ sandbox_url_scheme: null
620
667
  });
621
668
  expect((await adminJson(`/native-builds/${sandboxBuild.id}`)).data).toEqual(sandboxBuild);
622
669
  expect((await adminJson(`/native-builds/${plainBuild.id}`)).data).toEqual(plainBuild);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/test-utils",
3
- "version": "1.2.0-rc.24",
3
+ "version": "1.2.0-rc.25",
4
4
  "type": "module",
5
5
  "description": "Test utilities for Hot Updater packages",
6
6
  "sideEffects": false,
@@ -50,10 +50,10 @@
50
50
  "mysql2": "*",
51
51
  "pg": "*",
52
52
  "vitest": "^4.0.0",
53
- "@hot-updater/plugin-insights": "^1.2.0-rc.24",
54
- "@hot-updater/protocol": "^1.2.0-rc.24",
55
- "@hot-updater/plugin-core": "^1.2.0-rc.24",
56
- "@hot-updater/server": "^1.2.0-rc.24"
53
+ "@hot-updater/plugin-insights": "^1.2.0-rc.25",
54
+ "@hot-updater/protocol": "^1.2.0-rc.25",
55
+ "@hot-updater/plugin-core": "^1.2.0-rc.25",
56
+ "@hot-updater/server": "^1.2.0-rc.25"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "@electric-sql/pglite": {
@@ -84,10 +84,10 @@
84
84
  "typescript": "npm:@typescript/typescript6@6.0.2",
85
85
  "vitest": "4.1.4",
86
86
  "workspace-tools": "^0.41.7",
87
- "@hot-updater/plugin-insights": "1.2.0-rc.24",
88
- "@hot-updater/protocol": "1.2.0-rc.24",
89
- "@hot-updater/plugin-core": "1.2.0-rc.24",
90
- "@hot-updater/server": "1.2.0-rc.24"
87
+ "@hot-updater/plugin-insights": "1.2.0-rc.25",
88
+ "@hot-updater/protocol": "1.2.0-rc.25",
89
+ "@hot-updater/server": "1.2.0-rc.25",
90
+ "@hot-updater/plugin-core": "1.2.0-rc.25"
91
91
  },
92
92
  "inlinedDependencies": {
93
93
  "@nodelib/fs.scandir": "2.1.5",