From 656b60d07a8b5a2c4bc576a0ea5a7f232818b640 Mon Sep 17 00:00:00 2001 From: Ray <19767256+GithubArray@users.noreply.github.com> Date: Wed, 11 Mar 2026 14:54:00 -0400 Subject: [PATCH] feat: update mgodatagen template configuration with more data type and index examples --- internal/web/tests/02-run.spec.ts | 61 +++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 3 deletions(-) diff --git a/internal/web/tests/02-run.spec.ts b/internal/web/tests/02-run.spec.ts index f4df1c2..2e222c5 100644 --- a/internal/web/tests/02-run.spec.ts +++ b/internal/web/tests/02-run.spec.ts @@ -263,14 +263,69 @@ test('test mgodatagen template', async ({ page }) => { await expectEditorContent('config', `[ { "collection": "collection", - "count": 10, + "count": 3, "content": { - "key": { + "enum": { + "type": "enum", + "values": [ + "abc", + "xyz", + "123" + ] + }, + "int": { "type": "int", "min": 0, "max": 10 + }, + "coordinates": { + "type": "enum", + "values": [ + { + "coordinates": [ + 53.23, + 67.12 + ], + "type": "Point" + }, + { + "coordinates": [ + 54.23, + 67.12 + ], + "type": "Point" + }, + { + "coordinates": [ + 51.23, + 64.12 + ], + "type": "Point" + } + ] } - } + }, + "indexes": [ + { + "name": "single_idx", + "key": { + "enum": 1 + } + }, + { + "name": "compund_idx", + "key": { + "enum": -1, + "int": -1 + } + }, + { + "name": "2dsphere_idx", + "key": { + "coordinates": "2dsphere" + } + } + ] } ]`)