michael-s-molina commented on a change in pull request #16510:
URL: https://github.com/apache/superset/pull/16510#discussion_r712447310



##########
File path: 
superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.test.tsx
##########
@@ -82,10 +82,22 @@ test('renders extra checkboxes when type is time series', 
() => {
 });
 
 test('enables apply and ok buttons', async () => {
-  render(<AnnotationLayer {...defaultProps} />);
-  userEvent.type(screen.getByLabelText('Name'), 'Test');
-  userEvent.type(screen.getByLabelText('Formula'), '2x');
-  await waitFor(() => {
+  const { container } = render(<AnnotationLayer {...defaultProps} />);
+
+  waitFor(() => {

Review comment:
       ```suggestion
     await waitFor(() => {
   ```

##########
File path: 
superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.test.tsx
##########
@@ -82,10 +82,22 @@ test('renders extra checkboxes when type is time series', 
() => {
 });
 
 test('enables apply and ok buttons', async () => {
-  render(<AnnotationLayer {...defaultProps} />);
-  userEvent.type(screen.getByLabelText('Name'), 'Test');
-  userEvent.type(screen.getByLabelText('Formula'), '2x');
-  await waitFor(() => {
+  const { container } = render(<AnnotationLayer {...defaultProps} />);
+
+  waitFor(() => {
+    expect(container).toBeInTheDocument();
+  });
+
+  const nameInput = screen.getByRole('textbox', { name: 'Name' });
+  const formulaInput = screen.getByRole('textbox', { name: 'Formula' });
+
+  expect(nameInput).toBeInTheDocument();
+  expect(formulaInput).toBeInTheDocument();
+
+  userEvent.type(nameInput, 'Name');
+  userEvent.type(formulaInput, '2x');
+
+  waitFor(() => {

Review comment:
       ```suggestion
     await waitFor(() => {
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to