mirror of
https://github.com/inventree/InvenTree.git
synced 2025-12-17 09:48:30 +00:00
* Form Field updates: - Allow spec of leftSection prop - Allow spec of rightSection prop * Add ability to auto-fill text input with placeholder value * Simplify stock form * Better serial number placeholders * Update other generator fields * Add default placeholder to DateInput * Enhance TextField * Remove serial_numbers field for non-creation forms * Update playwright tests * Adjust playwright tests * Further playwright adjustments * Fix project code field for build serializer
43 lines
1.7 KiB
TypeScript
43 lines
1.7 KiB
TypeScript
import { test } from '../baseFixtures.js';
|
|
import { loadTab, navigate } from '../helpers.js';
|
|
import { doCachedLogin } from '../login.js';
|
|
|
|
test('Company', async ({ browser }) => {
|
|
const page = await doCachedLogin(browser);
|
|
|
|
await navigate(page, 'company/1/details');
|
|
await page.getByLabel('Details').getByText('DigiKey Electronics').waitFor();
|
|
await page.getByRole('cell', { name: 'https://www.digikey.com/' }).waitFor();
|
|
await loadTab(page, 'Supplied Parts');
|
|
await page
|
|
.getByRole('cell', { name: 'RR05P100KDTR-ND', exact: true })
|
|
.waitFor();
|
|
await loadTab(page, 'Purchase Orders');
|
|
await page.getByRole('cell', { name: 'Molex connectors' }).first().waitFor();
|
|
await loadTab(page, 'Stock Items');
|
|
await page
|
|
.getByRole('cell', { name: 'Blue plastic enclosure' })
|
|
.first()
|
|
.waitFor();
|
|
await loadTab(page, 'Contacts');
|
|
await page.getByRole('cell', { name: 'jimmy.mcleod@digikey.com' }).waitFor();
|
|
await loadTab(page, 'Addresses');
|
|
await page.getByRole('cell', { name: 'Carla Tunnel' }).waitFor();
|
|
await loadTab(page, 'Attachments');
|
|
await loadTab(page, 'Notes');
|
|
|
|
// Let's edit the company details
|
|
await page.getByLabel('action-menu-company-actions').click();
|
|
await page.getByLabel('action-menu-company-actions-edit').click();
|
|
|
|
await page.getByLabel('text-field-name', { exact: true }).fill('');
|
|
await page
|
|
.getByLabel('text-field-website', { exact: true })
|
|
.fill('invalid-website');
|
|
await page.getByRole('button', { name: 'Submit' }).click();
|
|
|
|
await page.getByText('This field may not be blank.').waitFor();
|
|
await page.getByText('Enter a valid URL.').waitFor();
|
|
await page.getByRole('button', { name: 'Cancel' }).click();
|
|
});
|