mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-27 01:00:53 +00:00
Stock Transfer Improvements (#8570)
* Allow transfer of items independent of status marker * Update test * Display errors in stock transsfer form * Add option to set status when transferring stock * Fix inStock check for stock actions * Allow adjustment of status when counting stock item * Allow status adjustment for other actions: - Remove stock - Add stock * Revert error behavior * Enhanced unit test * Unit test fix * Bump API version * Fix for playwright test - Added helper func * Extend playwright tests for stock actions
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
import { test } from '../baseFixtures.ts';
|
||||
import { baseUrl } from '../defaults.ts';
|
||||
import { clearTableFilters, setTableChoiceFilter } from '../helpers.ts';
|
||||
import { doQuickLogin } from '../login.ts';
|
||||
|
||||
test('Sales Orders', async ({ page }) => {
|
||||
test('Sales Orders - Basic Tests', async ({ page }) => {
|
||||
await doQuickLogin(page);
|
||||
|
||||
await page.goto(`${baseUrl}/home`);
|
||||
@ -11,7 +12,11 @@ test('Sales Orders', async ({ page }) => {
|
||||
|
||||
// Check for expected text in the table
|
||||
await page.getByRole('tab', { name: 'Sales Orders' }).waitFor();
|
||||
await page.getByText('In Progress').first().waitFor();
|
||||
|
||||
await clearTableFilters(page);
|
||||
|
||||
await setTableChoiceFilter(page, 'status', 'On Hold');
|
||||
|
||||
await page.getByText('On Hold').first().waitFor();
|
||||
|
||||
// Navigate to a particular sales order
|
||||
|
@ -182,10 +182,22 @@ test('Stock - Stock Actions', async ({ page }) => {
|
||||
await page.getByLabel('action-menu-stock-operations-count').waitFor();
|
||||
await page.getByLabel('action-menu-stock-operations-add').waitFor();
|
||||
await page.getByLabel('action-menu-stock-operations-remove').waitFor();
|
||||
|
||||
await page.getByLabel('action-menu-stock-operations-transfer').click();
|
||||
await page.getByLabel('text-field-notes').fill('test notes');
|
||||
await page.getByRole('button', { name: 'Submit' }).click();
|
||||
await page.getByText('This field is required.').first().waitFor();
|
||||
|
||||
// Set the status field
|
||||
await page.getByLabel('action-button-change-status').click();
|
||||
await page.getByLabel('choice-field-status').click();
|
||||
await page.getByText('Attention needed').click();
|
||||
|
||||
// Set the packaging field
|
||||
await page.getByLabel('action-button-adjust-packaging').click();
|
||||
await page.getByLabel('text-field-packaging').fill('test packaging');
|
||||
|
||||
// Close the dialog
|
||||
await page.getByRole('button', { name: 'Cancel' }).click();
|
||||
|
||||
// Find an item which has been sent to a customer
|
||||
|
Reference in New Issue
Block a user