@nocobase/test 0.21.0-alpha.15 → 0.21.0-alpha.16

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 (95) hide show
  1. package/es/client/commonSettingsChecker/blockTitle.d.ts +1 -0
  2. package/es/client/commonSettingsChecker/fieldTitle.d.ts +1 -0
  3. package/es/client/commonSettingsChecker/index.d.ts +2 -0
  4. package/es/client/formItemChecker/collectionField.d.ts +5 -0
  5. package/es/client/formItemChecker/common.d.ts +13 -0
  6. package/es/client/formItemChecker/icon.d.ts +3 -0
  7. package/es/client/formItemChecker/index.d.ts +23 -0
  8. package/es/client/formItemChecker/input.d.ts +3 -0
  9. package/es/client/formItemChecker/number.d.ts +3 -0
  10. package/es/client/formItemChecker/radio.d.ts +3 -0
  11. package/es/client/formItemChecker/textarea.d.ts +3 -0
  12. package/es/client/index.d.ts +10 -15
  13. package/es/client/index.mjs +1468 -173
  14. package/es/client/renderApp.d.ts +3 -0
  15. package/es/client/renderHookWithApp.d.ts +11 -0
  16. package/es/client/renderSettings.d.ts +7 -0
  17. package/es/client/renderSingleSettings.d.ts +7 -0
  18. package/es/client/settingsChecker/delete.d.ts +8 -0
  19. package/es/client/settingsChecker/index.d.ts +18 -0
  20. package/es/client/settingsChecker/modal.d.ts +8 -0
  21. package/es/client/settingsChecker/select.d.ts +10 -0
  22. package/es/client/settingsChecker/switch.d.ts +8 -0
  23. package/es/client/utils/checkModal.d.ts +13 -0
  24. package/es/client/utils/checkSchema.d.ts +1 -0
  25. package/es/client/utils/index.d.ts +3 -0
  26. package/es/client/utils/utils.d.ts +2 -0
  27. package/es/e2e/e2eUtils.d.ts +10 -4
  28. package/es/e2e/index.mjs +447 -0
  29. package/es/e2e/templatesOfPage.d.ts +4 -0
  30. package/es/web/index.d.ts +21 -8
  31. package/es/web/index.mjs +1141 -196
  32. package/es/web/utils.d.ts +1 -0
  33. package/lib/client/commonSettingsChecker/blockTitle.d.ts +1 -0
  34. package/lib/client/commonSettingsChecker/blockTitle.js +56 -0
  35. package/lib/client/commonSettingsChecker/fieldTitle.d.ts +1 -0
  36. package/lib/client/commonSettingsChecker/fieldTitle.js +56 -0
  37. package/lib/client/commonSettingsChecker/index.d.ts +2 -0
  38. package/lib/client/commonSettingsChecker/index.js +23 -0
  39. package/lib/client/formItemChecker/collectionField.d.ts +5 -0
  40. package/lib/client/formItemChecker/collectionField.js +52 -0
  41. package/lib/client/formItemChecker/common.d.ts +13 -0
  42. package/lib/client/formItemChecker/common.js +36 -0
  43. package/lib/client/formItemChecker/icon.d.ts +3 -0
  44. package/lib/client/formItemChecker/icon.js +60 -0
  45. package/lib/client/formItemChecker/index.d.ts +23 -0
  46. package/lib/client/formItemChecker/index.js +56 -0
  47. package/lib/client/formItemChecker/input.d.ts +3 -0
  48. package/lib/client/formItemChecker/input.js +52 -0
  49. package/lib/client/formItemChecker/number.d.ts +3 -0
  50. package/lib/client/formItemChecker/number.js +52 -0
  51. package/lib/client/formItemChecker/radio.d.ts +3 -0
  52. package/lib/client/formItemChecker/radio.js +57 -0
  53. package/lib/client/formItemChecker/textarea.d.ts +3 -0
  54. package/lib/client/formItemChecker/textarea.js +52 -0
  55. package/lib/client/index.d.ts +10 -15
  56. package/lib/client/index.js +18 -42
  57. package/lib/client/renderApp.d.ts +3 -0
  58. package/lib/client/renderApp.js +52 -0
  59. package/lib/client/renderHookWithApp.d.ts +11 -0
  60. package/lib/client/renderHookWithApp.js +49 -0
  61. package/lib/client/renderSettings.d.ts +7 -0
  62. package/lib/client/renderSettings.js +69 -0
  63. package/lib/client/renderSingleSettings.d.ts +7 -0
  64. package/lib/client/renderSingleSettings.js +40 -0
  65. package/lib/client/settingsChecker/delete.d.ts +8 -0
  66. package/lib/client/settingsChecker/delete.js +50 -0
  67. package/lib/client/settingsChecker/index.d.ts +18 -0
  68. package/lib/client/settingsChecker/index.js +64 -0
  69. package/lib/client/settingsChecker/modal.d.ts +8 -0
  70. package/lib/client/settingsChecker/modal.js +40 -0
  71. package/lib/client/settingsChecker/select.d.ts +10 -0
  72. package/lib/client/settingsChecker/select.js +76 -0
  73. package/lib/client/settingsChecker/switch.d.ts +8 -0
  74. package/lib/client/settingsChecker/switch.js +82 -0
  75. package/lib/client/utils/checkModal.d.ts +13 -0
  76. package/lib/client/utils/checkModal.js +78 -0
  77. package/lib/client/utils/checkSchema.d.ts +1 -0
  78. package/lib/client/utils/checkSchema.js +36 -0
  79. package/lib/client/utils/index.d.ts +3 -0
  80. package/lib/client/utils/index.js +25 -0
  81. package/lib/client/utils/utils.d.ts +2 -0
  82. package/lib/client/utils/utils.js +45 -0
  83. package/lib/e2e/e2eUtils.d.ts +10 -4
  84. package/lib/e2e/e2eUtils.js +8 -0
  85. package/lib/e2e/templatesOfPage.d.ts +4 -0
  86. package/lib/e2e/templatesOfPage.js +442 -0
  87. package/lib/web/dataSourceMainCollections.json +695 -99
  88. package/lib/web/dataSourceMainData.json +186 -0
  89. package/lib/web/index.d.ts +18 -9
  90. package/lib/web/index.js +154 -21
  91. package/lib/web/utils.d.ts +1 -0
  92. package/lib/web/utils.js +32 -0
  93. package/package.json +3 -3
  94. package/vitest.mjs +8 -3
  95. package/lib/web/usersListData.json +0 -30
