Skip to content

Commit 9bb273f

Browse files
sagzyclaude
andcommitted
Removed redundant staff profile not-found acceptance test
no ref - review feedback: the loaded-profile-to-unknown-slug scenario largely duplicates the cold-load not-found test, which already covers the toast and staff-list redirect Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 9ee1cde commit 9bb273f

1 file changed

Lines changed: 0 additions & 26 deletions

File tree

apps/admin-x-settings/test/acceptance/general/users/profile.test.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,30 +1029,4 @@ test.describe('Staff profile URLs', async () => {
10291029
await expect(page.getByTestId('user-detail-modal')).not.toBeVisible();
10301030
});
10311031

1032-
test('Shows an error when navigating from a loaded profile to an unknown slug', async ({page}) => {
1033-
const userToEdit = responseFixtures.users.users.find(user => user.email === 'administrator@test.com')!;
1034-
1035-
await mockApi({page, requests: {
1036-
...globalDataRequests,
1037-
browseUsers: {method: 'GET', path: '/users/?limit=100&include=roles', response: responseFixtures.users},
1038-
getUserBySlug: {method: 'GET', path: `/users/slug/${userToEdit.slug}/?include=roles`, response: {
1039-
users: [userToEdit]
1040-
}},
1041-
getUnknownUserBySlug: {method: 'GET', path: '/users/slug/unknown-user/?include=roles', responseStatus: 404, response: {
1042-
errors: [{type: 'NotFoundError', message: 'Resource not found error, cannot read user.'}]
1043-
}}
1044-
}});
1045-
1046-
await page.goto(`/#/settings/staff/${userToEdit.slug}`);
1047-
1048-
const modal = page.getByTestId('user-detail-modal');
1049-
await expect(modal).toBeVisible();
1050-
1051-
// The already-loaded profile must not mask the failed lookup
1052-
await page.goto('/#/settings/staff/unknown-user');
1053-
1054-
await expect(page.getByTestId('toast-error').filter({hasText: 'User not found'})).toBeVisible();
1055-
await expect(page).toHaveURL(/#\/settings\/staff$/);
1056-
await expect(page.getByTestId('user-detail-modal')).not.toBeVisible();
1057-
});
10581032
});

0 commit comments

Comments
 (0)