kristw commented on a change in pull request #5974: [cypress] add SQL lab tests
URL:
https://github.com/apache/incubator-superset/pull/5974#discussion_r223826208
##########
File path: superset/assets/cypress/integration/sqllab/tabs.js
##########
@@ -0,0 +1,39 @@
+export default () => {
+ describe('SqlLab query tabs', () => {
+ beforeEach(() => {
+ cy.login();
+ cy.server();
+ cy.visit('/superset/sqllab');
+ });
+
+ it('allows you to create a tab', () => {
+ cy.get('#a11y-query-editor-tabs > ul > li').then((tabList) => {
+ const initialTabCount = tabList.length;
+
+ // add tab
+ cy.get('#a11y-query-editor-tabs > ul > li')
+ .last()
+ .click();
+
+ cy.get('#a11y-query-editor-tabs > ul > li').should('have.length',
initialTabCount + 1);
+ });
+ });
+
+ it('allows you to close a tab', () => {
+ cy.get('#a11y-query-editor-tabs > ul > li').then((tabListA) => {
+ const initialTabCount = tabListA.length;
+
+ // open the tab dropdown to remove
+ cy.get('#a11y-query-editor-tabs > ul > li:first button')
+ .click()
+ .then(() => {
Review comment:
Is this `.then` required?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]