@@ -0,0 +1 @@
1
+ export declare function checkBlockTitle(oldValue?: string): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function checkFieldTitle(oldValue?: string): Promise<void>;
@@ -0,0 +1,2 @@
1
+ export * from './blockTitle';
2
+ export * from './fieldTitle';
@@ -0,0 +1,5 @@
1
+ import { CommonFormItemCheckerOptions } from './common';
2
+ export interface CollectionFieldCheckOptions extends CommonFormItemCheckerOptions {
3
+ field: string;
4
+ }
5
+ export declare function collectionFieldChecker(options: CollectionFieldCheckOptions): Promise<void>;
@@ -0,0 +1,13 @@
1
+ export interface CommonFormItemCheckerOptions {
2
+ label?: string;
3
+ container?: HTMLElement;
4
+ newValue?: any;
5
+ oldValue?: any;
6
+ Component?: string;
7
+ }
8
+ export interface GetFormItemElementOptions {
9
+ container?: HTMLElement;
10
+ Component: string;
11
+ label?: string;
12
+ }
13
+ export declare function getFormItemElement({ container, Component, label }: GetFormItemElementOptions): Element;
@@ -0,0 +1,3 @@
1
+ import { CommonFormItemCheckerOptions } from './common';
2
+ export type IconCheckOptions = CommonFormItemCheckerOptions;
3
+ export declare function iconChecker(options: IconCheckOptions): Promise<void>;
@@ -0,0 +1,23 @@
1
+ import { IconCheckOptions } from './icon';
2
+ import { RadioCheckOptions } from './radio';
3
+ import { InputCheckOptions } from './input';
4
+ import { NumberCheckOptions } from './number';
5
+ import { TextareaCheckOptions } from './textarea';
6
+ import { CollectionFieldCheckOptions } from './collectionField';
7
+ export * from './icon';
8
+ export * from './radio';
9
+ export * from './icon';
10
+ export type FormItemCheckOptions = ({
11
+ type: 'icon';
12
+ } & IconCheckOptions) | ({
13
+ type: 'radio';
14
+ } & RadioCheckOptions) | ({
15
+ type: 'collectionField';
16
+ } & CollectionFieldCheckOptions) | ({
17
+ type: 'input';
18
+ } & InputCheckOptions) | ({
19
+ type: 'number';
20
+ } & NumberCheckOptions) | ({
21
+ type: 'textarea';
22
+ } & TextareaCheckOptions);
23
+ export declare function checkFormItems(list: FormItemCheckOptions[]): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { CommonFormItemCheckerOptions } from './common';
2
+ export type InputCheckOptions = CommonFormItemCheckerOptions;
3
+ export declare function inputChecker(options: InputCheckOptions): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { CommonFormItemCheckerOptions } from './common';
2
+ export type NumberCheckOptions = CommonFormItemCheckerOptions;
3
+ export declare function numberChecker(options: NumberCheckOptions): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { CommonFormItemCheckerOptions } from './common';
2
+ export type RadioCheckOptions = CommonFormItemCheckerOptions;
3
+ export declare function radioChecker(options: CommonFormItemCheckerOptions): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { CommonFormItemCheckerOptions } from './common';
2
+ export type TextareaCheckOptions = CommonFormItemCheckerOptions;
3
+ export declare function textareaChecker(options: TextareaCheckOptions): Promise<void>;
@@ -1,19 +1,14 @@
1
- import React, { FC } from 'react';
2
- import { GetAppComponentOptions, GetAppOptions } from '../web';
1
+ import React from 'react';
2
+ import { sleep } from '../web';
3
+ export * from './utils';
3
4
  export { renderHook } from '@testing-library/react-hooks';
4
5
  declare function customRender(ui: React.ReactElement, options?: {}): import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
5
6
  export * from '@testing-library/react';
6
7
  export { default as userEvent } from '@testing-library/user-event';
7
- export { customRender as render };
8
- export declare const sleep: (timeout?: number) => Promise<unknown>;
9
- export declare const WaitApp: () => Promise<void>;
10
- interface RenderHookOptions extends Omit<GetAppOptions, 'value' | 'onChange'> {
11
- hook: () => any;
12
- props?: any;
13
- Wrapper?: FC<{
14
- children: React.ReactNode;
15
- }>;
16
- }
17
- export declare const renderHookWithApp: (options: RenderHookOptions) => Promise<import("@testing-library/react-hooks").RenderHookResult<any, any, import("@testing-library/react-hooks").Renderer<any>>>;
18
- export declare const renderApp: (options: GetAppComponentOptions) => Promise<import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>>;
19
- export declare const renderReadPrettyApp: (options: GetAppComponentOptions) => Promise<import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>>;
8
+ export { customRender as render, sleep };
9
+ export * from './renderApp';
10
+ export * from './renderHookWithApp';
11
+ export * from './renderSettings';
12
+ export * from './renderSingleSettings';
13
+ export * from './settingsChecker';
14
+ export * from './commonSettingsChecker';