refactor(person): remove redundant conversations link from header
The co-correspondent chips already link directly to the conversation view pre-filled with both persons, making the generic "Konversationen anzeigen" header link redundant. Removed the link and the person_btn_conversations i18n key from all three locales. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -166,17 +166,20 @@ test.describe('Person detail — sent and received documents', () => {
|
||||
});
|
||||
|
||||
test.describe('Person detail — conversations link', () => {
|
||||
test('has a conversations link that pre-fills the person', async ({ page }) => {
|
||||
test('co-correspondent chips link to conversations pre-filled with both persons', async ({ page }) => {
|
||||
await page.goto('/persons');
|
||||
// Exclude /persons/new to avoid matching the "New person" button
|
||||
const firstLink = page.locator('a[href^="/persons/"]:not([href="/persons/new"])').first();
|
||||
const href = await firstLink.getAttribute('href');
|
||||
const personId = href!.split('/persons/')[1];
|
||||
await firstLink.click();
|
||||
// Use the specific person-detail link text, not the nav "Konversationen" link
|
||||
const convLink = page.getByRole('link', { name: /Konversationen anzeigen/i });
|
||||
await expect(convLink).toBeVisible();
|
||||
await expect(convLink).toHaveAttribute('href', `/conversations?senderId=${personId}`);
|
||||
await page.waitForSelector('[data-hydrated]');
|
||||
|
||||
// Co-correspondent chips link to /conversations?senderId=X&receiverId=Y
|
||||
const chip = page.locator(`a[href^="/conversations?senderId=${personId}&receiverId="]`).first();
|
||||
if (await chip.count() > 0) {
|
||||
const chipHref = await chip.getAttribute('href');
|
||||
expect(chipHref).toMatch(/\/conversations\?senderId=.+&receiverId=.+/);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user