Skip to content

Commit

Permalink
gateway route links to router instead of route edit form
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Dec 13, 2024
1 parent 1dd25f6 commit f1e8e55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions app/pages/project/vpcs/internet-gateway-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ import {

const RoutesEmpty = () => (
<Table.Row>
<Table.Cell colSpan={2} className="!bg-raise">
No VPC router routes target this gateway.
</Table.Cell>
<Table.Cell colSpan={2}>No VPC router routes target this gateway.</Table.Cell>
</Table.Row>
)

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

return matchingRoutes.map(([router, route]) => (
<Table.Row key={route.id}>
<Table.Cell className="!bg-raise">{router}</Table.Cell>
<Table.Cell className="bg-raise">
<Table.Cell className="!bg-raise">
<Link
to={pb.vpcRouterRouteEdit({ project, vpc, router, route: route.name })}
to={pb.vpcRouter({ project, vpc, router })}
className="link-with-underline text-sans-md"
>
{route.name}
{router}
</Link>
</Table.Cell>
<Table.Cell className="!bg-raise">{route.name}</Table.Cell>
</Table.Row>
))
}
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/vpcs.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,9 @@ test('internet gateway shows proper list of routes targeting it', async ({ page
await expect(table.locator('tbody >> tr')).toHaveCount(2)

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

0 comments on commit f1e8e55

Please sign in to comment.