@myparcel-dev/pdk-admin-component-tests 1.14.1 → 2.0.0

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 (59) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/package.json +4 -4
  3. package/src/TestSuite.ts +3 -3
  4. package/src/__tests__/__snapshots__/exports.spec.ts.snap +7 -0
  5. package/src/vue.shims.d.ts +4 -4
  6. package/dist/TestSuite.d.ts +0 -21
  7. package/dist/common/index.d.ts +0 -4
  8. package/dist/common/runCommonComponentTests.d.ts +0 -1
  9. package/dist/common/runCommonInputTests.d.ts +0 -2
  10. package/dist/common/runHasPropTest.d.ts +0 -1
  11. package/dist/common/runHasSlotTest.d.ts +0 -4
  12. package/dist/components/index.d.ts +0 -36
  13. package/dist/components/runBadgeTest.d.ts +0 -1
  14. package/dist/components/runBoxTest.d.ts +0 -1
  15. package/dist/components/runButtonTest.d.ts +0 -1
  16. package/dist/components/runCheckboxGroupTest.d.ts +0 -1
  17. package/dist/components/runCheckboxInputTest.d.ts +0 -1
  18. package/dist/components/runCodeEditorTest.d.ts +0 -1
  19. package/dist/components/runColTest.d.ts +0 -1
  20. package/dist/components/runCurrencyInputTest.d.ts +0 -1
  21. package/dist/components/runDropDownButtonTest.d.ts +0 -1
  22. package/dist/components/runDropOffInputTest.d.ts +0 -1
  23. package/dist/components/runFormGroupTest.d.ts +0 -1
  24. package/dist/components/runHeadingTest.d.ts +0 -1
  25. package/dist/components/runIconTest.d.ts +0 -1
  26. package/dist/components/runImageTest.d.ts +0 -1
  27. package/dist/components/runLinkTest.d.ts +0 -1
  28. package/dist/components/runLoaderTest.d.ts +0 -1
  29. package/dist/components/runModalTest.d.ts +0 -1
  30. package/dist/components/runMultiDateInputTest.d.ts +0 -1
  31. package/dist/components/runMultiSelectInputTest.d.ts +0 -1
  32. package/dist/components/runNotificationTest.d.ts +0 -1
  33. package/dist/components/runNumberInputTest.d.ts +0 -1
  34. package/dist/components/runPlainWrapperTest.d.ts +0 -1
  35. package/dist/components/runRadioGroupTest.d.ts +0 -1
  36. package/dist/components/runRadioInputTest.d.ts +0 -1
  37. package/dist/components/runRowTest.d.ts +0 -1
  38. package/dist/components/runSelectInputTest.d.ts +0 -1
  39. package/dist/components/runSettingsDividerTest.d.ts +0 -1
  40. package/dist/components/runShippingMethodsInputTest.d.ts +0 -1
  41. package/dist/components/runTabNavButtonTest.d.ts +0 -1
  42. package/dist/components/runTableColTest.d.ts +0 -1
  43. package/dist/components/runTableRowTest.d.ts +0 -1
  44. package/dist/components/runTableTest.d.ts +0 -1
  45. package/dist/components/runTextAreaTest.d.ts +0 -1
  46. package/dist/components/runTextInputTest.d.ts +0 -1
  47. package/dist/components/runTimeInputTest.d.ts +0 -1
  48. package/dist/components/runToggleInputTest.d.ts +0 -1
  49. package/dist/components/runTriStateInputTest.d.ts +0 -1
  50. package/dist/helpers/createInputOptions.d.ts +0 -4
  51. package/dist/helpers/index.d.ts +0 -1
  52. package/dist/helpers/wrapperPlugin.d.ts +0 -2
  53. package/dist/index.d.ts +0 -3
  54. package/dist/setup.d.ts +0 -1
  55. package/dist/tests/executeAdminComponentTest.d.ts +0 -3
  56. package/dist/tests/executePdkComponentTests.d.ts +0 -2
  57. package/dist/tests/index.d.ts +0 -3
  58. package/dist/tests/testMap.d.ts +0 -4
  59. package/dist/types.d.ts +0 -10
