Skip to content

Commit

Permalink
🧪 test(general): cleanup todos
Browse files Browse the repository at this point in the history
  • Loading branch information
thrownullexception committed Dec 1, 2023
1 parent 08260e4 commit e6b5a33
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/api/_test-utils/_all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ export const setupAllTestData = async (domains: DomainTypes[]) => {
);
};

// TODO: test all custom script logic
// TEST: test all custom script logic
2 changes: 1 addition & 1 deletion src/__tests__/api/menu/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ describe("/api/menu", () => {
});
});

// TODO: test isMenuItemAllowed
// TEST: test isMenuItemAllowed
2 changes: 1 addition & 1 deletion src/__tests__/roles/[roleId]/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,5 +296,5 @@ describe("pages/roles/[roleId]/index", () => {
).toBeChecked();
});

// todo test heirachy
// TEST: test heirachy
});
1 change: 0 additions & 1 deletion src/backend/users/users.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export class UsersApiController {
}
}

// TODO: if mail is activated then send reset form
async resetPassword(username: string, input: IResetPasswordForm) {
await this._usersService.resetPassword(username, input.password);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const FILTER_OPERATOR_LABELS: Record<FilterOperators, string> = {
[FilterOperators.BETWEEN]: "Between",
[FilterOperators.CONTAINS]: "Contains",
[FilterOperators.NOT_EQUAL]: "Not Equal To",
[FilterOperators.IS_NULL]: "Is Null", // TODO:
[FilterOperators.IS_NULL]: "Is Null",
};

interface IProps<T> {
Expand Down
12 changes: 4 additions & 8 deletions src/frontend/views/data/Table/useTableMenuItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const useTableMenuItems = (
const entityCrudConfig = useEntityCrudConfig(entity);
const canUserPerformCrudAction = useCanUserPerformCrudAction(entity);

const pluginTableMenuItems = usePluginTableMenuItems(entity);
const pluginTableMenuItems = usePluginTableMenuItems(entity, reference);

if (entity === SLUG_LOADING_VALUE) {
return [];
Expand All @@ -35,15 +35,11 @@ export const useTableMenuItems = (
label: entityCrudConfig.TEXT_LANG.CREATE,
IconComponent: Plus,
onClick: () => {
let baseUrl = NAVIGATION_LINKS.ENTITY.CREATE(entity);
if (reference) {
router.push(
`${NAVIGATION_LINKS.ENTITY.CREATE(entity)}?${
reference.referenceField
}=${reference.entityId}`
);
return;
baseUrl = `${baseUrl}?${reference.referenceField}=${reference.entityId}`;
}
router.push(NAVIGATION_LINKS.ENTITY.CREATE(entity));
router.push(baseUrl);
},
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/views/entity/Actions/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export function ActionForm({

await onSubmit({ ...cleanedConfigurationForm, integrationKey });
}}
// TODO unit test this
// TEST: unit test this
formExtension={{
fieldsState: `
return {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/views/integrations/storage/General.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function GeneralStorageSettings() {
/>
}
>
{/* TODO: document */}
{/* TODO: documentation */}
<SchemaForm<IFileUploadSettings>
initialValues={fileUploadSettings.data}
fields={{
Expand Down

0 comments on commit e6b5a33

Please sign in to comment.