ts fixes from reorg + unit test work
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 53s

This commit is contained in:
2025-11-25 16:01:06 -08:00
parent 98a29b17d1
commit 3af0183444
9 changed files with 46 additions and 364 deletions

View File

@@ -67,7 +67,8 @@ describe('AdminBrandManager', () => {
await waitFor(() => expect(screen.getByText('No Frills')).toBeInTheDocument());
const file = new File(['logo'], 'logo.png', { type: 'image/png' });
const input = screen.getAllByRole('textbox', { hidden: true })[0]; // Find the first file input
// Use the new accessible label to find the correct input.
const input = screen.getByLabelText('Upload logo for No Frills');
fireEvent.change(input, { target: { files: [file] } });
@@ -89,7 +90,7 @@ describe('AdminBrandManager', () => {
await waitFor(() => expect(screen.getByText('No Frills')).toBeInTheDocument());
const file = new File(['logo'], 'logo.png', { type: 'image/png' });
const input = screen.getAllByRole('textbox', { hidden: true })[0];
const input = screen.getByLabelText('Upload logo for No Frills');
fireEvent.change(input, { target: { files: [file] } });
@@ -104,7 +105,7 @@ describe('AdminBrandManager', () => {
await waitFor(() => expect(screen.getByText('No Frills')).toBeInTheDocument());
const file = new File(['text'], 'document.txt', { type: 'text/plain' });
const input = screen.getAllByRole('textbox', { hidden: true })[0];
const input = screen.getByLabelText('Upload logo for No Frills');
fireEvent.change(input, { target: { files: [file] } });
@@ -120,7 +121,7 @@ describe('AdminBrandManager', () => {
await waitFor(() => expect(screen.getByText('No Frills')).toBeInTheDocument());
const file = new File(['a'.repeat(3 * 1024 * 1024)], 'large.png', { type: 'image/png' });
const input = screen.getAllByRole('textbox', { hidden: true })[0];
const input = screen.getByLabelText('Upload logo for No Frills');
fireEvent.change(input, { target: { files: [file] } });