graceguo-supercat commented on a change in pull request #7770: Autocomplete in 
the table browser in SQL lab is broken - Fix part 2
URL: 
https://github.com/apache/incubator-superset/pull/7770#discussion_r297324394
 
 

 ##########
 File path: superset/assets/spec/javascripts/components/TableSelector_spec.jsx
 ##########
 @@ -139,27 +150,48 @@ describe('TableSelector', () => {
 
     it('should fetch table options', () => {
       fetchMock.get(FETCH_TABLES_GLOB, tables, { overwriteRoutes: true });
-      inst
+      return inst
         .fetchTables(true, 'birth_names')
         .then(() => {
           expect(wrapper.state().tableOptions).toHaveLength(3);
+          expect(wrapper.state().tableOptions).toEqual([
+            {
+              value: 'birth_names',
+              schema: 'main',
+              label: 'birth_names',
+              title: 'birth_names',
+            },
+            {
+              value: 'energy_usage',
+              schema: 'main',
+              label: 'energy_usage',
+              title: 'energy_usage',
+            },
+            {
+              value: 'wb_health_population',
+              schema: 'main',
+              label: 'wb_health_population',
+              title: 'wb_health_population',
+            },
+          ]);
           return Promise.resolve();
         });
     });
 
-    it('should dispatch a danger toast on error', () => {
-      fetchMock.get(FETCH_TABLES_GLOB, { throws: 'error' }, { overwriteRoutes: 
true });
+    // // Test needs to be fixed: Github issue #7768
+    // it('should dispatch a danger toast on error', () => {
 
 Review comment:
   to disable a test, you can change `it` to `xit`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to