package/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  <!-- MONOWEAVE:BELOW -->
4
4
 
5
+ ## [2.0.0](https://github.com/myparcelnl/js-pdk/compare/@myparcel-dev/pdk-admin-component-tests@1.14.2...@myparcel-dev/pdk-admin-component-tests@2.0.0) "@myparcel-dev/pdk-admin-component-tests" (2026-06-04)
6
+
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * drive admin shipment options and checkout from the PDK capabilities API (#346)
11
+
12
+ ### Features
13
+
14
+ * drive admin shipment options and checkout from the PDK capabilities API ([#346](https://github.com/myparcelnl/js-pdk/issues/346)) ([f62b934](https://github.com/myparcelnl/js-pdk/commit/f62b9348d4f4316da28dbb97e4c335fc8aa9df80)), closes [myparcelnl/pdk#459](https://github.com/myparcelnl/pdk/issues/459) [myparcelnl/pdk#459](https://github.com/myparcelnl/pdk/issues/459) [myparcelnl/pdk#459](https://github.com/myparcelnl/pdk/issues/459)
15
+
16
+
17
+
18
+
19
+ ## [1.14.2](https://github.com/myparcelnl/js-pdk/compare/@myparcel-dev/pdk-admin-component-tests@1.14.1...@myparcel-dev/pdk-admin-component-tests@1.14.2) "@myparcel-dev/pdk-admin-component-tests" (2026-05-29)
20
+
21
+
22
+
23
+
5
24
  ## [1.13.1](https://github.com/myparcelnl/js-pdk/compare/@myparcel-dev/pdk-admin-component-tests@1.13.0...@myparcel-dev/pdk-admin-component-tests@1.13.1) "@myparcel-dev/pdk-admin-component-tests" (2026-02-05)
6
25
 
7
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myparcel-dev/pdk-admin-component-tests",
3
- "version": "1.14.1",
3
+ "version": "2.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/myparcelnl/js-pdk.git",
@@ -31,7 +31,7 @@
31
31
  "typecheck": "run ws:vue:typecheck \"$(pwd)\""
32
32
  },
33
33
  "dependencies": {
34
- "@myparcel-dev/pdk-admin": "^1.14.1",
34
+ "@myparcel-dev/pdk-admin": "^2.0.0",
35
35
  "@pinia/testing": ">= 0.1.0 < 1",
36
36
  "@vitest/coverage-v8": "^2.1.3",
37
37
  "@vue/test-utils": "^2.0.0",
@@ -42,11 +42,11 @@
42
42
  "devDependencies": {
43
43
  "typescript": "^5.2.2",
44
44
  "vitest": "^2.1.3",
45
- "vue": "3.4.31",
45
+ "vue": "3.5.35",
46
46
  "vue-tsc": "^2.0.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "vue": "3.4.31"
49
+ "vue": "3.5.35"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">=20"
package/src/TestSuite.ts CHANGED
@@ -105,11 +105,11 @@ export class TestSuite<
105
105
  return this.resolveOptions();
106
106
  }
107
107
 
108
- public getInputWrapper<NodeType extends Node>(wrapper: VueWrapper<Component>): DOMWrapper<NodeType> {
108
+ public getInputWrapper<NodeType extends Node>(wrapper: VueWrapper<any>): DOMWrapper<NodeType> {
109
109
  return this.getElementWrapper('input', wrapper);
110
110
  }
111
111
 
112
- public getSelectWrapper<NodeType extends Node>(wrapper: VueWrapper<Component>): DOMWrapper<NodeType> {
112
+ public getSelectWrapper<NodeType extends Node>(wrapper: VueWrapper<any>): DOMWrapper<NodeType> {
113
113
  return this.getElementWrapper('select', wrapper);
114
114
  }
115
115
 
@@ -123,7 +123,7 @@ export class TestSuite<
123
123
 
124
124
  private getElementWrapper<NodeType extends Node>(
125
125
  element: string,
126
- wrapper: VueWrapper<Component>,
126
+ wrapper: VueWrapper<any>,
127
127
  ): DOMWrapper<NodeType> {
128
128
  const byComponentName = wrapper.findByTestId(this.componentName);
129
129
 
@@ -10,6 +10,7 @@ exports[`exports > exports from index.ts 1`] = `
10
10
  "AdminInstanceContextKey",
11
11
  "AdminModalKey",
12
12
  "AdminView",
13
+ "BOX_MODE_ACTIONS",
13
14
  "BackendEndpoint",
14
15
  "BulkSelectCheckbox",
15
16
  "ChildProductSettingsView",
@@ -26,13 +27,17 @@ exports[`exports > exports from index.ts 1`] = `
26
27
  "FrontendEndpoint",
27
28
  "INJECT_ADMIN_INSTANCE",
28
29
  "INJECT_GLOBAL_PDK_ADMIN",
30
+ "LIST_ITEM_MODE_ACTIONS",
29
31
  "LogLevel",
32
+ "MODAL_MODE_ACTIONS",
30
33
  "ModalsView",
31
34
  "NotificationCategory",
32
35
  "NotificationContainer",
33
36
  "NotificationsView",
37
+ "ORDER_VIEW_IN_BACKOFFICE_ID",
34
38
  "OrderBoxView",
35
39
  "OrderListItemView",
40
+ "OrderMode",
36
41
  "PackageType",
37
42
  "PdkAdmin",
38
43
  "PlainElement",
@@ -42,6 +47,7 @@ exports[`exports > exports from index.ts 1`] = `
42
47
  "QUERY_KEY_SHIPMENT",
43
48
  "ResetButton",
44
49
  "ReturnsForm",
50
+ "STORE_MODE_ACTIONS",
45
51
  "ShipmentBarcode",
46
52
  "ShipmentOptionsForm",
47
53
  "ShipmentStatus",
@@ -148,6 +154,7 @@ exports[`exports > exports from index.ts 1`] = `
148
154
  "useMultiSelectInputContext",
149
155
  "useNotificationStore",
150
156
  "useOrderData",
157
+ "useOrderMode",
151
158
  "useOrdersData",
152
159
  "usePdkMutation",
153
160
  "usePrintOrdersMutation",
@@ -12,15 +12,15 @@ declare module '*.vue' {
12
12
  declare const __VUE_PROD_DEVTOOLS__: boolean;
13
13
 
14
14
  declare module '@vue/test-utils' {
15
- export class VueWrapper {
16
- public findByTestId<K extends keyof HTMLElementTagNameMap>(
15
+ export interface VueWrapper {
16
+ findByTestId<K extends keyof HTMLElementTagNameMap>(
17
17
  selector: string | string[],
18
18
  ): DOMWrapper<HTMLElementTagNameMap[K]>;
19
19
 
20
- public findByTestId<K extends keyof SVGElementTagNameMap>(
20
+ findByTestId<K extends keyof SVGElementTagNameMap>(
21
21
  selector: string | string[],
22
22
  ): DOMWrapper<SVGElementTagNameMap[K]>;
23
23
 
24
- public findByTestId<T extends Element | Node = Node>(selector: string | string[]): DOMWrapper<T>;
24
+ findByTestId<T extends Element | Node = Node>(selector: string | string[]): DOMWrapper<T>;
25
25
  }
26
26
  }
@@ -1,21 +0,0 @@
1
- import { type Component as ComponentType } from 'vue';
2
- import { type DOMWrapper, type VueWrapper } from '@vue/test-utils';
3
- import { type AdminComponent } from '@myparcel-dev/pdk-admin';
4
- import { type InteractiveElementConfiguration } from '@myparcel-dev/vue-form-builder';
5
- import { type AdditionalOptions, type ComponentTestOptions, type TestComponentMountingOptions } from './types';
6
- export declare class TestSuite<TestOptions extends ComponentTestOptions = ComponentTestOptions, Component extends ComponentType = ComponentType> {
7
- private defaultOptions;
8
- private readonly component;
9
- private readonly componentName;
10
- constructor(componentName: AdminComponent | string, component: Component);
11
- runCommonComponentTests(options?: TestComponentMountingOptions<Component, TestOptions> | undefined): void;
12
- runHasSlotTest(slot?: string): void;
13
- runHasPropTest(prop: string, value?: unknown): void;
14
- runCommonInputTests(additionalOptions?: AdditionalOptions): void;
15
- createInputOptions<T>(modelValue?: T, options?: Partial<InteractiveElementConfiguration>): TestComponentMountingOptions<Component, TestOptions>;
16
- getInputWrapper<NodeType extends Node>(wrapper: VueWrapper<Component>): DOMWrapper<NodeType>;
17
- getSelectWrapper<NodeType extends Node>(wrapper: VueWrapper<Component>): DOMWrapper<NodeType>;
18
- setOptions(options: TestComponentMountingOptions<Component, TestOptions>): TestComponentMountingOptions<Component, TestOptions>;
19
- private getElementWrapper;
20
- private resolveOptions;
21
- }
@@ -1,4 +0,0 @@
1
- export * from './runCommonComponentTests';
2
- export * from './runCommonInputTests';
3
- export * from './runHasPropTest';
4
- export * from './runHasSlotTest';
@@ -1 +0,0 @@
1
- export declare const runCommonComponentTests: <T extends import("../types").ComponentTestOptions = import("../types").ComponentTestOptions>(component: import("vue").Component, options?: import("@vue/test-utils").ComponentMountingOptions<T> | undefined) => void;
@@ -1,2 +0,0 @@
1
- import { type AdditionalOptions } from '../types';
2
- export declare const runCommonInputTests: <T extends import("../types").ComponentTestOptions = import("../types").ComponentTestOptions>(component: import("vue").Component, options?: import("@vue/test-utils").ComponentMountingOptions<T> | undefined, additionalOptions?: AdditionalOptions) => void;
@@ -1 +0,0 @@
1
- export declare const runHasPropTest: <T extends import("../types").ComponentTestOptions = import("../types").ComponentTestOptions>(component: import("vue").Component, options: import("@vue/test-utils").ComponentMountingOptions<T> | undefined, prop: string, value?: unknown) => void;
@@ -1,4 +0,0 @@
1
- /**
2
- * Checks if the html content passed to the slot exists anywhere in the component.
3
- */
4
- export declare const runHasSlotTest: <T extends import("../types").ComponentTestOptions = import("../types").ComponentTestOptions>(component: import("vue").Component, options?: import("@vue/test-utils").ComponentMountingOptions<T> | undefined, slot?: string | undefined) => void;
@@ -1,36 +0,0 @@
1
- export * from './runBadgeTest';
2
- export * from './runBoxTest';
3
- export * from './runButtonTest';
4
- export * from './runCheckboxGroupTest';
5
- export * from './runCheckboxInputTest';
6
- export * from './runCodeEditorTest';
7
- export * from './runColTest';
8
- export * from './runCurrencyInputTest';
9
- export * from './runDropDownButtonTest';
10
- export * from './runDropOffInputTest';
11
- export * from './runFormGroupTest';
12
- export * from './runHeadingTest';
13
- export * from './runIconTest';
14
- export * from './runImageTest';
15
- export * from './runLinkTest';
16
- export * from './runLoaderTest';
17
- export * from './runModalTest';
18
- export * from './runMultiSelectInputTest';
19
- export * from './runNotificationTest';
20
- export * from './runNumberInputTest';
21
- export * from './runPlainWrapperTest';
22
- export * from './runRadioGroupTest';
23
- export * from './runRadioInputTest';
24
- export * from './runRowTest';
25
- export * from './runSelectInputTest';
26
- export * from './runSettingsDividerTest';
27
- export * from './runShippingMethodsInputTest';
28
- export * from './runTabNavButtonTest';
29
- export * from './runTableColTest';
30
- export * from './runTableRowTest';
31
- export * from './runTableTest';
32
- export * from './runTextAreaTest';
33
- export * from './runTextInputTest';
34
- export * from './runTimeInputTest';
35
- export * from './runToggleInputTest';
36
- export * from './runTriStateInputTest';
@@ -1 +0,0 @@
1
- export declare const runBadgeTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runBoxTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runButtonTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runCheckboxGroupTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runCheckboxInputTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runCodeEditorTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runColTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runCurrencyInputTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runDropDownButtonTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runDropOffInputTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runFormGroupTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runHeadingTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runIconTest: <T extends import("../types").ComponentTestOptions = import("../types").ComponentTestOptions>(component: import("vue").Component) => void;
@@ -1 +0,0 @@
1
- export declare const runImageTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runLinkTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runLoaderTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runModalTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runMultiDateInputTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runMultiSelectInputTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runNotificationTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runNumberInputTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runPlainWrapperTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runRadioGroupTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runRadioInputTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runRowTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runSelectInputTest: <T extends import("../types").ComponentTestOptions = import("../types").ComponentTestOptions>(component: import("vue").Component) => void;
@@ -1 +0,0 @@
1
- export declare const runSettingsDividerTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runShippingMethodsInputTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runTabNavButtonTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runTableColTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runTableRowTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runTableTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runTextAreaTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runTextInputTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runTimeInputTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runToggleInputTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1 +0,0 @@
1
- export declare const runTriStateInputTest: (component: Omit<import("vue").Component, "props">) => void;
@@ -1,4 +0,0 @@
1
- import { type Component as ComponentType } from 'vue';
2
- import { type InteractiveElementConfiguration } from '@myparcel-dev/vue-form-builder';
3
- import { type TestComponentMountingOptions } from '../types';
4
- export declare const createInputOptions: <T, Component extends ComponentType = ComponentType, Options extends Record<string, unknown> = Record<string, unknown>>(modelValue?: T, options?: Partial<InteractiveElementConfiguration>) => TestComponentMountingOptions<Component, Options>;
@@ -1 +0,0 @@
1
- export * from './createInputOptions';
@@ -1,2 +0,0 @@
1
- import { type VueWrapper } from '@vue/test-utils';
2
- export declare const wrapperPlugin: (wrapper: VueWrapper) => Record<string, any>;
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from '@myparcel-dev/pdk-admin';
2
- export { TestSuite } from './TestSuite';
3
- export { executeAdminComponentTest, executePdkComponentTests } from './tests';
package/dist/setup.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- import { type Component } from 'vue';
2
- import { type AdminComponent } from '@myparcel-dev/pdk-admin';
3
- export declare const executeAdminComponentTest: (name: AdminComponent, component: Omit<Component, 'props'>) => void;
@@ -1,2 +0,0 @@
1
- import { type AdminComponentMap } from '@myparcel-dev/pdk-admin';
2
- export declare const executePdkComponentTests: (components?: Partial<AdminComponentMap>) => void;
@@ -1,3 +0,0 @@
1
- export * from './executeAdminComponentTest';
2
- export * from './executePdkComponentTests';
3
- export * from './testMap';
@@ -1,4 +0,0 @@
1
- import { type Component } from 'vue';
2
- import { AdminComponent } from '@myparcel-dev/pdk-admin';
3
- export type AdminComponentTest = (component: Omit<Component, 'props'>) => void;
4
- export declare const testMap: Readonly<Record<AdminComponent, AdminComponentTest>>;
package/dist/types.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { type Component as ComponentType, type Component } from 'vue';
2
- import { type ComponentMountingOptions } from '@vue/test-utils';
3
- export type ComponentTestOptions = {
4
- $slots?: Record<string, unknown>;
5
- };
6
- export type PartialComponentTest<Args extends unknown[] = unknown[]> = <T extends ComponentTestOptions = ComponentTestOptions>(component: Component, options?: ComponentMountingOptions<T>, ...args: Args) => void;
7
- export interface AdditionalOptions {
8
- value?: unknown;
9
- }
10
- export type TestComponentMountingOptions<Component extends ComponentType = ComponentType, Options extends ComponentTestOptions = ComponentTestOptions> = ComponentMountingOptions<Component> & Options;