mirror of
https://github.com/hexastack/hexabot
synced 2024-11-24 04:53:41 +00:00
fix: address review comments
This commit is contained in:
parent
c655026386
commit
628d0f5819
@ -72,9 +72,9 @@ describe('TranslationService', () => {
|
|||||||
.mockResolvedValue(['Global fallback message']),
|
.mockResolvedValue(['Global fallback message']),
|
||||||
find: jest.fn().mockResolvedValue([
|
find: jest.fn().mockResolvedValue([
|
||||||
{
|
{
|
||||||
translatable: true,
|
translatable: false,
|
||||||
key: 'global_fallback',
|
global_fallback: 'global_fallback',
|
||||||
value: 'Global fallback message',
|
fallback_message: ['Global fallback message'],
|
||||||
},
|
},
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
|
@ -24,9 +24,7 @@ export interface CustomBlocks {}
|
|||||||
|
|
||||||
type BlockAttrs = Partial<BlockCreateDto> & { name: string };
|
type BlockAttrs = Partial<BlockCreateDto> & { name: string };
|
||||||
|
|
||||||
export type PluginSetting = Omit<SettingCreateDto, 'weight'> & {
|
export type PluginSetting = Omit<SettingCreateDto, 'weight'>;
|
||||||
translatable?: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type PluginBlockTemplate = Omit<
|
export type PluginBlockTemplate = Omit<
|
||||||
BlockAttrs,
|
BlockAttrs,
|
||||||
|
10
api/src/utils/test/fixtures/setting.ts
vendored
10
api/src/utils/test/fixtures/setting.ts
vendored
@ -19,7 +19,6 @@ export const settingFixtures: SettingCreateDto[] = [
|
|||||||
value: 'admin@example.com',
|
value: 'admin@example.com',
|
||||||
type: SettingType.text,
|
type: SettingType.text,
|
||||||
weight: 1,
|
weight: 1,
|
||||||
translatable: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
group: 'contact',
|
group: 'contact',
|
||||||
@ -35,7 +34,6 @@ export const settingFixtures: SettingCreateDto[] = [
|
|||||||
value: 'Your company name',
|
value: 'Your company name',
|
||||||
type: SettingType.text,
|
type: SettingType.text,
|
||||||
weight: 2,
|
weight: 2,
|
||||||
translatable: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
group: 'contact',
|
group: 'contact',
|
||||||
@ -43,7 +41,6 @@ export const settingFixtures: SettingCreateDto[] = [
|
|||||||
value: '(+999) 9999 9999 999',
|
value: '(+999) 9999 9999 999',
|
||||||
type: SettingType.text,
|
type: SettingType.text,
|
||||||
weight: 3,
|
weight: 3,
|
||||||
translatable: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
group: 'contact',
|
group: 'contact',
|
||||||
@ -51,7 +48,6 @@ export const settingFixtures: SettingCreateDto[] = [
|
|||||||
value: 'contact[at]mycompany.com',
|
value: 'contact[at]mycompany.com',
|
||||||
type: SettingType.text,
|
type: SettingType.text,
|
||||||
weight: 4,
|
weight: 4,
|
||||||
translatable: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
group: 'contact',
|
group: 'contact',
|
||||||
@ -59,7 +55,6 @@ export const settingFixtures: SettingCreateDto[] = [
|
|||||||
value: '71 Pilgrim Avenue',
|
value: '71 Pilgrim Avenue',
|
||||||
type: SettingType.text,
|
type: SettingType.text,
|
||||||
weight: 5,
|
weight: 5,
|
||||||
translatable: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
group: 'contact',
|
group: 'contact',
|
||||||
@ -67,7 +62,6 @@ export const settingFixtures: SettingCreateDto[] = [
|
|||||||
value: '',
|
value: '',
|
||||||
type: SettingType.text,
|
type: SettingType.text,
|
||||||
weight: 6,
|
weight: 6,
|
||||||
translatable: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
group: 'contact',
|
group: 'contact',
|
||||||
@ -75,7 +69,6 @@ export const settingFixtures: SettingCreateDto[] = [
|
|||||||
value: 'Chevy Chase',
|
value: 'Chevy Chase',
|
||||||
type: SettingType.text,
|
type: SettingType.text,
|
||||||
weight: 7,
|
weight: 7,
|
||||||
translatable: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
group: 'contact',
|
group: 'contact',
|
||||||
@ -83,7 +76,6 @@ export const settingFixtures: SettingCreateDto[] = [
|
|||||||
value: '85705',
|
value: '85705',
|
||||||
type: SettingType.text,
|
type: SettingType.text,
|
||||||
weight: 8,
|
weight: 8,
|
||||||
translatable: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
group: 'contact',
|
group: 'contact',
|
||||||
@ -91,7 +83,6 @@ export const settingFixtures: SettingCreateDto[] = [
|
|||||||
value: 'Orlando',
|
value: 'Orlando',
|
||||||
type: SettingType.text,
|
type: SettingType.text,
|
||||||
weight: 9,
|
weight: 9,
|
||||||
translatable: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
group: 'contact',
|
group: 'contact',
|
||||||
@ -99,7 +90,6 @@ export const settingFixtures: SettingCreateDto[] = [
|
|||||||
value: 'US',
|
value: 'US',
|
||||||
type: SettingType.text,
|
type: SettingType.text,
|
||||||
weight: 10,
|
weight: 10,
|
||||||
translatable: false,
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user