Skip to content

Commit

Permalink
fix: Added additional value types to UI parser and removed references…
Browse files Browse the repository at this point in the history
… to registry-bq.json (#2361)

Signed-off-by: Yun Nan Liu <[email protected]>

Co-authored-by: Yun Nan Liu <[email protected]>
  • Loading branch information
mickey-liu and Yun Nan Liu authored Mar 4, 2022
1 parent 993616f commit d202d51
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
4 changes: 1 addition & 3 deletions ui/src/components/ProjectSelector.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import App from "../App";
import {
projectsListWithDefaultProject,
creditHistoryRegistry,
bigQueryProjectRegistry,
} from "../mocks/handlers";

// declare which API requests to mock
const server = setupServer(
projectsListWithDefaultProject,
creditHistoryRegistry,
bigQueryProjectRegistry
creditHistoryRegistry
);

// establish API mocking before all tests
Expand Down
17 changes: 1 addition & 16 deletions ui/src/mocks/handlers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { rest } from "msw";
import registry from "../../public/registry.json";
import registry_bq from "../../public/registry_bq.json";

const projectsListWithDefaultProject = rest.get(
"/projects-list.json",
Expand All @@ -17,12 +16,6 @@ const projectsListWithDefaultProject = rest.get(
id: "credit_score_project",
registryPath: "/registry.json",
},
{
name: "Big Query Project",
xxxdescription: "Doing stuff in Google Big Query",
id: "big_query_project",
registryPath: "/registry_bq.json",
},
],
})
);
Expand All @@ -33,15 +26,7 @@ const creditHistoryRegistry = rest.get("/registry.json", (req, res, ctx) => {
return res(ctx.status(200), ctx.json(registry));
});

const bigQueryProjectRegistry = rest.get(
"/registry_bq.json",
(req, res, ctx) => {
return res(ctx.status(200), ctx.json(registry_bq));
}
);

export {
projectsListWithDefaultProject,
creditHistoryRegistry,
bigQueryProjectRegistry,
creditHistoryRegistry
};
4 changes: 4 additions & 0 deletions ui/src/parsers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ enum FEAST_FEATURE_VALUE_TYPES {
INT64 = "INT64",
STRING = "STRING",
BOOL = "BOOL",
BYTES = "BYTES",
INT32 = "INT32",
DOUBLE = "DOUBLE",
UNIX_TIMESTAMP = "UNIX_TIMESTAMP"
}

export { FEAST_FCO_TYPES, FEAST_FEATURE_VALUE_TYPES };

0 comments on commit d202d51

Please sign in to comment.