mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-09 04:40:57 +00:00
fix(workspace): show member emails (#2393)
Co-authored-by: dadachann <185672915+dadachann@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import test from 'node:test';
|
||||
|
||||
const panelSource = await readFile(
|
||||
new URL(
|
||||
'../../src/app/home/components/workspace-settings/WorkspaceSettingsPanel.tsx',
|
||||
import.meta.url,
|
||||
),
|
||||
'utf8',
|
||||
);
|
||||
const entitySource = await readFile(
|
||||
new URL('../../src/app/infra/entities/workspace.ts', import.meta.url),
|
||||
'utf8',
|
||||
);
|
||||
|
||||
test('workspace member rows show display name, email, and role', () => {
|
||||
assert.match(entitySource, /display_name:\s*string/);
|
||||
assert.match(panelSource, /\{member\.display_name\}/);
|
||||
assert.match(
|
||||
panelSource,
|
||||
/<ItemDescription[^>]*>[\s\S]*?\{member\.email\}[\s\S]*?workspace\.roles\.\$\{member\.role\}[\s\S]*?<\/ItemDescription>/,
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user