mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-23 23:30:54 +00:00
[Documentation] Remove package credits (#8811)
* Remove hard-coded credits from docs - Extract *actual* package credits - Auto-build into docs * Include URLs when generating python license data * Update readthedocs process * Better URL extraction * Adjust build process for RTD * Spelling fixes * Install node and yarn * Command fix * Improved library sorting * Improved error message * Remove credits.md * Cleanup * Further cleanup * Tweak playwright test * Handle uncaught exception in fetchIcons * Fix for CORS settings in playwright testing * Enhance login check * Fix for barcode test --------- Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
docs
src
@ -40,7 +40,10 @@ export default defineConfig({
|
||||
env: {
|
||||
INVENTREE_DEBUG: 'True',
|
||||
INVENTREE_PLUGINS_ENABLED: 'True',
|
||||
INVENTREE_ADMIN_URL: 'test-admin'
|
||||
INVENTREE_ADMIN_URL: 'test-admin',
|
||||
INVENTREE_SITE_URL: 'http://localhost:8000',
|
||||
INVENTREE_CORS_ORIGIN_ALLOW_ALL: 'True',
|
||||
INVENTREE_COOKIE_SAMESITE: 'Lax'
|
||||
},
|
||||
url: 'http://127.0.0.1:8000/api/',
|
||||
reuseExistingServer: !process.env.CI,
|
||||
|
@ -27,8 +27,7 @@ export function Boundary({
|
||||
}>): ReactNode {
|
||||
const onError = useCallback(
|
||||
(error: unknown, componentStack: string | undefined, eventId: string) => {
|
||||
console.error(`Error rendering component: ${label}`);
|
||||
console.error(error, componentStack);
|
||||
console.error(`ERR: Error rendering component: ${label}`);
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
@ -36,7 +36,18 @@ export const useIconState = create<IconState>()((set, get) => ({
|
||||
fetchIcons: async () => {
|
||||
if (get().hasLoaded) return;
|
||||
|
||||
const packs = await api.get(apiUrl(ApiEndpoints.icons));
|
||||
const packs = await api.get(apiUrl(ApiEndpoints.icons)).catch((_error) => {
|
||||
console.error('ERR: Could not fetch icon packages');
|
||||
showNotification({
|
||||
title: t`Error`,
|
||||
message: t`Error loading icon package from server`,
|
||||
color: 'red'
|
||||
});
|
||||
});
|
||||
|
||||
if (!packs) {
|
||||
return;
|
||||
}
|
||||
|
||||
await Promise.all(
|
||||
packs.data.map(async (pack: any) => {
|
||||
|
@ -34,6 +34,7 @@ export const doQuickLogin = async (
|
||||
await page.goto(`${url}/login/?login=${username}&password=${password}`);
|
||||
await page.waitForURL('**/platform/home');
|
||||
|
||||
await page.getByLabel('navigation-menu').waitFor();
|
||||
await page.getByText(/InvenTree Demo Server -/).waitFor();
|
||||
};
|
||||
|
||||
|
@ -35,8 +35,24 @@ test('Purchase Orders - Barcodes', async ({ page }) => {
|
||||
await page.getByRole('img', { name: 'QR Code' }).waitFor();
|
||||
await page.getByRole('banner').getByRole('button').click();
|
||||
|
||||
// Link to barcode
|
||||
// Un-link barcode if a link exists
|
||||
await page.getByLabel('action-menu-barcode-actions').click();
|
||||
await page.waitForTimeout(100);
|
||||
|
||||
if (
|
||||
await page
|
||||
.getByLabel('action-menu-barcode-actions-unlink-barcode')
|
||||
.isVisible()
|
||||
) {
|
||||
await page.getByLabel('action-menu-barcode-actions-unlink-barcode').click();
|
||||
await page.getByRole('button', { name: 'Unlink Barcode' }).click();
|
||||
await page.waitForTimeout(100);
|
||||
} else {
|
||||
await page.keyboard.press('Escape');
|
||||
}
|
||||
|
||||
// Link to barcode
|
||||
await page.getByLabel('action-menu-barcode-actions', { exact: true }).click();
|
||||
await page.getByLabel('action-menu-barcode-actions-link-barcode').click();
|
||||
|
||||
await page.getByLabel('barcode-input-scanner').click();
|
||||
@ -49,7 +65,7 @@ test('Purchase Orders - Barcodes', async ({ page }) => {
|
||||
await page.getByRole('button', { name: 'Issue Order' }).waitFor();
|
||||
|
||||
// Ensure we can scan back to this page, with the associated barcode
|
||||
await page.goto(`${baseUrl}/home`);
|
||||
await page.goto(`${baseUrl}/`);
|
||||
await page.waitForTimeout(250);
|
||||
await page.getByRole('button', { name: 'Open Barcode Scanner' }).click();
|
||||
await page.getByPlaceholder('Enter barcode data').fill('1234567890');
|
||||
|
Reference in New Issue
Block a user