2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-27 01:00:53 +00:00

Remove <Playground> from PUI frontend (#8276)

* Remove <Playground> from PUI frontend

- Components are now mature enough with sufficient examples in the codebase

* Remove dead code
This commit is contained in:
Oliver
2024-10-13 20:58:53 +11:00
committed by GitHub
parent 8aade768c3
commit 7d3eb433d6
6 changed files with 1 additions and 349 deletions

View File

@ -1,78 +1,6 @@
import { test } from '../baseFixtures.js';
import { doQuickLogin } from '../login.js';
const newPartName = 'UITESTIN123';
test('Pages - Index - Playground', async ({ page }) => {
await doQuickLogin(page);
await page.goto('./');
// Playground
await page.getByRole('tab', { name: 'Playground' }).click();
await page.getByRole('button', { name: 'API Forms' }).click();
// New Part
await page.getByRole('button', { name: 'Create New Part' }).click();
await page.getByLabel('related-field-category').fill('category 0');
await page
.getByRole('option', { name: 'Category 0' })
.locator('div')
.first()
.click();
// Set the "name"
await page.getByLabel('text-field-name').fill(newPartName);
await page.getByLabel('number-field-initial_stock').fill('1');
await page
.getByLabel('Create Part')
.getByRole('button', { name: 'Cancel' })
.click();
// Edit Part
await page.getByRole('button', { name: 'Edit Part' }).click();
await page.getByLabel('IPN').click();
await page.getByLabel('IPN').fill(newPartName);
await page
.getByLabel('Edit Part')
.getByRole('button', { name: 'Cancel' })
.click();
// Create Stock Item
await page.getByRole('button', { name: 'Create Stock Item' }).click();
await page.getByLabel('related-field-part').fill('R_1K_0402_1');
await page.getByText('R_1K_0402_1%').click();
await page
.getByLabel('Add Stock Item')
.getByRole('button', { name: 'Cancel' })
.click();
// EditCategory
await page.getByRole('button', { name: 'Edit Category' }).click();
await page.getByLabel('related-field-parent').click();
await page.getByText('Category 0').click();
await page
.getByLabel('Edit Category')
.getByRole('button', { name: 'Cancel' })
.click();
// Create Part new Modal
await page.getByRole('button', { name: 'Create Part new Modal' }).click();
await page.getByLabel('related-field-category').click();
await page.getByText('Category 0').click();
await page
.getByLabel('Create part')
.getByRole('button', { name: 'Cancel' })
.click();
// Status Label
await page.getByRole('button', { name: 'Status labels' }).click();
await page.getByRole('textbox').dblclick();
await page.getByRole('textbox').fill('50');
await page.getByText('Attention needed').waitFor();
});
test('Pages - Index - Dashboard', async ({ page }) => {
await doQuickLogin(page);