mirror of
https://github.com/inventree/InvenTree.git
synced 2025-09-13 14:11:37 +00:00
@@ -123,8 +123,11 @@ function SettingValue({
|
|||||||
radius='lg'
|
radius='lg'
|
||||||
aria-label={`toggle-setting-${setting.key}`}
|
aria-label={`toggle-setting-${setting.key}`}
|
||||||
disabled={setting.read_only}
|
disabled={setting.read_only}
|
||||||
checked={setting.value.toLowerCase() == 'true'}
|
checked={setting.value.toString().toLowerCase() == 'true'}
|
||||||
onChange={toggleSetting}
|
onChange={toggleSetting}
|
||||||
|
wrapperProps={{
|
||||||
|
'aria-label': `setting-${setting.key}-wrapper`
|
||||||
|
}}
|
||||||
style={{
|
style={{
|
||||||
paddingRight: '20px'
|
paddingRight: '20px'
|
||||||
}}
|
}}
|
||||||
|
@@ -113,6 +113,13 @@ test('Settings - User', async ({ browser }) => {
|
|||||||
await loadTab(page, 'Reporting');
|
await loadTab(page, 'Reporting');
|
||||||
await page.getByText('Inline report display').waitFor();
|
await page.getByText('Inline report display').waitFor();
|
||||||
|
|
||||||
|
// Toggle boolean setting
|
||||||
|
await page
|
||||||
|
.getByLabel('setting-LABEL_INLINE-wrapper')
|
||||||
|
.locator('span')
|
||||||
|
.nth(1)
|
||||||
|
.click();
|
||||||
|
|
||||||
await loadTab(page, 'Plugin Settings');
|
await loadTab(page, 'Plugin Settings');
|
||||||
await page
|
await page
|
||||||
.getByRole('button', { name: 'InvenTree Email Notifications' })
|
.getByRole('button', { name: 'InvenTree Email Notifications' })
|
||||||
@@ -135,6 +142,31 @@ test('Settings - Global', async ({ browser, request }) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await loadTab(page, 'Server');
|
await loadTab(page, 'Server');
|
||||||
|
|
||||||
|
// edit some settings here
|
||||||
|
await page
|
||||||
|
.getByRole('button', { name: 'edit-setting-INVENTREE_COMPANY_NAME' })
|
||||||
|
.click();
|
||||||
|
await page
|
||||||
|
.getByRole('textbox', { name: 'text-field-value' })
|
||||||
|
.fill('some data');
|
||||||
|
await page.getByRole('button', { name: 'Cancel' }).click();
|
||||||
|
|
||||||
|
// Toggle a boolean setting
|
||||||
|
await page
|
||||||
|
.getByLabel('setting-INVENTREE_ANNOUNCE_ID-wrapper')
|
||||||
|
.locator('span')
|
||||||
|
.nth(1)
|
||||||
|
.click();
|
||||||
|
await page
|
||||||
|
.getByText('Setting INVENTREE_ANNOUNCE_ID updated successfully')
|
||||||
|
.waitFor();
|
||||||
|
await page
|
||||||
|
.getByLabel('setting-INVENTREE_ANNOUNCE_ID-wrapper')
|
||||||
|
.locator('span')
|
||||||
|
.nth(1)
|
||||||
|
.click();
|
||||||
|
|
||||||
await loadTab(page, 'Authentication');
|
await loadTab(page, 'Authentication');
|
||||||
await loadTab(page, 'Barcodes');
|
await loadTab(page, 'Barcodes');
|
||||||
await loadTab(page, 'Pricing');
|
await loadTab(page, 'Pricing');
|
||||||
|
Reference in New Issue
Block a user