Fix add product dialog opening and duplicate validation tests
This commit is contained in:
1 parent
e4c51d69b6
commit
f6498c1bbc
2 files changed
+26
-7
No files matched your search
@@ -58,6 +58,7 @@ describe('ManageProductsScreen add and update flows', () => {
|
||||
</MemoryRouter>,
|
||||
);
|
||||
|
||||
await user.click(screen.getByRole('button', { name: /add product/i }));
|
||||
await user.type(screen.getByLabelText(/name/i), 'New Product');
|
||||
await selectCategory(user, 'Snacks');
|
||||
await user.type(screen.getByLabelText(/barcode/i), '111');
|
||||
@@ -91,6 +92,7 @@ describe('ManageProductsScreen add and update flows', () => {
|
||||
</MemoryRouter>,
|
||||
);
|
||||
|
||||
await user.click(screen.getByRole('button', { name: /add product/i }));
|
||||
await user.type(screen.getByLabelText(/name/i), 'Another');
|
||||
await selectCategory(user, 'Snacks');
|
||||
await user.click(screen.getByText(/scan barcode/i));
|
||||
@@ -139,6 +141,7 @@ describe('ManageProductsScreen add and update flows', () => {
|
||||
</MemoryRouter>,
|
||||
);
|
||||
|
||||
await user.click(screen.getByRole('button', { name: /add product/i }));
|
||||
await user.type(screen.getByLabelText(/name/i), 'Lettuce');
|
||||
await selectCategory(user, 'Fresh');
|
||||
await clickSaveButton(user);
|
||||
|
||||
Reference in new issue
Block a user