Skip to content

Commit f1e8e55

Browse files
committed
gateway route links to router instead of route edit form
1 parent 1dd25f6 commit f1e8e55

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

app/pages/project/vpcs/internet-gateway-edit.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ import {
3737

3838
const RoutesEmpty = () => (
3939
<Table.Row>
40-
<Table.Cell colSpan={2} className="!bg-raise">
41-
No VPC router routes target this gateway.
42-
</Table.Cell>
40+
<Table.Cell colSpan={2}>No VPC router routes target this gateway.</Table.Cell>
4341
</Table.Row>
4442
)
4543

@@ -51,15 +49,15 @@ function RouteRows({ project, vpc, gateway }: PP.VpcInternetGateway) {
5149

5250
return matchingRoutes.map(([router, route]) => (
5351
<Table.Row key={route.id}>
54-
<Table.Cell className="!bg-raise">{router}</Table.Cell>
55-
<Table.Cell className="bg-raise">
52+
<Table.Cell className="!bg-raise">
5653
<Link
57-
to={pb.vpcRouterRouteEdit({ project, vpc, router, route: route.name })}
54+
to={pb.vpcRouter({ project, vpc, router })}
5855
className="link-with-underline text-sans-md"
5956
>
60-
{route.name}
57+
{router}
6158
</Link>
6259
</Table.Cell>
60+
<Table.Cell className="!bg-raise">{route.name}</Table.Cell>
6361
</Table.Row>
6462
))
6563
}

test/e2e/vpcs.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,9 @@ test('internet gateway shows proper list of routes targeting it', async ({ page
408408
await expect(table.locator('tbody >> tr')).toHaveCount(2)
409409

410410
// click on the new-route link to go to the detail page
411-
await sidemodal.getByRole('link', { name: 'new-route' }).click()
411+
await sidemodal.getByRole('link', { name: 'mock-custom-router' }).first().click()
412412
// expect to be on the view page
413413
await expect(page).toHaveURL(
414-
'/projects/mock-project/vpcs/mock-vpc/routers/mock-custom-router/routes/new-route/edit'
414+
'/projects/mock-project/vpcs/mock-vpc/routers/mock-custom-router'
415415
)
416416
})

0 commit comments

Comments
 (0)