Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/routes/crate/reverse-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class ReverseDependenciesRoute extends Route {
}

this.notifications.error(message);
this.router.replaceWith('index');
this.router.replaceWith('catch-all');
}
}

Expand Down
4 changes: 2 additions & 2 deletions e2e/acceptance/reverse-dependencies.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ test.describe('Acceptance | /crates/:crate_id/reverse_dependencies', { tag: '@ac
await msw.worker.use(http.get('/api/v1/crates/:crate_id/reverse_dependencies', () => error));

await page.goto(`/crates/${foo.name}/reverse_dependencies`);
await expect(page).toHaveURL('/');
await expect(page).toHaveURL(`/crates/${foo.name}`);
await expect(page.locator('[data-test-notification-message="error"]')).toHaveText(
'Could not load reverse dependencies for the "foo" crate',
);
Expand All @@ -86,7 +86,7 @@ test.describe('Acceptance | /crates/:crate_id/reverse_dependencies', { tag: '@ac
await msw.worker.use(http.get('/api/v1/crates/:crate_id/reverse_dependencies', () => error));

await page.goto(`/crates/${foo.name}/reverse_dependencies`);
await expect(page).toHaveURL('/');
await expect(page).toHaveURL(`/crates/${foo.name}`);
await expect(page.locator('[data-test-notification-message="error"]')).toHaveText(
'Could not load reverse dependencies for the "foo" crate: cannot request more than 100 items',
);
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/reverse-dependencies-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module('Acceptance | /crates/:crate_id/reverse_dependencies', function (hooks) {
this.worker.use(http.get('/api/v1/crates/:crate_id/reverse_dependencies', () => error));

await visit(`/crates/${foo.name}/reverse_dependencies`);
assert.strictEqual(currentURL(), '/');
assert.strictEqual(currentURL(), `/crates/${foo.name}`);
assert
.dom('[data-test-notification-message="error"]')
.hasText('Could not load reverse dependencies for the "foo" crate');
Expand All @@ -86,7 +86,7 @@ module('Acceptance | /crates/:crate_id/reverse_dependencies', function (hooks) {
this.worker.use(http.get('/api/v1/crates/:crate_id/reverse_dependencies', () => error));

await visit(`/crates/${foo.name}/reverse_dependencies`);
assert.strictEqual(currentURL(), '/');
assert.strictEqual(currentURL(), `/crates/${foo.name}`);
assert
.dom('[data-test-notification-message="error"]')
.hasText('Could not load reverse dependencies for the "foo" crate: cannot request more than 100 items');
Expand Down
Loading