-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: This plugin will stop working with BlueBase versions below 6
- Loading branch information
Showing
57 changed files
with
6,184 additions
and
3,099 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test('Plugin should load translations from web', async () => { | ||
const { components } = require('../components/index.web'); | ||
expect(components.AppearanceSettingList).toBeDefined(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { isPromise } from '@bluebase/core'; | ||
|
||
test('Plugin should load translations from web', async () => { | ||
const { lang } = require('../lang/index.web'); | ||
expect(isPromise(lang['bluebase.intl.messages.ur'])).toBe(true); | ||
expect(isPromise(lang['bluebase.intl.messages.ur-roman'])).toBe(true); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test('Plugin should load translations from web', async () => { | ||
const { layouts } = require('../layouts/index.web'); | ||
expect(layouts.SettingsPageDesktop).toBeDefined(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test('Plugin should load translations from web', async () => { | ||
const { settings } = require('../settings/index.web'); | ||
expect(settings.CallSupportSetting).toBeDefined(); | ||
}); |
29 changes: 29 additions & 0 deletions
29
src/components/AppearanceSettingList/__test__/AppearanceSettingList.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { BlueBaseApp, getComponent } from '@bluebase/core'; | ||
|
||
import DarkModeSetting from '../../../settings/DarkModeSetting'; | ||
import JsonSchema from '@bluebase/plugin-json-schema-components'; | ||
import MUI from '@bluebase/plugin-material-ui'; | ||
import Plugin from '../../../index'; | ||
import React from 'react'; | ||
import ThemeSelectionSetting from '../../../settings/ThemeSelectionSetting'; | ||
import { mount } from 'enzyme'; | ||
import { waitForElement } from 'enzyme-async-helpers'; | ||
|
||
const AppearanceSettingList = getComponent('AppearanceSettingList'); | ||
|
||
describe('AppearanceSettingList', () => { | ||
it('should render nothing if there no developer configs', async () => { | ||
// mount components | ||
|
||
const wrapper: any = mount( | ||
<BlueBaseApp plugins={[Plugin, MUI, JsonSchema]}> | ||
<AppearanceSettingList /> | ||
</BlueBaseApp> | ||
); | ||
await waitForElement(wrapper, 'SettingList'); | ||
|
||
expect(wrapper.find(DarkModeSetting).exists()).toBe(true); | ||
expect(wrapper.find(ThemeSelectionSetting).exists()).toBe(true); | ||
wrapper.unmount(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import { AppearanceSettingList } from './AppearanceSettingList'; | ||
|
||
export * from './AppearanceSettingList'; | ||
export { AppearanceSettingList as default } from './AppearanceSettingList'; | ||
export default AppearanceSettingList; |
4 changes: 2 additions & 2 deletions
4
src/components/InformationSettingList/__test__/InformationSettingList.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import { InformationSettingList } from './InformationSettingList'; | ||
|
||
export * from './InformationSettingList'; | ||
export { InformationSettingList as default } from './InformationSettingList'; | ||
export default InformationSettingList; |
29 changes: 29 additions & 0 deletions
29
src/components/LanguageSettingList/__test__/LanguageSettingList.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { BlueBaseApp, getComponent } from '@bluebase/core'; | ||
|
||
import JsonSchema from '@bluebase/plugin-json-schema-components'; | ||
import LanguageSetting from '../../../settings/LanguageSetting'; | ||
import MUI from '@bluebase/plugin-material-ui'; | ||
import Plugin from '../../../index'; | ||
import React from 'react'; | ||
import TextDirectionSetting from '../../../settings/TextDirectionSetting'; | ||
import { mount } from 'enzyme'; | ||
import { waitForElement } from 'enzyme-async-helpers'; | ||
|
||
const LanguageSettingList = getComponent('LanguageSettingList'); | ||
|
||
describe('LanguageSettingList', () => { | ||
it('should render nothing if there no developer configs', async () => { | ||
// mount components | ||
|
||
const wrapper: any = mount( | ||
<BlueBaseApp plugins={[Plugin, MUI, JsonSchema]}> | ||
<LanguageSettingList /> | ||
</BlueBaseApp> | ||
); | ||
await waitForElement(wrapper, 'SettingList'); | ||
|
||
expect(wrapper.find(LanguageSetting).exists()).toBe(true); | ||
expect(wrapper.find(TextDirectionSetting).exists()).toBe(true); | ||
wrapper.unmount(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import { LanguageSettingList } from './LanguageSettingList'; | ||
|
||
export * from './LanguageSettingList'; | ||
export { LanguageSettingList as default } from './LanguageSettingList'; | ||
export default LanguageSettingList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import { LegalSettingList } from './LegalSettingList'; | ||
|
||
export * from './LegalSettingList'; | ||
export { LegalSettingList as default } from './LegalSettingList'; | ||
export default LegalSettingList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import { LinkingSettingItem } from './LinkingSettingItem'; | ||
|
||
export * from './LinkingSettingItem'; | ||
export { LinkingSettingItem as default } from './LinkingSettingItem'; | ||
export default LinkingSettingItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import { PrivacyPolicy } from './PrivacyPolicy'; | ||
|
||
export * from './PrivacyPolicy'; | ||
export { PrivacyPolicy as default } from './PrivacyPolicy'; | ||
export default PrivacyPolicy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import { SettingList } from './SettingList'; | ||
|
||
export * from './SettingList'; | ||
export { SettingList as default } from './SettingList'; | ||
export default SettingList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import { SettingsAppIcon } from './SettingsAppIcon'; | ||
|
||
export * from './SettingsAppIcon'; | ||
export { SettingsAppIcon as default } from './SettingsAppIcon'; | ||
export default SettingsAppIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import { SupportSettingList } from './SupportSettingList'; | ||
|
||
export * from './SupportSettingList'; | ||
export { SupportSettingList as default } from './SupportSettingList'; | ||
export default SupportSettingList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import { TermsOfService } from './TermsOfService'; | ||
|
||
export * from './TermsOfService'; | ||
export { TermsOfService as default } from './TermsOfService'; | ||
export default TermsOfService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './useScreenProps'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { useBlueBase, useIntl, useTheme } from '@bluebase/core'; | ||
|
||
export function useScreenProps() { | ||
const BB = useBlueBase(); | ||
const intl = useIntl(); | ||
const { theme } = useTheme(); | ||
|
||
return { BB, intl, theme }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.