mirror of
https://github.com/inventree/InvenTree.git
synced 2026-04-04 10:31:03 +00:00
[API] Category star fix (#11588)
* [API] Bug fix for PartStar and PartCategoryStar - Logic refactor and fixes * Add playwright tests * Remove debug statements * Revert API string changes
This commit is contained in:
@@ -97,6 +97,38 @@ test('Parts - Image Selection', async ({ browser }) => {
|
||||
await page.getByText('The image has been removed successfully').waitFor();
|
||||
});
|
||||
|
||||
// Test subscription logic for parts and categories
|
||||
test('Parts - Subscriptions', async ({ browser }) => {
|
||||
const page = await doCachedLogin(browser, { url: 'part/category/3/parts' });
|
||||
|
||||
// Click to subscribe to this category
|
||||
await page
|
||||
.getByRole('button', { name: 'action-button-subscribe-to-' })
|
||||
.click();
|
||||
await page.getByText('Subscription added').waitFor();
|
||||
|
||||
// Click to unsubscribe from this category
|
||||
await page
|
||||
.getByRole('button', { name: 'action-button-unsubscribe-' })
|
||||
.click();
|
||||
await page.getByText('Subscription removed').waitFor();
|
||||
|
||||
// Navigate through to a part detail page
|
||||
await page.getByRole('cell', { name: 'Thumbnail M3x10 FHS-PLA' }).click();
|
||||
|
||||
// Click to subscribe to this part
|
||||
await page
|
||||
.getByRole('button', { name: 'action-button-subscribe-to-' })
|
||||
.click();
|
||||
await page.getByText('Subscription added').waitFor();
|
||||
|
||||
// Click to unsubscribe from this part
|
||||
await page
|
||||
.getByRole('button', { name: 'action-button-unsubscribe-' })
|
||||
.click();
|
||||
await page.getByText('Subscription removed').waitFor();
|
||||
});
|
||||
|
||||
test('Parts - Manufacturer Parts', async ({ browser }) => {
|
||||
const page = await doCachedLogin(browser, { url: 'part/84/' });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user