mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-01 09:41:22 +00:00
[UI] Snippet editor (#12299)
* Implement admin editor for report snippets * Report asset management * Add playwright test for report snippets * Add playwright test for "Report Assets" panel * Updated docs
This commit is contained in:
@@ -254,6 +254,37 @@ test('Settings - Admin', async ({ browser }) => {
|
||||
await loadTab(page, 'Category Parameters');
|
||||
await loadTab(page, 'Label Templates');
|
||||
await loadTab(page, 'Report Templates');
|
||||
|
||||
// Check the "report snippets" panel
|
||||
await loadTab(page, 'Report Snippets');
|
||||
await page
|
||||
.getByText(
|
||||
'Snippets are reusable pieces of HTML content that can be inserted into reports and labels.'
|
||||
)
|
||||
.waitFor();
|
||||
|
||||
// Launch the dialog to upload a new snippet
|
||||
await page.getByLabel('action-button-add-snippet').click();
|
||||
await page.getByText('Add Snippet', { exact: true }).waitFor();
|
||||
await page.locator('input[type="file"]').waitFor({ state: 'attached' });
|
||||
await page.getByLabel('text-field-description').waitFor();
|
||||
await page.getByRole('button', { name: 'Cancel' }).click();
|
||||
|
||||
// Check the "report assets" panel
|
||||
await loadTab(page, 'Report Assets');
|
||||
await page
|
||||
.getByText(
|
||||
'Assets are files (such as images) which can be used when rendering reports and labels.'
|
||||
)
|
||||
.waitFor();
|
||||
|
||||
// Launch the dialog to upload a new asset
|
||||
await page.getByLabel('action-button-add-asset').click();
|
||||
await page.getByText('Add Asset', { exact: true }).waitFor();
|
||||
await page.locator('input[type="file"]').waitFor({ state: 'attached' });
|
||||
await page.getByLabel('text-field-description').waitFor();
|
||||
await page.getByRole('button', { name: 'Cancel' }).click();
|
||||
|
||||
await loadTab(page, 'Plugins');
|
||||
|
||||
// Adjust some "location type" items
|
||||
|
||||
Reference in New Issue
Block a user