fix(workspace): show member emails (#2393)

Co-authored-by: dadachann <185672915+dadachann@users.noreply.github.com>
This commit is contained in:
Hyu
2026-08-04 11:48:43 +08:00
committed by GitHub
parent e263a5d1d7
commit 7820949d3a
8 changed files with 189 additions and 12 deletions
@@ -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>/,
);
});