Skip to content

Commit 96d5701

Browse files
committed
test: add a test for locales in declarative api
jira: CQ-1650 risk: nonprod
1 parent a14d5dd commit 96d5701

File tree

39 files changed

+4138
-714
lines changed

39 files changed

+4138
-714
lines changed

packages/gooddata-sdk/tests/catalog/expected/declarative_workspaces.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2544,6 +2544,13 @@
25442544
"id": "geo__state__location",
25452545
"sourceColumn": "geo__state__location",
25462546
"sourceColumnDataType": "STRING",
2547+
"locale": "en-US",
2548+
"translations": [
2549+
{
2550+
"locale": "cs-CZ",
2551+
"sourceColumn": "geo__state__location_cz"
2552+
}
2553+
],
25472554
"tags": [
25482555
"Customers"
25492556
],

packages/gooddata-sdk/tests/catalog/expected/declarative_workspaces_snake_case.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,13 @@
209209
"source_column": "geo__state__location",
210210
"source_column_data_type": "STRING",
211211
"description": "Location",
212+
"locale": "en-US",
213+
"translations": [
214+
{
215+
"locale": "cs-CZ",
216+
"source_column": "geo__state__location_cz"
217+
}
218+
],
212219
"tags": [
213220
"Customers"
214221
],

packages/gooddata-sdk/tests/catalog/fixtures/workspace_content/demo_load_and_modify_ds_and_put_declarative_ldm.yaml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ interactions:
5050
to access it.
5151
status: 404
5252
title: Not Found
53-
traceId: 36c549e39476e48493c4db0e42c3f6c5
53+
traceId: fc8ec219f07d5e33fd5dab16a2297561
5454
- request:
5555
method: POST
5656
uri: http://localhost:3000/api/v1/entities/workspaces
@@ -134,7 +134,7 @@ interactions:
134134
Cache-Control:
135135
- no-cache, no-store, max-age=0, must-revalidate
136136
Content-Length:
137-
- '6211'
137+
- '6305'
138138
Content-Type:
139139
- application/json
140140
DATE: *id001
@@ -296,11 +296,15 @@ interactions:
296296
labels:
297297
- description: Location
298298
id: geo__state__location
299+
locale: en-US
299300
sourceColumn: geo__state__location
300301
sourceColumnDataType: STRING
301302
tags:
302303
- Customers
303304
title: Location
305+
translations:
306+
- locale: cs-CZ
307+
sourceColumn: geo__state__location_cz
304308
valueType: GEO
305309
sourceColumn: state
306310
sourceColumnDataType: STRING
@@ -511,7 +515,7 @@ interactions:
511515
Cache-Control:
512516
- no-cache, no-store, max-age=0, must-revalidate
513517
Content-Length:
514-
- '490'
518+
- '491'
515519
Content-Type:
516520
- application/vnd.gooddata.api+json
517521
DATE: *id001
@@ -542,7 +546,7 @@ interactions:
542546
- id: demo-test-ds
543547
type: dataSource
544548
attributes:
545-
url: jdbc:postgresql://postgres:5432/demo?sslmode=prefer
549+
url: jdbc:postgresql://localhost:5432/demo?sslmode=prefer
546550
username: demouser
547551
authenticationType: USERNAME_PASSWORD
548552
name: demo-test-ds
@@ -703,6 +707,10 @@ interactions:
703707
tags:
704708
- Customers
705709
valueType: GEO
710+
locale: en-US
711+
translations:
712+
- locale: cs-CZ
713+
sourceColumn: geo__state__location_cz
706714
sourceColumn: state
707715
title: State
708716
sourceColumnDataType: STRING
@@ -941,7 +949,7 @@ interactions:
941949
Cache-Control:
942950
- no-cache, no-store, max-age=0, must-revalidate
943951
Content-Length:
944-
- '490'
952+
- '491'
945953
Content-Type:
946954
- application/vnd.gooddata.api+json
947955
DATE: *id001
@@ -972,7 +980,7 @@ interactions:
972980
- id: demo-test-ds
973981
type: dataSource
974982
attributes:
975-
url: jdbc:postgresql://postgres:5432/demo?sslmode=prefer
983+
url: jdbc:postgresql://localhost:5432/demo?sslmode=prefer
976984
username: demouser
977985
authenticationType: USERNAME_PASSWORD
978986
name: demo-test-ds
@@ -1133,6 +1141,10 @@ interactions:
11331141
tags:
11341142
- Customers
11351143
valueType: GEO
1144+
locale: en-US
1145+
translations:
1146+
- locale: cs-CZ
1147+
sourceColumn: geo__state__location_cz
11361148
sourceColumn: state
11371149
title: State
11381150
sourceColumnDataType: STRING
@@ -1371,7 +1383,7 @@ interactions:
13711383
Cache-Control:
13721384
- no-cache, no-store, max-age=0, must-revalidate
13731385
Content-Length:
1374-
- '6053'
1386+
- '6147'
13751387
Content-Type:
13761388
- application/json
13771389
DATE: *id001
@@ -1533,11 +1545,15 @@ interactions:
15331545
labels:
15341546
- description: Location
15351547
id: geo__state__location
1548+
locale: en-US
15361549
sourceColumn: geo__state__location
15371550
sourceColumnDataType: STRING
15381551
tags:
15391552
- Customers
15401553
title: Location
1554+
translations:
1555+
- locale: cs-CZ
1556+
sourceColumn: geo__state__location_cz
15411557
valueType: GEO
15421558
sourceColumn: state
15431559
sourceColumnDataType: STRING
@@ -3233,6 +3249,10 @@ interactions:
32333249
title: Location
32343250
description: Location
32353251
sourceColumnDataType: STRING
3252+
locale: en-US
3253+
translations:
3254+
- locale: cs-CZ
3255+
sourceColumn: geo__state__location_cz
32363256
tags:
32373257
- Customers
32383258
valueType: GEO

