Skip to content

Commit adcca30

Browse files
committed
test(greenhouse): read org from pathname instead of search params
1 parent 58523a3 commit adcca30

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/greenhouse/src/components/AuthProvider.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ describe("AuthProvider", () => {
139139
)
140140
})
141141

142-
it("initializes demo auth session when demoOrg matches org in URL as query param", () => {
142+
it("initializes demo auth session when demoOrg matches org in URL pathname", () => {
143143
const demoOrg = "demoArturo"
144144

145145
const tokenSession = vi.fn()
@@ -149,7 +149,7 @@ describe("AuthProvider", () => {
149149
// @ts-expect-error TS(2790): The operand of a 'delete' operator must be optiona... Remove this comment to see the full error message
150150
delete window.location
151151
// @ts-expect-error TS(2322): Type 'URL' is not assignable to type '(string | Lo... Remove this comment to see the full error message
152-
window.location = new URL(`https://dashboard.example.com/?org=${demoOrg}`)
152+
window.location = new URL(`https://dashboard.example.com/${demoOrg}`)
153153

154154
const wrapper = ({ children }: any) => (
155155
<AuthProvider options={{ demoOrg: demoOrg, demoUserToken: "demoToken" }}>{children}</AuthProvider>

0 commit comments

Comments
 (0)