Wizard: Add Locale to on-prem mapper
This adds Locale values to the on-prem mapper and updates the import test to check for expected values.
This commit is contained in:
parent
0d952fc878
commit
93de07c729
2 changed files with 21 additions and 0 deletions
|
|
@ -176,6 +176,10 @@ sudo-nopasswd = ["user", "%wheel"]
|
||||||
[customizations.timezone]
|
[customizations.timezone]
|
||||||
timezone = "US/Eastern"
|
timezone = "US/Eastern"
|
||||||
ntpservers = ["0.north-america.pool.ntp.org", "1.north-america.pool.ntp.org"]
|
ntpservers = ["0.north-america.pool.ntp.org", "1.north-america.pool.ntp.org"]
|
||||||
|
|
||||||
|
[customizations.locale]
|
||||||
|
languages = ["en_US.UTF-8", "ja_JP.UTF-8"]
|
||||||
|
keyboard = "us"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const uploadFile = async (filename: string, content: string): Promise<void> => {
|
const uploadFile = async (filename: string, content: string): Promise<void> => {
|
||||||
|
|
@ -357,6 +361,16 @@ describe('Import modal', () => {
|
||||||
await screen.findByText(/0\.north-america\.pool\.ntp\.org/i);
|
await screen.findByText(/0\.north-america\.pool\.ntp\.org/i);
|
||||||
await screen.findByText(/1\.north-america\.pool\.ntp\.org/i);
|
await screen.findByText(/1\.north-america\.pool\.ntp\.org/i);
|
||||||
|
|
||||||
|
// Locale
|
||||||
|
await clickNext();
|
||||||
|
await screen.findByRole('heading', { name: /Locale/ });
|
||||||
|
await screen.findByText('en_US.UTF-8');
|
||||||
|
await screen.findByText('ja_JP.UTF-8');
|
||||||
|
const keyboardDropDown = await screen.findByPlaceholderText(
|
||||||
|
/Select a keyboard/i
|
||||||
|
);
|
||||||
|
expect(keyboardDropDown).toHaveValue('us');
|
||||||
|
|
||||||
await clickNext();
|
await clickNext();
|
||||||
}, 20000);
|
}, 20000);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,13 @@ export const mapOnPremToHosted = (
|
||||||
ntpservers: blueprint.customizations.timezone.ntpservers,
|
ntpservers: blueprint.customizations.timezone.ntpservers,
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
|
locale:
|
||||||
|
blueprint.customizations?.locale !== undefined
|
||||||
|
? {
|
||||||
|
languages: blueprint.customizations.locale.languages,
|
||||||
|
keyboard: blueprint.customizations.locale.keyboard,
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
},
|
},
|
||||||
metadata: {
|
metadata: {
|
||||||
parent_id: null,
|
parent_id: null,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue