williaster commented on a change in pull request #5693: Adding simple Cypress
tests
URL:
https://github.com/apache/incubator-superset/pull/5693#discussion_r214182996
##########
File path: superset/assets/cypress/integration/dashboard/dashboard_tests.js
##########
@@ -0,0 +1,26 @@
+describe('Load dashboard', function () {
+ it('Load birth names dashboard', function () {
+ cy.server();
+ cy.login();
+
+ cy.visit('/superset/dashboard/births');
+
+ cy.route('POST', '/superset/explore_json/**').as('getJson');
+ cy.wait(7000, ['@getJson']);
+
+ let sliceData;
+
+ cy.get('@getJson.all').then((xhrs) => {
+ sliceData = xhrs;
+ xhrs.forEach((data) => {
+ expect(data.status).to.eq(200);
+ expect(data.response.body).to.have.property('error', null);
+ cy.get(`#slice-container-${data.response.body.form_data.slice_id}`);
Review comment:
does it for sure fail in the case that it doesn't exist? is it better/safer
to chain a `.then()` with an expect?
----------------------------------------------------------------
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]