Skip to content

Commit

Permalink
tweak: remove change-detour-duration feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahpurcell committed Feb 7, 2025
1 parent 848bd65 commit 8a40e95
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
3 changes: 1 addition & 2 deletions assets/src/components/detours/diversionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,7 @@ export const DiversionPage = ({
: undefined
}
onOpenChangeDurationModal={
userInTestGroup(TestGroups.DetoursPilot) &&
userInTestGroup(TestGroups.ChangeDetourDuration)
userInTestGroup(TestGroups.DetoursPilot)
? () => {
send({ type: "detour.active.open-change-duration-modal" })
}
Expand Down
1 change: 0 additions & 1 deletion assets/src/userInTestGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export enum TestGroups {
LateView = "late-view",
CopyButton = "copy-button",
DeleteDraftDetours = "delete-draft-detours",
ChangeDetourDuration = "change-detour-duration",
DetoursOnLadder = "detours-on-ladder",
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ beforeEach(() => {

jest
.mocked(getTestGroups)
.mockReturnValue([
TestGroups.DetoursPilot,
TestGroups.DetoursList,
TestGroups.ChangeDetourDuration,
])
.mockReturnValue([TestGroups.DetoursPilot, TestGroups.DetoursList])
})

const DiversionPage = (props: Partial<DiversionPageProps>) => {
Expand All @@ -59,22 +55,6 @@ const changeDurationHeading = byRole("heading", {

describe("DiversionPage edit duration workflow", () => {
describe("before change duration modal", () => {
test("does not have a change duration button if not in the ChangeDetourDuration group", async () => {
jest
.mocked(getTestGroups)
.mockReturnValue([TestGroups.DetoursList, TestGroups.DetoursPilot])
jest.mocked(fetchDetours).mockResolvedValue(Ok(detourListFactory.build()))
jest
.mocked(fetchDetour)
.mockResolvedValue(Ok(activeDetourFactory.build()))

render(<DetourListPage />)

await userEvent.click(await screen.findByText("Headsign A"))

expect(changeDurationButton.query()).not.toBeInTheDocument()
})

test("does not have a change duration button if not an active detour", async () => {
jest.mocked(fetchDetours).mockResolvedValue(Ok(detourListFactory.build()))
jest
Expand Down

0 comments on commit 8a40e95

Please sign in to comment.