Skip to content

Commit

Permalink
Loading nocodb baseUrl from env for e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
malte-laukoetter committed Dec 19, 2023
1 parent b3b37dc commit 9ae315b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/mocks/nocodbHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HttpResponse, http } from "msw";

export const handlers = [
http.get(
"https://metrics.ds4g.dev:38081/api/v1/db/data/noco/ds4g-data/Tracky-Position-Phase/views/Tracky-Position-Phase",
`${process.env.NOCODB_BASE_URL}/api/v1/db/data/noco/ds4g-data/Tracky-Position-Phase/views/Tracky-Position-Phase`,
({ request }) => {
switch (new URL(request.url).searchParams.get("where")) {
case "(Position ID,eq,4)":
Expand All @@ -17,7 +17,7 @@ export const handlers = [
},
),
http.get(
"https://metrics.ds4g.dev:38081/api/v1/db/data/noco/ds4g-data/Tracky-Subproject-Phase/views/Tracky-Subproject-Phase",
`${process.env.NOCODB_BASE_URL}/api/v1/db/data/noco/ds4g-data/Tracky-Subproject-Phase/views/Tracky-Subproject-Phase`,
({ request }) => {
switch (new URL(request.url).searchParams.get("where")) {
case "(Subproject ID,eq,14)":
Expand All @@ -32,13 +32,13 @@ export const handlers = [
},
),
http.get(
"https://metrics.ds4g.dev:38081/api/v1/db/data/noco/ds4g-data/Tracky-Phase/views/Tracky-Phase",
`${process.env.NOCODB_BASE_URL}/api/v1/db/data/noco/ds4g-data/Tracky-Phase/views/Tracky-Phase`,
() => {
return HttpResponse.json(require("./stubs/nocodb/Tracky-Phase.json"));
},
),
http.get(
"https://metrics.ds4g.dev:38081/api/v1/db/data/v1/ds4g-data/Tracky-Task",
`${process.env.NOCODB_BASE_URL}/api/v1/db/data/v1/ds4g-data/Tracky-Task`,
() => {
return HttpResponse.json(require("./stubs/nocodb/Tracky-Task.json"));
},
Expand Down

0 comments on commit 9ae315b

Please sign in to comment.