From notifications-return-53271-apmail-superset-notifications-archive=superset.apache.org@superset.apache.org Wed Sep 30 18:07:01 2020 Return-Path: X-Original-To: apmail-superset-notifications-archive@locus.apache.org Delivered-To: apmail-superset-notifications-archive@locus.apache.org Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by minotaur.apache.org (Postfix) with ESMTP id 253051AA84 for ; Wed, 30 Sep 2020 18:06:59 +0000 (UTC) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id 3822A43B4A for ; Wed, 30 Sep 2020 18:06:59 +0000 (UTC) Received: (qmail 18621 invoked by uid 500); 30 Sep 2020 18:06:59 -0000 Delivered-To: apmail-superset-notifications-archive@superset.apache.org Received: (qmail 18596 invoked by uid 500); 30 Sep 2020 18:06:59 -0000 Mailing-List: contact notifications-help@superset.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.apache.org Delivered-To: mailing list notifications@superset.apache.org Received: (qmail 18582 invoked by uid 99); 30 Sep 2020 18:06:59 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Sep 2020 18:06:59 +0000 From: =?utf-8?q?GitBox?= To: notifications@superset.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bincubator-superset=5D_eschutho_commented_on_a_chan?= =?utf-8?q?ge_in_pull_request_=2310916=3A_chore=3A_Moved_selectors_from_clas?= =?utf-8?q?s_to_data-test_specific_in_card=5Fview_tests?= Message-ID: <160148921894.32230.11696791251483728822.asfpy@gitbox.apache.org> Date: Wed, 30 Sep 2020 18:06:58 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: References: eschutho commented on a change in pull request #10916: URL: https://github.com/apache/incubator-superset/pull/10916#discussion_r497700312 ########## File path: superset-frontend/cypress-base/cypress/integration/chart_list/card_view.test.ts ########## @@ -71,37 +73,40 @@ describe('chart card view', () => { cy.get('.Select__control').last().should('be.visible'); cy.get('.Select__control').last().click(); cy.get('.Select__menu').contains('Alphabetical').click(); - cy.get('.chart-list-view').should('be.visible'); - cy.get('.ant-card').first().contains('% Rural'); + cy.get('[data-test="chart-list-view"]').should('be.visible'); + cy.get('[data-test="styled-card"]').first().contains('% Rural'); // sort Recently Modified cy.get('.Select__control').last().should('be.visible'); cy.get('.Select__control').last().click(); cy.get('.Select__menu').contains('Recently Modified').click(); - cy.get('.chart-list-view').should('be.visible'); - cy.get('.ant-card').first().contains('Unicode Cloud'); - cy.get('.ant-card').last().contains('Life Expectancy VS Rural %'); + cy.get('[data-test="chart-list-view"]').should('be.visible'); + cy.get('[data-test="styled-card"]').first().contains('Unicode Cloud'); + cy.get('[data-test="styled-card"]') + .last() + .contains('Life Expectancy VS Rural %'); }); it('should delete correctly', () => { // show delete modal - cy.get('.ant-dropdown-trigger').last().trigger('mouseover'); - cy.get('.ant-dropdown-menu-item').contains('Delete').should('exist'); - cy.get('.ant-dropdown-menu-item').contains('Delete').click(); - cy.get('.modal-dialog').should('be.visible'); - cy.get('.modal-dialog .btn-danger').should('have.attr', 'disabled'); - cy.get(".modal-dialog input[id='delete']").type('DELETE'); - cy.get('.modal-dialog .btn-danger').should('not.have.attr', 'disabled'); - cy.get('.modal-dialog .btn-default').contains('Cancel').click(); + cy.get('[data-test="more-horiz"]').last().trigger('mouseover'); + cy.get('[data-test="delete-option"]').contains('Delete').should('exist'); + cy.get('[data-test="delete-option"]').contains('Delete').click(); + cy.get('[data-test="modal-footer"]').should('exist'); + cy.get('[data-test="delete-button"]').should('have.attr', 'disabled'); + cy.get('[data-test="modal-body"]').should('exist'); + cy.get("[data-test='delete-input']").type('DELETE'); + cy.get('[data-test="delete-button"]').should('not.have.attr', 'disabled'); + cy.get('[data-test="cancel-button"]').click(); }); it('should edit correctly', () => { // show edit modal - cy.get('.ant-dropdown-trigger').last().trigger('mouseover'); - cy.get('.ant-dropdown-menu-item').contains('Edit').should('exist'); - cy.get('.ant-dropdown-menu-item').contains('Edit').click(); - cy.get('.modal-dialog').should('be.visible'); - cy.get('.modal-dialog input[name="name"]').should('not.have.value'); - cy.get('.modal-dialog .btn-default').contains('Cancel').click(); + cy.get('[data-test="more-horiz"]').last().trigger('mouseover'); + cy.get('[data-test="edit-option"]').contains('Edit').should('exist'); + cy.get('[data-test="edit-option"]').contains('Edit').click(); + cy.get('[data-test="edit-modal"]').should('exist'); Review comment: what's the benefit of `exist` over `be.visible` out of curiosity? Can you click on something if it just `exists` but not visible? ---------------------------------------------------------------- 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: users@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org For additional commands, e-mail: notifications-help@superset.apache.org