2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-03-11 14:44:18 +00:00
Files
InvenTree/src/frontend/tests/customization/customization.spec.ts
Oliver 2df9eb80ca [bug] Fix custom logo and splash (#11391) (#11399)
* Add custom logo and splash to playwright fixtures

* Render custom logo in frontend

* Add playwright tests for customization settings

* Separate playwright run for customization

* Update ci file

* Update playwright config file

* Do not call get_custom_file from withing settings.py

- django app not fully initialized yet
- can cause loops

* Disable default tests (for now)

* Re-enable normal tests

* Update qc checks

* Order of operations?

* Debug output

* Use env

* Add more debug info

* More debug

* Further debug

* Add collectstatic check

* Run normal tests too

* Remove debug prints
2026-02-22 22:46:25 +11:00

34 lines
1.0 KiB
TypeScript

import test, { expect } from '@playwright/test';
import { navigate } from '../helpers';
import { doLogin } from '../login';
/**
* Tests for user interface customization functionality.
*
* Note: The correct environment variables must be set for these tests to work correctly. See "playwright.config.ts" for details.
* These tests are designed to run in CI environments where specific environment variables are set to enable custom logos and splash screens. The tests verify that these customizations are correctly applied in the user interface.
*/
test('Customization - Splash', async ({ page }) => {
await navigate(page, '/');
await page.waitForLoadState('networkidle');
// Check for the custom splash screen
await expect(
page.locator('[style*="playwright_custom_splash.png"]')
).toBeVisible();
});
test('Customization - Logo', async ({ page }) => {
await doLogin(page, {
username: 'noaccess',
password: 'youshallnotpass'
});
await page.waitForLoadState('networkidle');
await page.waitForTimeout(2500);
return;
});