mirror of
https://github.com/inventree/InvenTree.git
synced 2026-05-06 09:43:38 +00:00
[UI] Fix ReturnOrder table (#11845)
* [UI] Fix ReturnOrder table - Closes https://github.com/inventree/InvenTree/issues/11833 * Add playwright test
This commit is contained in:
@@ -194,7 +194,9 @@ export default function ReturnOrderLineItemTable({
|
||||
tooltip={t`Receive selected items`}
|
||||
icon={<IconSquareArrowRight />}
|
||||
hidden={
|
||||
!editable || inProgress || !user.hasChangeRole(UserRoles.return_order)
|
||||
!editable ||
|
||||
!inProgress ||
|
||||
!user.hasChangeRole(UserRoles.return_order)
|
||||
}
|
||||
onClick={() => {
|
||||
setSelectedItems(
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import test, { expect } from '@playwright/test';
|
||||
import { noaccessuser } from '../defaults';
|
||||
import { navigate } from '../helpers';
|
||||
import { doLogin } from '../login';
|
||||
|
||||
/**
|
||||
* Tests for user interface customization functionality.
|
||||
@@ -20,14 +18,3 @@ test('Customization - Splash', async ({ page }) => {
|
||||
page.locator('[style*="playwright_custom_splash.png"]')
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
test('Customization - Logo', async ({ page }) => {
|
||||
await doLogin(page, {
|
||||
user: noaccessuser
|
||||
});
|
||||
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
await page.waitForTimeout(2500);
|
||||
return;
|
||||
});
|
||||
|
||||
@@ -829,7 +829,7 @@ test('Parts - Parameter Filtering', async ({ browser }) => {
|
||||
test('Parts - Test Results', async ({ browser }) => {
|
||||
const page = await doCachedLogin(browser, { url: '/part/74/test_results' });
|
||||
|
||||
await page.waitForTimeout(2500);
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
await page.getByText(/1 - \d+ \/ 1\d\d/).waitFor();
|
||||
await page.getByText('Blue Paint Applied').waitFor();
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import test from '@playwright/test';
|
||||
import { loadTab } from '../helpers';
|
||||
import { doCachedLogin } from '../login';
|
||||
|
||||
test('Return Orders - Receive Items', async ({ browser }) => {
|
||||
const page = await doCachedLogin(browser, {
|
||||
url: 'sales/index/returnorders'
|
||||
});
|
||||
|
||||
await page.getByRole('cell', { name: 'RMA-0002' }).click();
|
||||
await loadTab(page, 'Parameters');
|
||||
await loadTab(page, 'Attachments');
|
||||
await loadTab(page, 'Line Items');
|
||||
|
||||
await page.getByRole('checkbox', { name: 'Select all records' }).click();
|
||||
await page.getByRole('button', { name: 'action-button-receive-' }).click();
|
||||
await page.getByRole('banner').getByText('Receive Items').waitFor();
|
||||
await page.getByRole('button', { name: 'Cancel' }).click();
|
||||
});
|
||||
Reference in New Issue
Block a user