@cubejs-backend/testing 1.2.24 → 1.2.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.
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
cube(`Orders`, {
|
|
2
2
|
sql: `
|
|
3
|
-
select id, amount, status from (
|
|
4
|
-
select 1 as id, 100 as amount, 'new' status
|
|
3
|
+
select id, amount, status, created_at, is_paid from (
|
|
4
|
+
select 1 as id, 100 as amount, 'new' status, TIMESTAMPTZ '2020-01-01 00:00:00' created_at, TRUE as is_paid
|
|
5
5
|
UNION ALL
|
|
6
|
-
select 2 as id, 200 as amount, 'new' status
|
|
6
|
+
select 2 as id, 200 as amount, 'new' status, TIMESTAMPTZ '2020-01-02 00:00:00' created_at, TRUE as is_paid
|
|
7
7
|
UNION ALL
|
|
8
|
-
select 3 as id, 300 as amount, 'processed' status
|
|
8
|
+
select 3 as id, 300 as amount, 'processed' status, TIMESTAMPTZ '2020-01-03 00:00:00' created_at, TRUE as is_paid
|
|
9
9
|
UNION ALL
|
|
10
|
-
select 4 as id, 500 as amount, 'processed' status
|
|
10
|
+
select 4 as id, 500 as amount, 'processed' status, TIMESTAMPTZ '2020-01-04 00:00:00' created_at, FALSE as is_paid
|
|
11
11
|
UNION ALL
|
|
12
|
-
select 5 as id, 600 as amount, 'shipped' status
|
|
12
|
+
select 5 as id, 600 as amount, 'shipped' status, TIMESTAMPTZ '2020-01-05 00:00:00' created_at, FALSE as is_paid
|
|
13
13
|
)
|
|
14
14
|
`,
|
|
15
15
|
measures: {
|
|
@@ -20,6 +20,26 @@ cube(`Orders`, {
|
|
|
20
20
|
sql: `amount`,
|
|
21
21
|
type: `sum`,
|
|
22
22
|
},
|
|
23
|
+
avgAmount: {
|
|
24
|
+
sql: `amount`,
|
|
25
|
+
type: `avg`,
|
|
26
|
+
},
|
|
27
|
+
statusList: {
|
|
28
|
+
sql: `status`,
|
|
29
|
+
type: `string`,
|
|
30
|
+
},
|
|
31
|
+
lastStatus: {
|
|
32
|
+
sql: `MAX(status)`,
|
|
33
|
+
type: `string`,
|
|
34
|
+
},
|
|
35
|
+
hasUnpaidOrders: {
|
|
36
|
+
sql: `BOOL_OR(NOT is_paid)`,
|
|
37
|
+
type: `boolean`,
|
|
38
|
+
},
|
|
39
|
+
maxCreatedAt: {
|
|
40
|
+
sql: `MAX(created_at)`,
|
|
41
|
+
type: `time`,
|
|
42
|
+
},
|
|
23
43
|
toRemove: {
|
|
24
44
|
type: `count`,
|
|
25
45
|
},
|
|
@@ -29,5 +49,17 @@ cube(`Orders`, {
|
|
|
29
49
|
sql: `status`,
|
|
30
50
|
type: `string`,
|
|
31
51
|
},
|
|
52
|
+
amount: {
|
|
53
|
+
sql: `amount`,
|
|
54
|
+
type: `number`,
|
|
55
|
+
},
|
|
56
|
+
isPaid: {
|
|
57
|
+
sql: `is_paid`,
|
|
58
|
+
type: `boolean`,
|
|
59
|
+
},
|
|
60
|
+
createdAt: {
|
|
61
|
+
sql: `created_at`,
|
|
62
|
+
type: `time`,
|
|
63
|
+
},
|
|
32
64
|
},
|
|
33
65
|
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
cube('unusualDataTypes', {
|
|
2
|
+
sql: `SELECT
|
|
3
|
+
1 AS id,
|
|
4
|
+
100 AS amount,
|
|
5
|
+
'new' AS status,
|
|
6
|
+
'{"key": "value1", "number": 42}'::json AS json_column,
|
|
7
|
+
'{"key": "value1", "number": 42}'::jsonb AS jsonb_column,
|
|
8
|
+
ARRAY[1, 2, 3] AS array_column,
|
|
9
|
+
'11:22:33:44:55:66'::macaddr AS mac_address,
|
|
10
|
+
'192.168.0.1'::inet AS inet_column,
|
|
11
|
+
'192.168.0.0/24'::cidr AS cidr_column,
|
|
12
|
+
't'::boolean AS boolean_column,
|
|
13
|
+
'Hello, world!'::text AS text_column,
|
|
14
|
+
'1.0, 1.0'::point AS point_column,
|
|
15
|
+
'11111111'::bit(8) AS bit_column,
|
|
16
|
+
'<root><child>data</child></root>'::xml AS xml_column
|
|
17
|
+
UNION ALL
|
|
18
|
+
SELECT
|
|
19
|
+
2 AS id,
|
|
20
|
+
200 AS amount,
|
|
21
|
+
'new' AS status,
|
|
22
|
+
'{"key": "value2", "number": 84}'::json AS json_column,
|
|
23
|
+
'{"key": "value2", "number": 84}'::jsonb AS jsonb_column,
|
|
24
|
+
ARRAY[4, 5, 6] AS array_column,
|
|
25
|
+
'00:11:22:33:44:55'::macaddr AS mac_address,
|
|
26
|
+
'192.168.0.2'::inet AS inet_column,
|
|
27
|
+
'192.168.0.0/24'::cidr AS cidr_column,
|
|
28
|
+
'f'::boolean AS boolean_column,
|
|
29
|
+
'Goodbye, world!'::text AS text_column,
|
|
30
|
+
'2.0, 2.0'::point AS point_column,
|
|
31
|
+
'00000001'::bit(8) AS bit_column,
|
|
32
|
+
'<root><child>more data</child></root>'::xml AS xml_column
|
|
33
|
+
UNION ALL
|
|
34
|
+
SELECT
|
|
35
|
+
3 AS id,
|
|
36
|
+
300 AS amount,
|
|
37
|
+
'processed' AS status,
|
|
38
|
+
'{"key": "value3", "number": 168}'::json AS json_column,
|
|
39
|
+
'{"key": "value3", "number": 168}'::jsonb AS jsonb_column,
|
|
40
|
+
ARRAY[7, 8, 9] AS array_column,
|
|
41
|
+
'22:33:44:55:66:77'::macaddr AS mac_address,
|
|
42
|
+
'192.168.0.3'::inet AS inet_column,
|
|
43
|
+
'192.168.0.0/24'::cidr AS cidr_column,
|
|
44
|
+
't'::boolean AS boolean_column,
|
|
45
|
+
'PostgreSQL is awesome!'::text AS text_column,
|
|
46
|
+
'3.0, 3.0'::point AS point_column,
|
|
47
|
+
'11110000'::bit(8) AS bit_column,
|
|
48
|
+
'<root><child>even more data</child></root>'::xml AS xml_column`,
|
|
49
|
+
measures: {
|
|
50
|
+
count: { type: 'count' },
|
|
51
|
+
total_amount: { type: 'sum', sql: 'amount' }
|
|
52
|
+
},
|
|
53
|
+
dimensions: {
|
|
54
|
+
id: { type: 'number', sql: 'id', primaryKey: true },
|
|
55
|
+
status: { type: 'string', sql: 'status' },
|
|
56
|
+
json: { type: 'string', sql: 'json_column' },
|
|
57
|
+
jsonb: { type: 'string', sql: 'jsonb_column' },
|
|
58
|
+
array: { type: 'string', sql: 'array_column' },
|
|
59
|
+
mac_address: { type: 'string', sql: 'mac_address' },
|
|
60
|
+
inet_column: { type: 'string', sql: 'inet_column' },
|
|
61
|
+
cidr_column: { type: 'string', sql: 'cidr_column' },
|
|
62
|
+
boolean_column: { type: 'string', sql: 'boolean_column' },
|
|
63
|
+
text_column: { type: 'string', sql: 'text_column' },
|
|
64
|
+
point_column: { type: 'string', sql: 'point_column' },
|
|
65
|
+
bit_column: { type: 'string', sql: 'bit_column' },
|
|
66
|
+
xml_column: { type: 'string', sql: 'xml_column' },
|
|
67
|
+
}
|
|
68
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cubejs-backend/testing",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.25",
|
|
4
4
|
"description": "Cube.js e2e tests",
|
|
5
5
|
"author": "Cube Dev, Inc.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -94,15 +94,15 @@
|
|
|
94
94
|
"birdbox-fixtures"
|
|
95
95
|
],
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@cubejs-backend/cubestore-driver": "1.2.
|
|
97
|
+
"@cubejs-backend/cubestore-driver": "1.2.25",
|
|
98
98
|
"@cubejs-backend/dotenv": "^9.0.2",
|
|
99
|
-
"@cubejs-backend/ksql-driver": "1.2.
|
|
100
|
-
"@cubejs-backend/postgres-driver": "1.2.
|
|
101
|
-
"@cubejs-backend/query-orchestrator": "1.2.
|
|
102
|
-
"@cubejs-backend/schema-compiler": "1.2.
|
|
103
|
-
"@cubejs-backend/shared": "1.2.
|
|
104
|
-
"@cubejs-backend/testing-shared": "1.2.
|
|
105
|
-
"@cubejs-client/ws-transport": "1.2.
|
|
99
|
+
"@cubejs-backend/ksql-driver": "1.2.25",
|
|
100
|
+
"@cubejs-backend/postgres-driver": "1.2.25",
|
|
101
|
+
"@cubejs-backend/query-orchestrator": "1.2.25",
|
|
102
|
+
"@cubejs-backend/schema-compiler": "1.2.25",
|
|
103
|
+
"@cubejs-backend/shared": "1.2.25",
|
|
104
|
+
"@cubejs-backend/testing-shared": "1.2.25",
|
|
105
|
+
"@cubejs-client/ws-transport": "1.2.25",
|
|
106
106
|
"dedent": "^0.7.0",
|
|
107
107
|
"fs-extra": "^8.1.0",
|
|
108
108
|
"http-proxy": "^1.18.1",
|
|
@@ -113,8 +113,8 @@
|
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"@4tw/cypress-drag-drop": "^1.6.0",
|
|
116
|
-
"@cubejs-backend/linter": "1.2.
|
|
117
|
-
"@cubejs-client/core": "1.2.
|
|
116
|
+
"@cubejs-backend/linter": "1.2.25",
|
|
117
|
+
"@cubejs-client/core": "1.2.25",
|
|
118
118
|
"@jest/globals": "^27",
|
|
119
119
|
"@types/dedent": "^0.7.0",
|
|
120
120
|
"@types/http-proxy": "^1.17.5",
|
|
@@ -150,5 +150,5 @@
|
|
|
150
150
|
"eslintConfig": {
|
|
151
151
|
"extends": "../cubejs-linter"
|
|
152
152
|
},
|
|
153
|
-
"gitHead": "
|
|
153
|
+
"gitHead": "a93ae853dfea6b8a863e3250d03954dc87b6aacb"
|
|
154
154
|
}
|