Skip to content

Commit

Permalink
Pass library import functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed May 3, 2024
1 parent 53d507b commit 24937dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion frontend/src/routes/(app)/libraries/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ export const load = (async ({ fetch }) => {
};
};

const storedLibrariesTable = makeLibrariesTable(storedLibraries, 'stored-libraries');
const unimportedStoredLibraries = storedLibraries.filter((lib) => lib.is_imported === false);
const storedLibrariesTable = {
head: makeHeadData('stored-libraries'),
meta: { urlmodel: 'stored-libraries', ...unimportedStoredLibraries },
body: tableSourceMapper(unimportedStoredLibraries, listViewFields['stored-libraries'].body)
};

const loadedLibrariesTable = makeLibrariesTable(loadedLibraries, 'loaded-libraries');

const schema = z.object({ id: z.string() });
Expand Down
4 changes: 2 additions & 2 deletions frontend/tests/utils/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const test = base.extend<Fixtures>({
},

librariesPage: async ({ page }, use) => {
const lPage = new PageContent(page, '/loaded-ibraries', 'Loaded Libraries');
const lPage = new PageContent(page, '/libraries', 'Libraries');
await use(lPage);
},

Expand Down Expand Up @@ -621,7 +621,7 @@ export function getUniqueValue(value: string): string {
}

export function replaceValues(obj: any, searchValue: string, replaceValue: string) {
for (let key in obj) {
for (const key in obj) {
if (typeof obj[key] === 'object') {
replaceValues(obj[key], searchValue, replaceValue);
} else if (typeof obj[key] === 'string') {
Expand Down

0 comments on commit 24937dc

Please sign in to comment.