ts fixes from reorg + unit test work
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 53s
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 53s
This commit is contained in:
@@ -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] } });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user