mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-16 03:55:41 +00:00
Notification permissions (#9449)
* Updated type hints * Fix tooltip bug * Check user when sending notification * Fix test * Update unit test * More unit test fixes * Tweak playwright tests
This commit is contained in:
@ -54,7 +54,11 @@ export default function StarredToggleButton({
|
||||
color={instance.starred ? 'green' : 'blue'}
|
||||
size='lg'
|
||||
variant={instance.starred ? 'filled' : 'outline'}
|
||||
tooltip={t`Unsubscribe from part`}
|
||||
tooltip={
|
||||
instance.starred
|
||||
? t`Unsubscribe from notifications`
|
||||
: t`Subscribe to notifications`
|
||||
}
|
||||
onClick={() => change(instance.starred, instance.pk)}
|
||||
tooltipAlignment='bottom'
|
||||
/>
|
||||
|
@ -75,9 +75,14 @@ test('Plugins - Functionality', async ({ browser }) => {
|
||||
// Activate the plugin
|
||||
const cell = await page.getByText('Sample API Caller', { exact: true });
|
||||
await clickOnRowMenu(cell);
|
||||
await page.getByRole('menuitem', { name: 'Activate' }).click();
|
||||
await page.getByRole('button', { name: 'Submit' }).click();
|
||||
await page.getByText('The plugin was activated').waitFor();
|
||||
await page.waitForTimeout(100);
|
||||
|
||||
// Activate the plugin (unless already activated)
|
||||
if ((await page.getByRole('menuitem', { name: 'Deactivate' }).count()) == 0) {
|
||||
await page.getByRole('menuitem', { name: 'Activate' }).click();
|
||||
await page.getByRole('button', { name: 'Submit' }).click();
|
||||
await page.getByText('The plugin was activated').waitFor();
|
||||
}
|
||||
|
||||
// Deactivate the plugin again
|
||||
await clickOnRowMenu(cell);
|
||||
|
Reference in New Issue
Block a user