@nocobase/test 0.18.0-alpha.8 → 0.18.0-alpha.9
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.
- package/lib/e2e/defineConfig.js +4 -1
- package/lib/e2e/templatesOfPage.d.ts +8 -0
- package/lib/e2e/templatesOfPage.js +410 -0
- package/package.json +3 -3
- package/vitest.mjs +71 -65
package/lib/e2e/defineConfig.js
CHANGED
|
@@ -24,7 +24,10 @@ module.exports = __toCommonJS(defineConfig_exports);
|
|
|
24
24
|
var import_test = require("@playwright/test");
|
|
25
25
|
const defineConfig = /* @__PURE__ */ __name((config) => {
|
|
26
26
|
return (0, import_test.defineConfig)({
|
|
27
|
-
timeout: process.env.CI ?
|
|
27
|
+
timeout: process.env.CI ? 5 * 60 * 1e3 : 30 * 1e3,
|
|
28
|
+
expect: {
|
|
29
|
+
timeout: process.env.CI ? 1 * 60 * 1e3 : 5e3
|
|
30
|
+
},
|
|
28
31
|
// Look for test files in the "tests" directory, relative to this configuration file.
|
|
29
32
|
testDir: "packages",
|
|
30
33
|
// Match all test files in the e2e and __e2e__ directories.
|
|
@@ -76,6 +76,14 @@ export declare const oneDetailBlockWithM2oFieldToGeneral: PageConfig;
|
|
|
76
76
|
* 5. 所有字段都是 basic 字段
|
|
77
77
|
*/
|
|
78
78
|
export declare const oneTableBlockWithAddNewAndViewAndEditAndBasicFields: PageConfig;
|
|
79
|
+
/**
|
|
80
|
+
* 1. 一个 Table 区块
|
|
81
|
+
* 2. 点击 Add new 有一个 Form 区块,里面有一个 sub-table 字段
|
|
82
|
+
* 3. 点击 View 有一个 Details 区块,里面有一个 sub-table 字段
|
|
83
|
+
* 4. 点击 Edit 有一个 Form 区块,里面有一个 sub-table 字段
|
|
84
|
+
* 5. sub-table 中的所有字段都是 basic 字段
|
|
85
|
+
*/
|
|
86
|
+
export declare const oneTableBlockWithAddNewAndViewAndEditAndBasicFieldsAndSubTable: PageConfig;
|
|
79
87
|
/**
|
|
80
88
|
* 1. 一个 Table 区块
|
|
81
89
|
* 2. 点击 Add new 有一个 Form 区块
|
|
@@ -46,6 +46,7 @@ __export(templatesOfPage_exports, {
|
|
|
46
46
|
oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields: () => oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields,
|
|
47
47
|
oneTableBlockWithAddNewAndViewAndEditAndAssociationFields: () => oneTableBlockWithAddNewAndViewAndEditAndAssociationFields,
|
|
48
48
|
oneTableBlockWithAddNewAndViewAndEditAndBasicFields: () => oneTableBlockWithAddNewAndViewAndEditAndBasicFields,
|
|
49
|
+
oneTableBlockWithAddNewAndViewAndEditAndBasicFieldsAndSubTable: () => oneTableBlockWithAddNewAndViewAndEditAndBasicFieldsAndSubTable,
|
|
49
50
|
oneTableBlockWithAddNewAndViewAndEditAndChoicesFields: () => oneTableBlockWithAddNewAndViewAndEditAndChoicesFields,
|
|
50
51
|
oneTableBlockWithAddNewAndViewAndEditAndDatetimeFields: () => oneTableBlockWithAddNewAndViewAndEditAndDatetimeFields,
|
|
51
52
|
oneTableBlockWithAddNewAndViewAndEditAndMediaFields: () => oneTableBlockWithAddNewAndViewAndEditAndMediaFields,
|
|
@@ -5776,6 +5777,414 @@ const oneTableBlockWithAddNewAndViewAndEditAndBasicFields = {
|
|
|
5776
5777
|
"x-index": 1
|
|
5777
5778
|
}
|
|
5778
5779
|
};
|
|
5780
|
+
const oneTableBlockWithAddNewAndViewAndEditAndBasicFieldsAndSubTable = {
|
|
5781
|
+
collections: [
|
|
5782
|
+
...import_templatesOfCollection.generalWithBasic,
|
|
5783
|
+
{
|
|
5784
|
+
name: "subTable",
|
|
5785
|
+
fields: [
|
|
5786
|
+
{
|
|
5787
|
+
name: "manyToMany",
|
|
5788
|
+
interface: "m2m",
|
|
5789
|
+
target: "general"
|
|
5790
|
+
},
|
|
5791
|
+
{
|
|
5792
|
+
name: "oneToMany",
|
|
5793
|
+
interface: "o2m",
|
|
5794
|
+
target: "general"
|
|
5795
|
+
}
|
|
5796
|
+
]
|
|
5797
|
+
}
|
|
5798
|
+
],
|
|
5799
|
+
pageSchema: {
|
|
5800
|
+
_isJSONSchemaObject: true,
|
|
5801
|
+
version: "2.0",
|
|
5802
|
+
type: "void",
|
|
5803
|
+
"x-component": "Page",
|
|
5804
|
+
properties: {
|
|
5805
|
+
"7m533o9wcl2": {
|
|
5806
|
+
_isJSONSchemaObject: true,
|
|
5807
|
+
version: "2.0",
|
|
5808
|
+
type: "void",
|
|
5809
|
+
"x-component": "Grid",
|
|
5810
|
+
"x-initializer": "BlockInitializers",
|
|
5811
|
+
properties: {
|
|
5812
|
+
mbtse8e9kap: {
|
|
5813
|
+
_isJSONSchemaObject: true,
|
|
5814
|
+
version: "2.0",
|
|
5815
|
+
type: "void",
|
|
5816
|
+
"x-component": "Grid.Row",
|
|
5817
|
+
properties: {
|
|
5818
|
+
ir5rfzx0z5o: {
|
|
5819
|
+
_isJSONSchemaObject: true,
|
|
5820
|
+
version: "2.0",
|
|
5821
|
+
type: "void",
|
|
5822
|
+
"x-component": "Grid.Col",
|
|
5823
|
+
properties: {
|
|
5824
|
+
yr9pww7k8mq: {
|
|
5825
|
+
_isJSONSchemaObject: true,
|
|
5826
|
+
version: "2.0",
|
|
5827
|
+
type: "void",
|
|
5828
|
+
"x-decorator": "TableBlockProvider",
|
|
5829
|
+
"x-acl-action": "subTable:list",
|
|
5830
|
+
"x-decorator-props": {
|
|
5831
|
+
collection: "subTable",
|
|
5832
|
+
resource: "subTable",
|
|
5833
|
+
action: "list",
|
|
5834
|
+
params: {
|
|
5835
|
+
pageSize: 20
|
|
5836
|
+
},
|
|
5837
|
+
rowKey: "id",
|
|
5838
|
+
showIndex: true,
|
|
5839
|
+
dragSort: false,
|
|
5840
|
+
disableTemplate: false
|
|
5841
|
+
},
|
|
5842
|
+
"x-designer": "TableBlockDesigner",
|
|
5843
|
+
"x-component": "CardItem",
|
|
5844
|
+
"x-filter-targets": [],
|
|
5845
|
+
properties: {
|
|
5846
|
+
actions: {
|
|
5847
|
+
_isJSONSchemaObject: true,
|
|
5848
|
+
version: "2.0",
|
|
5849
|
+
type: "void",
|
|
5850
|
+
"x-initializer": "TableActionInitializers",
|
|
5851
|
+
"x-component": "ActionBar",
|
|
5852
|
+
"x-component-props": {
|
|
5853
|
+
style: {
|
|
5854
|
+
marginBottom: "var(--nb-spacing)"
|
|
5855
|
+
}
|
|
5856
|
+
},
|
|
5857
|
+
"x-uid": "0bvmtmgkrx0",
|
|
5858
|
+
"x-async": false,
|
|
5859
|
+
"x-index": 1
|
|
5860
|
+
},
|
|
5861
|
+
"39vo8hzhsor": {
|
|
5862
|
+
_isJSONSchemaObject: true,
|
|
5863
|
+
version: "2.0",
|
|
5864
|
+
type: "array",
|
|
5865
|
+
"x-initializer": "TableColumnInitializers",
|
|
5866
|
+
"x-component": "TableV2",
|
|
5867
|
+
"x-component-props": {
|
|
5868
|
+
rowKey: "id",
|
|
5869
|
+
rowSelection: {
|
|
5870
|
+
type: "checkbox"
|
|
5871
|
+
},
|
|
5872
|
+
useProps: "{{ useTableBlockProps }}"
|
|
5873
|
+
},
|
|
5874
|
+
properties: {
|
|
5875
|
+
actions: {
|
|
5876
|
+
_isJSONSchemaObject: true,
|
|
5877
|
+
version: "2.0",
|
|
5878
|
+
type: "void",
|
|
5879
|
+
title: '{{ t("Actions") }}',
|
|
5880
|
+
"x-action-column": "actions",
|
|
5881
|
+
"x-decorator": "TableV2.Column.ActionBar",
|
|
5882
|
+
"x-component": "TableV2.Column",
|
|
5883
|
+
"x-designer": "TableV2.ActionColumnDesigner",
|
|
5884
|
+
"x-initializer": "TableActionColumnInitializers",
|
|
5885
|
+
properties: {
|
|
5886
|
+
actions: {
|
|
5887
|
+
_isJSONSchemaObject: true,
|
|
5888
|
+
version: "2.0",
|
|
5889
|
+
type: "void",
|
|
5890
|
+
"x-decorator": "DndContext",
|
|
5891
|
+
"x-component": "Space",
|
|
5892
|
+
"x-component-props": {
|
|
5893
|
+
split: "|"
|
|
5894
|
+
},
|
|
5895
|
+
properties: {
|
|
5896
|
+
dghwbcfocgv: {
|
|
5897
|
+
"x-uid": "rhc8oxdqglj",
|
|
5898
|
+
_isJSONSchemaObject: true,
|
|
5899
|
+
version: "2.0",
|
|
5900
|
+
type: "void",
|
|
5901
|
+
title: "Edit record",
|
|
5902
|
+
"x-action": "update",
|
|
5903
|
+
"x-designer": "Action.Designer",
|
|
5904
|
+
"x-component": "Action.Link",
|
|
5905
|
+
"x-component-props": {
|
|
5906
|
+
openMode: "drawer",
|
|
5907
|
+
danger: false
|
|
5908
|
+
},
|
|
5909
|
+
"x-decorator": "ACLActionProvider",
|
|
5910
|
+
"x-designer-props": {
|
|
5911
|
+
linkageAction: true
|
|
5912
|
+
},
|
|
5913
|
+
properties: {
|
|
5914
|
+
drawer: {
|
|
5915
|
+
_isJSONSchemaObject: true,
|
|
5916
|
+
version: "2.0",
|
|
5917
|
+
type: "void",
|
|
5918
|
+
title: '{{ t("Edit record") }}',
|
|
5919
|
+
"x-component": "Action.Container",
|
|
5920
|
+
"x-component-props": {
|
|
5921
|
+
className: "nb-action-popup"
|
|
5922
|
+
},
|
|
5923
|
+
properties: {
|
|
5924
|
+
tabs: {
|
|
5925
|
+
_isJSONSchemaObject: true,
|
|
5926
|
+
version: "2.0",
|
|
5927
|
+
type: "void",
|
|
5928
|
+
"x-component": "Tabs",
|
|
5929
|
+
"x-component-props": {},
|
|
5930
|
+
"x-initializer": "TabPaneInitializers",
|
|
5931
|
+
properties: {
|
|
5932
|
+
tab1: {
|
|
5933
|
+
_isJSONSchemaObject: true,
|
|
5934
|
+
version: "2.0",
|
|
5935
|
+
type: "void",
|
|
5936
|
+
title: '{{t("Edit")}}',
|
|
5937
|
+
"x-component": "Tabs.TabPane",
|
|
5938
|
+
"x-designer": "Tabs.Designer",
|
|
5939
|
+
"x-component-props": {},
|
|
5940
|
+
properties: {
|
|
5941
|
+
grid: {
|
|
5942
|
+
_isJSONSchemaObject: true,
|
|
5943
|
+
version: "2.0",
|
|
5944
|
+
type: "void",
|
|
5945
|
+
"x-component": "Grid",
|
|
5946
|
+
"x-initializer": "RecordBlockInitializers",
|
|
5947
|
+
properties: {
|
|
5948
|
+
trny88kf0bk: {
|
|
5949
|
+
_isJSONSchemaObject: true,
|
|
5950
|
+
version: "2.0",
|
|
5951
|
+
type: "void",
|
|
5952
|
+
"x-component": "Grid.Row",
|
|
5953
|
+
properties: {
|
|
5954
|
+
"78r8m6ecsh4": {
|
|
5955
|
+
_isJSONSchemaObject: true,
|
|
5956
|
+
version: "2.0",
|
|
5957
|
+
type: "void",
|
|
5958
|
+
"x-component": "Grid.Col",
|
|
5959
|
+
properties: {
|
|
5960
|
+
lj0yhupvh3o: {
|
|
5961
|
+
_isJSONSchemaObject: true,
|
|
5962
|
+
version: "2.0",
|
|
5963
|
+
type: "void",
|
|
5964
|
+
"x-acl-action-props": {
|
|
5965
|
+
skipScopeCheck: false
|
|
5966
|
+
},
|
|
5967
|
+
"x-acl-action": "subTable:update",
|
|
5968
|
+
"x-decorator": "FormBlockProvider",
|
|
5969
|
+
"x-decorator-props": {
|
|
5970
|
+
useSourceId: "{{ useSourceIdFromParentRecord }}",
|
|
5971
|
+
useParams: "{{ useParamsFromRecord }}",
|
|
5972
|
+
action: "get",
|
|
5973
|
+
resource: "subTable",
|
|
5974
|
+
collection: "subTable"
|
|
5975
|
+
},
|
|
5976
|
+
"x-designer": "FormV2.Designer",
|
|
5977
|
+
"x-component": "CardItem",
|
|
5978
|
+
"x-component-props": {},
|
|
5979
|
+
properties: {
|
|
5980
|
+
"0ykr2ijd1qa": {
|
|
5981
|
+
_isJSONSchemaObject: true,
|
|
5982
|
+
version: "2.0",
|
|
5983
|
+
type: "void",
|
|
5984
|
+
"x-component": "FormV2",
|
|
5985
|
+
"x-component-props": {
|
|
5986
|
+
useProps: "{{ useFormBlockProps }}"
|
|
5987
|
+
},
|
|
5988
|
+
properties: {
|
|
5989
|
+
grid: {
|
|
5990
|
+
_isJSONSchemaObject: true,
|
|
5991
|
+
version: "2.0",
|
|
5992
|
+
type: "void",
|
|
5993
|
+
"x-component": "Grid",
|
|
5994
|
+
"x-initializer": "FormItemInitializers",
|
|
5995
|
+
properties: {
|
|
5996
|
+
"7mwkv9h74ki": {
|
|
5997
|
+
_isJSONSchemaObject: true,
|
|
5998
|
+
version: "2.0",
|
|
5999
|
+
type: "void",
|
|
6000
|
+
"x-component": "Grid.Row",
|
|
6001
|
+
properties: {
|
|
6002
|
+
"0f4fktqpnee": {
|
|
6003
|
+
_isJSONSchemaObject: true,
|
|
6004
|
+
version: "2.0",
|
|
6005
|
+
type: "void",
|
|
6006
|
+
"x-component": "Grid.Col",
|
|
6007
|
+
properties: {
|
|
6008
|
+
manyToMany: {
|
|
6009
|
+
"x-uid": "lclf348ur56",
|
|
6010
|
+
_isJSONSchemaObject: true,
|
|
6011
|
+
version: "2.0",
|
|
6012
|
+
type: "string",
|
|
6013
|
+
"x-designer": "FormItem.Designer",
|
|
6014
|
+
"x-component": "CollectionField",
|
|
6015
|
+
"x-decorator": "FormItem",
|
|
6016
|
+
"x-collection-field": "subTable.manyToMany",
|
|
6017
|
+
"x-component-props": {
|
|
6018
|
+
mode: "SubTable"
|
|
6019
|
+
},
|
|
6020
|
+
properties: {
|
|
6021
|
+
ry6csw9ij4n: {
|
|
6022
|
+
_isJSONSchemaObject: true,
|
|
6023
|
+
version: "2.0",
|
|
6024
|
+
type: "void",
|
|
6025
|
+
"x-component": "AssociationField.SubTable",
|
|
6026
|
+
"x-initializer": "TableColumnInitializers",
|
|
6027
|
+
"x-initializer-props": {
|
|
6028
|
+
action: false
|
|
6029
|
+
},
|
|
6030
|
+
"x-index": 1,
|
|
6031
|
+
properties: {
|
|
6032
|
+
rmz41gp1stq: {
|
|
6033
|
+
_isJSONSchemaObject: true,
|
|
6034
|
+
version: "2.0",
|
|
6035
|
+
type: "void",
|
|
6036
|
+
"x-decorator": "TableV2.Column.Decorator",
|
|
6037
|
+
"x-designer": "TableV2.Column.Designer",
|
|
6038
|
+
"x-component": "TableV2.Column",
|
|
6039
|
+
properties: {
|
|
6040
|
+
singleLineText: {
|
|
6041
|
+
"x-uid": "tlprzxnyyqb",
|
|
6042
|
+
_isJSONSchemaObject: true,
|
|
6043
|
+
version: "2.0",
|
|
6044
|
+
"x-collection-field": "general.singleLineText",
|
|
6045
|
+
"x-component": "CollectionField",
|
|
6046
|
+
"x-component-props": {
|
|
6047
|
+
ellipsis: true
|
|
6048
|
+
},
|
|
6049
|
+
"x-decorator": "FormItem",
|
|
6050
|
+
"x-decorator-props": {
|
|
6051
|
+
labelStyle: {
|
|
6052
|
+
display: "none"
|
|
6053
|
+
}
|
|
6054
|
+
},
|
|
6055
|
+
default: null,
|
|
6056
|
+
"x-async": false,
|
|
6057
|
+
"x-index": 1
|
|
6058
|
+
}
|
|
6059
|
+
},
|
|
6060
|
+
"x-uid": "zmslu38eujy",
|
|
6061
|
+
"x-async": false,
|
|
6062
|
+
"x-index": 1
|
|
6063
|
+
}
|
|
6064
|
+
},
|
|
6065
|
+
"x-uid": "vl5lkem00dr",
|
|
6066
|
+
"x-async": false
|
|
6067
|
+
}
|
|
6068
|
+
},
|
|
6069
|
+
"x-async": false,
|
|
6070
|
+
"x-index": 1
|
|
6071
|
+
}
|
|
6072
|
+
},
|
|
6073
|
+
"x-uid": "gzxknc793se",
|
|
6074
|
+
"x-async": false,
|
|
6075
|
+
"x-index": 1
|
|
6076
|
+
}
|
|
6077
|
+
},
|
|
6078
|
+
"x-uid": "lr63kqkjvgo",
|
|
6079
|
+
"x-async": false,
|
|
6080
|
+
"x-index": 1
|
|
6081
|
+
}
|
|
6082
|
+
},
|
|
6083
|
+
"x-uid": "8iw3zvh7vxd",
|
|
6084
|
+
"x-async": false,
|
|
6085
|
+
"x-index": 1
|
|
6086
|
+
},
|
|
6087
|
+
actions: {
|
|
6088
|
+
_isJSONSchemaObject: true,
|
|
6089
|
+
version: "2.0",
|
|
6090
|
+
type: "void",
|
|
6091
|
+
"x-initializer": "UpdateFormActionInitializers",
|
|
6092
|
+
"x-component": "ActionBar",
|
|
6093
|
+
"x-component-props": {
|
|
6094
|
+
layout: "one-column",
|
|
6095
|
+
style: {
|
|
6096
|
+
marginTop: 24
|
|
6097
|
+
}
|
|
6098
|
+
},
|
|
6099
|
+
"x-uid": "95vrlwf03yk",
|
|
6100
|
+
"x-async": false,
|
|
6101
|
+
"x-index": 2
|
|
6102
|
+
}
|
|
6103
|
+
},
|
|
6104
|
+
"x-uid": "17ju1kwigyw",
|
|
6105
|
+
"x-async": false,
|
|
6106
|
+
"x-index": 1
|
|
6107
|
+
}
|
|
6108
|
+
},
|
|
6109
|
+
"x-uid": "by4uluzexjq",
|
|
6110
|
+
"x-async": false,
|
|
6111
|
+
"x-index": 1
|
|
6112
|
+
}
|
|
6113
|
+
},
|
|
6114
|
+
"x-uid": "nzw5judm7ah",
|
|
6115
|
+
"x-async": false,
|
|
6116
|
+
"x-index": 1
|
|
6117
|
+
}
|
|
6118
|
+
},
|
|
6119
|
+
"x-uid": "keraakujlcb",
|
|
6120
|
+
"x-async": false,
|
|
6121
|
+
"x-index": 1
|
|
6122
|
+
}
|
|
6123
|
+
},
|
|
6124
|
+
"x-uid": "dtc6ufrnn2w",
|
|
6125
|
+
"x-async": false,
|
|
6126
|
+
"x-index": 1
|
|
6127
|
+
}
|
|
6128
|
+
},
|
|
6129
|
+
"x-uid": "kgrdpc9e834",
|
|
6130
|
+
"x-async": false,
|
|
6131
|
+
"x-index": 1
|
|
6132
|
+
}
|
|
6133
|
+
},
|
|
6134
|
+
"x-uid": "h60qmmbj1ez",
|
|
6135
|
+
"x-async": false,
|
|
6136
|
+
"x-index": 1
|
|
6137
|
+
}
|
|
6138
|
+
},
|
|
6139
|
+
"x-uid": "f930il0aqu3",
|
|
6140
|
+
"x-async": false,
|
|
6141
|
+
"x-index": 1
|
|
6142
|
+
}
|
|
6143
|
+
},
|
|
6144
|
+
"x-async": false,
|
|
6145
|
+
"x-index": 2
|
|
6146
|
+
}
|
|
6147
|
+
},
|
|
6148
|
+
"x-uid": "gb81ougszo2",
|
|
6149
|
+
"x-async": false,
|
|
6150
|
+
"x-index": 1
|
|
6151
|
+
}
|
|
6152
|
+
},
|
|
6153
|
+
"x-uid": "aa33l45v6qb",
|
|
6154
|
+
"x-async": false,
|
|
6155
|
+
"x-index": 1
|
|
6156
|
+
}
|
|
6157
|
+
},
|
|
6158
|
+
"x-uid": "lm8sj8ojma9",
|
|
6159
|
+
"x-async": false,
|
|
6160
|
+
"x-index": 2
|
|
6161
|
+
}
|
|
6162
|
+
},
|
|
6163
|
+
"x-uid": "z5n8ihuvx64",
|
|
6164
|
+
"x-async": false,
|
|
6165
|
+
"x-index": 1
|
|
6166
|
+
}
|
|
6167
|
+
},
|
|
6168
|
+
"x-uid": "snt3mrh4ug9",
|
|
6169
|
+
"x-async": false,
|
|
6170
|
+
"x-index": 1
|
|
6171
|
+
}
|
|
6172
|
+
},
|
|
6173
|
+
"x-uid": "kzi69u1gb24",
|
|
6174
|
+
"x-async": false,
|
|
6175
|
+
"x-index": 1
|
|
6176
|
+
}
|
|
6177
|
+
},
|
|
6178
|
+
"x-uid": "hbmkoataojj",
|
|
6179
|
+
"x-async": false,
|
|
6180
|
+
"x-index": 1
|
|
6181
|
+
}
|
|
6182
|
+
},
|
|
6183
|
+
"x-uid": "sfa1nw7kqmi",
|
|
6184
|
+
"x-async": true,
|
|
6185
|
+
"x-index": 1
|
|
6186
|
+
}
|
|
6187
|
+
};
|
|
5779
6188
|
const oneTableBlockWithAddNewAndViewAndEditAndChoicesFields = {
|
|
5780
6189
|
collections: import_templatesOfCollection.generalWithChoices,
|
|
5781
6190
|
pageSchema: {
|
|
@@ -18600,6 +19009,7 @@ const checkboxForTableRow = {
|
|
|
18600
19009
|
oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields,
|
|
18601
19010
|
oneTableBlockWithAddNewAndViewAndEditAndAssociationFields,
|
|
18602
19011
|
oneTableBlockWithAddNewAndViewAndEditAndBasicFields,
|
|
19012
|
+
oneTableBlockWithAddNewAndViewAndEditAndBasicFieldsAndSubTable,
|
|
18603
19013
|
oneTableBlockWithAddNewAndViewAndEditAndChoicesFields,
|
|
18604
19014
|
oneTableBlockWithAddNewAndViewAndEditAndDatetimeFields,
|
|
18605
19015
|
oneTableBlockWithAddNewAndViewAndEditAndMediaFields,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/test",
|
|
3
|
-
"version": "0.18.0-alpha.
|
|
3
|
+
"version": "0.18.0-alpha.9",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "./src/index.ts",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@faker-js/faker": "8.1.0",
|
|
43
|
-
"@nocobase/server": "0.18.0-alpha.
|
|
43
|
+
"@nocobase/server": "0.18.0-alpha.9",
|
|
44
44
|
"@playwright/test": "^1.40.1",
|
|
45
45
|
"@testing-library/react": "^14.0.0",
|
|
46
46
|
"@testing-library/user-event": "^14.4.3",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"vitest-dom": "^0.1.1",
|
|
61
61
|
"ws": "^8.13.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "34ca0df4eede2e83fc86297b0fe19eba970e2b1b"
|
|
64
64
|
}
|
package/vitest.mjs
CHANGED
|
@@ -23,10 +23,16 @@ function tsConfigPathsToAlias() {
|
|
|
23
23
|
}
|
|
24
24
|
return acc;
|
|
25
25
|
}, []);
|
|
26
|
-
alias.unshift(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
alias.unshift(
|
|
27
|
+
{
|
|
28
|
+
find: '@nocobase/utils/plugin-symlink',
|
|
29
|
+
replacement: 'node_modules/@nocobase/utils/plugin-symlink.js',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
find: '@opentelemetry/resources',
|
|
33
|
+
replacement: 'node_modules/@opentelemetry/resources/build/src/index.js',
|
|
34
|
+
},
|
|
35
|
+
);
|
|
30
36
|
return [
|
|
31
37
|
{ find: /^~antd\/(.*)/, replacement: 'antd/$1' },
|
|
32
38
|
...alias.map((item) => {
|
|
@@ -42,70 +48,70 @@ export const defineConfig = (config = {}) => {
|
|
|
42
48
|
return vitestConfig(
|
|
43
49
|
process.env.TEST_ENV === 'server-side'
|
|
44
50
|
? {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
51
|
+
root: process.cwd(),
|
|
52
|
+
resolve: {
|
|
53
|
+
mainFields: ['module'],
|
|
54
|
+
},
|
|
55
|
+
test: {
|
|
56
|
+
globals: true,
|
|
57
|
+
setupFiles: resolve(__dirname, './setup/server.ts'),
|
|
58
|
+
alias: tsConfigPathsToAlias(),
|
|
59
|
+
include: ['packages/**/__tests__/**/*.test.ts'],
|
|
60
|
+
exclude: [
|
|
61
|
+
'**/node_modules/**',
|
|
62
|
+
'**/dist/**',
|
|
63
|
+
'**/lib/**',
|
|
64
|
+
'**/es/**',
|
|
65
|
+
'**/e2e/**',
|
|
66
|
+
'**/__e2e__/**',
|
|
67
|
+
'**/{vitest,commitlint}.config.*',
|
|
68
|
+
'packages/**/{dumi-theme-nocobase,sdk,client}/**/__tests__/**/*.{test,spec}.{ts,tsx}',
|
|
69
|
+
],
|
|
70
|
+
testTimeout: 300000,
|
|
71
|
+
bail: 1,
|
|
72
|
+
// 在 GitHub Actions 中不输出日志
|
|
73
|
+
silent: !!process.env.GITHUB_ACTIONS,
|
|
74
|
+
// poolOptions: {
|
|
75
|
+
// threads: {
|
|
76
|
+
// singleThread: process.env.SINGLE_THREAD == 'false' ? false : true,
|
|
77
|
+
// },
|
|
78
|
+
// },
|
|
79
|
+
},
|
|
80
|
+
}
|
|
75
81
|
: {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
},
|
|
82
|
+
plugins: [react()],
|
|
83
|
+
resolve: {
|
|
84
|
+
mainFields: ['module'],
|
|
85
|
+
},
|
|
86
|
+
define: {
|
|
87
|
+
'process.env.__TEST__': true,
|
|
88
|
+
'process.env.__E2E__': false,
|
|
89
|
+
},
|
|
90
|
+
test: {
|
|
91
|
+
globals: true,
|
|
92
|
+
setupFiles: resolve(__dirname, './setup/client.ts'),
|
|
93
|
+
environment: 'jsdom',
|
|
94
|
+
css: false,
|
|
95
|
+
alias: tsConfigPathsToAlias(),
|
|
96
|
+
include: ['packages/**/{dumi-theme-nocobase,sdk,client}/**/__tests__/**/*.{test,spec}.{ts,tsx}'],
|
|
97
|
+
exclude: [
|
|
98
|
+
'**/node_modules/**',
|
|
99
|
+
'**/dist/**',
|
|
100
|
+
'**/lib/**',
|
|
101
|
+
'**/es/**',
|
|
102
|
+
'**/e2e/**',
|
|
103
|
+
'**/__e2e__/**',
|
|
104
|
+
'**/{vitest,commitlint}.config.*',
|
|
105
|
+
],
|
|
106
|
+
testTimeout: 300000,
|
|
107
|
+
// 在 GitHub Actions 中不输出日志
|
|
108
|
+
silent: !!process.env.GITHUB_ACTIONS,
|
|
109
|
+
server: {
|
|
110
|
+
deps: {
|
|
111
|
+
inline: ['@juggle/resize-observer', 'clsx'],
|
|
107
112
|
},
|
|
108
113
|
},
|
|
109
114
|
},
|
|
115
|
+
},
|
|
110
116
|
);
|
|
111
117
|
};
|