This is an automated email from the ASF dual-hosted git repository.

michellet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 97cb10d  Make it easier to select dropdown options in control tests 
(#6546)
97cb10d is described below

commit 97cb10dbc833be04829891af08ca69ac5ff37102
Author: michellethomas <[email protected]>
AuthorDate: Thu Jan 24 10:10:22 2019 -0800

    Make it easier to select dropdown options in control tests (#6546)
---
 superset/assets/cypress/integration/explore/control.test.js | 4 ++--
 superset/assets/src/components/VirtualizedRendererWrap.jsx  | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/superset/assets/cypress/integration/explore/control.test.js 
b/superset/assets/cypress/integration/explore/control.test.js
index 319dacb..ba4636c 100644
--- a/superset/assets/cypress/integration/explore/control.test.js
+++ b/superset/assets/cypress/integration/explore/control.test.js
@@ -89,8 +89,8 @@ describe('AdhocMetrics', () => {
     cy.get('[data-test=metrics]').within(() => {
       cy.get('.select-clear').click();
       cy.get('.Select-control').click({ force: true });
-      cy.get('input').type('num{downarrow}', { force: true });
-      cy.get('.VirtualizedSelectFocusedOption')
+      cy.get('input').type('num', { force: true });
+      cy.get('.VirtualizedSelectOption[data-test=_col_num]')
         .trigger('mousedown')
         .click();
     });
diff --git a/superset/assets/src/components/VirtualizedRendererWrap.jsx 
b/superset/assets/src/components/VirtualizedRendererWrap.jsx
index 283ff4f..1b15557 100644
--- a/superset/assets/src/components/VirtualizedRendererWrap.jsx
+++ b/superset/assets/src/components/VirtualizedRendererWrap.jsx
@@ -55,6 +55,7 @@ export default function VirtualizedRendererWrap(renderer) {
         key={key}
         style={{ ...(option.style || {}), ...style }}
         title={option.title}
+        data-test={option.optionName}
         {...events}
       >
         {renderer(option)}

Reply via email to