feat: translate system interface to English
This commit is contained in:
@@ -7,7 +7,7 @@ test('selects articles and keeps the reader focused on their content', async ({
|
||||
await page.waitForLoadState('networkidle')
|
||||
const rows = page.locator('.inbox-article-row')
|
||||
await expect(rows).toHaveCount(9)
|
||||
const articleTitle = 'エージェントに渡す文脈は、短くてもよい'
|
||||
const articleTitle = 'Context for an agent can be brief'
|
||||
await rows.filter({ hasText: articleTitle }).click()
|
||||
const reader = page.getByRole('article', { name: articleTitle, exact: true })
|
||||
await expect(reader).toBeVisible()
|
||||
@@ -16,26 +16,26 @@ test('selects articles and keeps the reader focused on their content', async ({
|
||||
).toBeVisible()
|
||||
await expect(
|
||||
reader.getByText(
|
||||
'まず目的を一文で書き、次に変えてはいけない条件を添える。',
|
||||
'Start with a one-sentence goal, then add the constraints that must hold.',
|
||||
{ exact: false },
|
||||
),
|
||||
).toBeVisible()
|
||||
await expect(page.getByText('FOR YOU', { exact: true })).toHaveCount(0)
|
||||
await expect(page.getByText('モック', { exact: true })).toHaveCount(0)
|
||||
await expect(page.getByText('Mock', { exact: true })).toHaveCount(0)
|
||||
await expect(page.getByText('Why this article', { exact: true })).toHaveCount(
|
||||
0,
|
||||
)
|
||||
await expect(
|
||||
page.getByText('この記事が届いた理由', { exact: true }),
|
||||
page.getByRole('button', { name: /For you|Read later|Unread only/ }),
|
||||
).toHaveCount(0)
|
||||
await expect(
|
||||
page.getByRole('button', { name: /あなたへ|あとで読む|未読のみ/ }),
|
||||
).toHaveCount(0)
|
||||
const back = page.getByRole('button', { name: '記事一覧に戻る' })
|
||||
const back = page.getByRole('button', { name: 'Back to articles' })
|
||||
if (await back.isVisible()) await back.click()
|
||||
await rows
|
||||
.filter({ hasText: '3カラムの余白が、情報を読むリズムをつくる' })
|
||||
.filter({ hasText: 'Three columns create a rhythm for reading' })
|
||||
.click()
|
||||
await expect(
|
||||
page.getByRole('article', {
|
||||
name: '3カラムの余白が、情報を読むリズムをつくる',
|
||||
name: 'Three columns create a rhythm for reading',
|
||||
exact: true,
|
||||
}),
|
||||
).toBeVisible()
|
||||
@@ -49,21 +49,21 @@ test('recovers from empty search and shares navigation with Twitter Lite', async
|
||||
await page.waitForLoadState('networkidle')
|
||||
const rows = page.locator('.inbox-article-row')
|
||||
await page
|
||||
.getByRole('textbox', { name: '記事を検索' })
|
||||
.fill('存在しない検索語xyz')
|
||||
.getByRole('textbox', { name: 'Search articles' })
|
||||
.fill('nonexistent-query-xyz')
|
||||
await expect(rows).toHaveCount(0)
|
||||
await expect(
|
||||
page.getByText('記事がありません', { exact: true }),
|
||||
page.getByText('No articles found', { exact: true }),
|
||||
).toBeVisible()
|
||||
await page.getByRole('button', { name: '検索をクリア' }).click()
|
||||
await page.getByRole('button', { name: 'Clear search' }).click()
|
||||
await expect(rows).toHaveCount(9)
|
||||
expect((await a11y().analyze()).violations).toEqual([])
|
||||
await expect(
|
||||
page.getByRole('button', { name: '興味を編集', exact: true }),
|
||||
page.getByRole('button', { name: 'Edit interests', exact: true }),
|
||||
).toHaveCount(0)
|
||||
await page.getByRole('link', { name: 'Twitter Lite', exact: true }).click()
|
||||
await expect(page).toHaveURL(/\/deck$/)
|
||||
await page.getByRole('link', { name: 'リーダー', exact: true }).click()
|
||||
await page.getByRole('link', { name: 'Reader', exact: true }).click()
|
||||
await expect(page).toHaveURL(/\/inbox$/)
|
||||
await expect(rows).toHaveCount(9)
|
||||
})
|
||||
@@ -77,14 +77,14 @@ test('keeps article navigation readable without horizontal overflow', async ({
|
||||
for (const width of [320, 375, 414, 768]) {
|
||||
await page.setViewportSize({ width, height: 850 })
|
||||
await expect(
|
||||
page.getByRole('textbox', { name: '記事を検索' }),
|
||||
page.getByRole('textbox', { name: 'Search articles' }),
|
||||
).toBeVisible()
|
||||
expect(
|
||||
await page.evaluate(() => document.documentElement.scrollWidth),
|
||||
).toBe(width)
|
||||
await page.locator('.inbox-article-row').first().click()
|
||||
const reader = page.getByRole('article', {
|
||||
name: 'ブラウザを見ながら考える。AIエージェントとの新しい開発の進め方',
|
||||
name: 'Thinking in the browser: a new workflow with AI agents',
|
||||
exact: true,
|
||||
})
|
||||
await expect(reader).toBeVisible()
|
||||
@@ -95,7 +95,7 @@ test('keeps article navigation readable without horizontal overflow', async ({
|
||||
path: testInfo.outputPath(`inbox-reader-${width}.png`),
|
||||
})
|
||||
if (width === 320) expect((await a11y().analyze()).violations).toEqual([])
|
||||
const back = page.getByRole('button', { name: '記事一覧に戻る' })
|
||||
const back = page.getByRole('button', { name: 'Back to articles' })
|
||||
if (await back.isVisible()) await back.click()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user