sync: update from private repo (d3780b00)
CI / build-and-test (push) Failing after 6m23s

This commit is contained in:
oss-sync
2026-07-09 00:12:24 +00:00
parent e8d38a104d
commit d41ff0f658
56 changed files with 1687 additions and 117 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ async function createAndOpenCaseSpace(page: Page, label: string) {
await expect(titleInput).toBeVisible();
const caseTitle = `${label}-${Date.now()}`;
await titleInput.fill(caseTitle);
await page.getByTestId('create-space-submit').click();
await page.getByTestId('space-form-submit').click();
await expect(titleInput).toHaveCount(0);
const caseRow = rail
+33 -40
View File
@@ -59,7 +59,7 @@ async function createAndOpenCaseSpace(page: Page, label: string) {
await expect(titleInput).toBeVisible();
const caseTitle = `${label}-${Date.now()}`;
await titleInput.fill(caseTitle);
await page.getByTestId('create-space-submit').click();
await page.getByTestId('space-form-submit').click();
await expect(titleInput).toHaveCount(0);
const caseRow = rail
@@ -190,7 +190,7 @@ test('spaces foundation: rail, create case space, open detail tabs', async ({ pa
const caseTitle = `E2E案件-${Date.now()}`;
await titleInput.fill(caseTitle);
await page.getByTestId('create-space-submit').click();
await page.getByTestId('space-form-submit').click();
// 5. The new case space appears in the rail (and dialog closes).
await expect(titleInput).toHaveCount(0);
@@ -242,7 +242,7 @@ test('spaces mobile: rail <-> detail switch with back control at 390px', async (
await expect(titleInput).toBeVisible();
const caseTitle = `E2Eモバイル-${Date.now()}`;
await titleInput.fill(caseTitle);
await page.getByTestId('create-space-submit').click();
await page.getByTestId('space-form-submit').click();
await expect(titleInput).toHaveCount(0);
// A space is open: detail is now the visible full-width view, rail is hidden,
@@ -301,7 +301,7 @@ test('space inline chat: create + open conversation without leaving for Tasks',
await expect(titleInput).toBeVisible();
const caseTitle = `E2E会話-${Date.now()}`;
await titleInput.fill(caseTitle);
await page.getByTestId('create-space-submit').click();
await page.getByTestId('space-form-submit').click();
await expect(titleInput).toHaveCount(0);
const caseRow = rail
@@ -433,7 +433,7 @@ test('space files: icon grid, upload appears as tile, click opens preview modal'
await expect(titleInput).toBeVisible();
const caseTitle = `E2Eファイル-${Date.now()}`;
await titleInput.fill(caseTitle);
await page.getByTestId('create-space-submit').click();
await page.getByTestId('space-form-submit').click();
await expect(titleInput).toHaveCount(0);
const caseRow = rail
@@ -617,7 +617,7 @@ test('space output link: chat output-path link opens preview modal', async ({ pa
await expect(titleInput).toBeVisible();
const caseTitle = `E2Eリンク-${Date.now()}`;
await titleInput.fill(caseTitle);
await page.getByTestId('create-space-submit').click();
await page.getByTestId('space-form-submit').click();
await expect(titleInput).toHaveCount(0);
const caseRow = rail
@@ -724,7 +724,7 @@ test('space chat tabs: single in-place tab bar, overview in place, back to chat'
await expect(titleInput).toBeVisible();
const caseTitle = `E2Eタブ-${Date.now()}`;
await titleInput.fill(caseTitle);
await page.getByTestId('create-space-submit').click();
await page.getByTestId('space-form-submit').click();
await expect(titleInput).toHaveCount(0);
const caseRow = rail
@@ -839,7 +839,7 @@ test('space settings tab: AGENTS.md per-space persistence + MCP/SSH panels rende
await expect(titleInput).toBeVisible();
const caseTitle = `E2E設定-${Date.now()}`;
await titleInput.fill(caseTitle);
await page.getByTestId('create-space-submit').click();
await page.getByTestId('space-form-submit').click();
await expect(titleInput).toHaveCount(0);
const caseRow = rail
@@ -1292,46 +1292,39 @@ test('space chat CONTINUE: button gated on terminal job; opens ContinueWithPiece
expect(fatalErrors, `fatal errors:\n${fatalErrors.join('\n')}`).toEqual([]);
});
// 5. VISIBILITY — the toolbar visibility <select> (data-testid="space-chat-visibility")
// drives updateLocalTask({ visibility }). Changing it to "public" persists;
// after a full reload + reselecting the chat, the select retains "public".
// ("org" is intentionally NOT used here: the server rejects org visibility
// (400) unless the user belongs to the scoped org, and the no-auth synthetic
// local user has no orgs — so "public" is the env-appropriate persistence
// proof. The org branch is covered by backend visibility tests.)
test('space chat VISIBILITY: change to public persists across reload', async ({ page }) => {
// 5. VISIBILITY — space chats have a FIXED scope: always visible to the space's
// members, never user-selectable. The visibility <select> was removed when the
// scope became fixed, and the static note chip that replaced it was removed in
// PR #780 (the scope is documented in help instead). This test guards that no
// visibility control sneaks back into the conversation toolbar, while the
// action buttons that DO belong there (share / delete) stay present — so the
// assertion can't pass vacuously on a broken/empty toolbar. The auth-mode twin
// of this guard lives in ui/e2e-auth/sharing-scope.auth.spec.ts. (History:
// issue #782 — the old "change to public persists" test referenced the removed
// testid and had been silently dead since the selector was retired.)
test('space chat VISIBILITY: no visibility control (fixed member-only scope)', async ({ page }) => {
const fatalErrors = trackFatalErrors(page);
const { detail, spaceId } = await createAndOpenCaseSpace(page, 'E2E可視性');
const { conversation, taskId } = await startInlineChat(
await createAndOpenCaseSpace(page, 'E2E可視性');
const { conversation } = await startInlineChat(
page,
'E2E: 可視性テスト用チャット。最初のメッセージ。',
);
const visibility = conversation.getByTestId('space-chat-visibility');
await expect(visibility).toBeVisible();
await expect(visibility).toHaveValue('private');
// Positive anchor first: the toolbar actions are rendered, so the negative
// assertions below are checked against a live, non-empty conversation UI.
await expect(conversation.getByTestId('space-chat-share')).toBeVisible();
await expect(conversation.getByTestId('space-chat-delete')).toBeVisible();
// Wait for the PATCH so we don't assert before the server commits the change.
// (updateLocalTask uses PATCH /api/local/tasks/:id.)
const patchPromise = page.waitForResponse(
(r) => new RegExp(`/api/local/tasks/${taskId}$`).test(r.url()) && r.request().method() === 'PATCH',
);
await visibility.selectOption('public');
const patchRes = await patchPromise;
expect(patchRes.status()).toBe(200);
await expect(visibility).toHaveValue('public');
// No visibility selector, no visibility note — scope is fixed and implicit.
await expect(conversation.getByTestId('space-chat-visibility')).toHaveCount(0);
await expect(conversation.getByTestId('space-chat-visibility-note')).toHaveCount(0);
// Reload, reopen the same space + chat via URL state (space= selects the space,
// chat= opens the inline conversation), and assert the select retained public
// (proves server-side persistence, not just local component state).
await page.goto(`/ui?page=spaces&space=${spaceId}&chat=${taskId}`);
await expect(detail).toBeVisible();
const visibilityAfter = page.getByTestId('space-conversation').getByTestId('space-chat-visibility');
await expect(visibilityAfter).toBeVisible({ timeout: 15_000 });
await expect(visibilityAfter).toHaveValue('public', { timeout: 15_000 });
await expect(page).toHaveURL(/[?&]page=spaces(&|$)/);
// Still on the spaces view with the chat selected. The current URL scheme
// carries space= + chat= params (the legacy page=spaces param is gone; other
// tests in this file still assert it and are stale — see issue #782 follow-up).
await expect(page).toHaveURL(/[?&]space=[^&]+/);
await expect(page).toHaveURL(/[?&]chat=\d+/);
expect(page.url()).not.toContain('page=tasks');
expect(fatalErrors, `fatal errors:\n${fatalErrors.join('\n')}`).toEqual([]);
});