Skip to content

Commit

Permalink
feat(ts/detour-entrypoints): add entrypoints for add detour (#2888)
Browse files Browse the repository at this point in the history
* feat(ts/detour-entrypoints): add entrypoints for add detour

---------

Co-authored-by: Hannah Purcell <[email protected]>
  • Loading branch information
firestack and hannahpurcell authored Oct 31, 2024
1 parent f4d842f commit 396aa37
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions assets/src/components/detourListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const DetourListPage = () => {
<Button
className="c-detour-list-page__button icon-link fw-light px-3 py-2 u-hide-for-mobile"
onClick={() => setShowDetourModal(true)}
data-fs-element="Add Detour"
>
<PlusSquare />
<span className="c-detour-list-page__button-text">Add detour</span>
Expand Down
1 change: 1 addition & 0 deletions assets/src/components/detours/detourDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const DetourDropdown = ({
zoom,
})
}}
data-fs-element="Add Detour via Vehicle Marker"
>
Start a detour on route {routeName}
</DropdownItem>
Expand Down
6 changes: 5 additions & 1 deletion assets/src/components/routeLadder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ export const Header = ({
Adjustments
</div>
</Dropdown.Header>
<Dropdown.Item className="icon-link" onClick={onClickAddDetour}>
<Dropdown.Item
className="icon-link"
onClick={onClickAddDetour}
data-fs-element="Add Detour on Route"
>
<PlusSquare /> Add detour
</Dropdown.Item>
{hasAlert && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ exports[`DetourListPage renders detour list page for dispatchers 1`] = `
>
<button
class="c-detour-list-page__button icon-link fw-light px-3 py-2 u-hide-for-mobile btn btn-primary"
data-fs-element="Add Detour"
type="button"
>
<svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ exports[`Detours Page: Open a Detour renders detour details in an open drawer on
>
<button
class="c-detour-list-page__button icon-link fw-light px-3 py-2 u-hide-for-mobile btn btn-primary"
data-fs-element="Add Detour"
type="button"
>
<svg
Expand Down Expand Up @@ -820,6 +821,7 @@ exports[`Detours Page: Open a Detour renders detour details modal to match mocke
>
<button
class="c-detour-list-page__button icon-link fw-light px-3 py-2 u-hide-for-mobile btn btn-primary"
data-fs-element="Add Detour"
type="button"
>
<svg
Expand Down

0 comments on commit 396aa37

Please sign in to comment.