rusackas commented on code in PR #45604:
URL: https://github.com/apache/superset/pull/45604#discussion_r4366091601


##########
superset-frontend/src/explore/components/controls/ColorSchemeControl/ColorSchemeControl.test.tsx:
##########
@@ -151,6 +151,33 @@ test('displays color scheme options', async () => {
   });
 });
 
+test('grouped-option styles reach the popup portaled to document.body', async 
() => {
+  [...CategoricalD3, ...CategoricalModernSunset].forEach(scheme =>
+    getCategoricalSchemeRegistry().registerValue(scheme.id, scheme),
+  );
+  setup();
+  await userEvent.click(
+    screen.getByLabelText('Select color scheme', { selector: 'input' }),
+  );
+  await waitFor(() => {
+    expect(screen.getByText('Featured color palettes')).toBeInTheDocument();
+  });
+  const popup = document.querySelector('.ant-select-dropdown')!;
+  expect(popup.closest('body')).toBe(document.body);

Review Comment:
   Good point. The assertion now checks the popup is not inside the control's 
rendered container, so a regression to `triggerNode.parentNode` would fail it.



-- 
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