packages/gooddata-sdk/tests/catalog/fixtures/workspace_content/demo_load_and_put_declarative_analytics_model.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ interactions:
5050
to access it.
5151
status: 404
5252
title: Not Found
53-
traceId: 84f4d50c44983a2d6ff16397e2ec7d78
53+
traceId: ef5e8c1ddc3765f8e271f01dac8f51e1
5454
- request:
5555
method: POST
5656
uri: http://localhost:3000/api/v1/entities/workspaces
@@ -134,7 +134,7 @@ interactions:
134134
Cache-Control:
135135
- no-cache, no-store, max-age=0, must-revalidate
136136
Content-Length:
137-
- '6211'
137+
- '6305'
138138
Content-Type:
139139
- application/json
140140
DATE: *id001
@@ -296,11 +296,15 @@ interactions:
296296
labels:
297297
- description: Location
298298
id: geo__state__location
299+
locale: en-US
299300
sourceColumn: geo__state__location
300301
sourceColumnDataType: STRING
301302
tags:
302303
- Customers
303304
title: Location
305+
translations:
306+
- locale: cs-CZ
307+
sourceColumn: geo__state__location_cz
304308
valueType: GEO
305309
sourceColumn: state
306310
sourceColumnDataType: STRING
@@ -640,6 +644,10 @@ interactions:
640644
tags:
641645
- Customers
642646
valueType: GEO
647+
locale: en-US
648+
translations:
649+
- locale: cs-CZ
650+
sourceColumn: geo__state__location_cz
643651
sourceColumn: state
644652
title: State
645653
sourceColumnDataType: STRING
@@ -6565,6 +6573,10 @@ interactions:
65656573
title: Location
65666574
description: Location
65676575
sourceColumnDataType: STRING
6576+
locale: en-US
6577+
translations:
6578+
- locale: cs-CZ
6579+
sourceColumn: geo__state__location_cz
65686580
tags:
65696581
- Customers
65706582
valueType: GEO

0 commit comments

Comments
 (0)