eschutho commented on a change in pull request #10834:
URL: 
https://github.com/apache/incubator-superset/pull/10834#discussion_r499779700



##########
File path: 
superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts
##########
@@ -0,0 +1,189 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// eslint-disable-next-line import/no-extraneous-dependencies
+import * as ace from 'brace';
+import shortid from 'shortid';
+import { WORLD_HEALTH_DASHBOARD } from './dashboard.helper';
+
+function selectColorScheme(color: string) {
+  // open color scheme dropdown
+  cy.get('.modal-body')
+    .contains('Color Scheme')
+    .parents('.ControlHeader')
+    .next('.Select')
+    .click()
+    .then($colorSelect => {
+      // select a new color scheme
+      cy.wrap($colorSelect).find(`[data-test="${color}"]`).click();
+    });
+}
+
+function assertMetadata(text: string) {
+  const regex = new RegExp(text);
+  cy.get('.modal-body')
+    .find('#json_metadata')
+    .should('be.visible')
+    .then(() => {
+      const metadata = cy.$$('#json_metadata')[0];
+
+      // cypress can read this locally, but not in ci
+      // so we have to use the ace module directly to fetch the value
+      expect(ace.edit(metadata).getValue()).to.match(regex);
+    });
+}
+
+function typeMetadata(text: string) {
+  cy.get('.modal-body').find('#json_metadata').should('be.visible').type(text);
+}
+
+function openAdvancedProperties() {
+  return cy
+    .get('.modal-body')
+    .contains('Advanced')
+    .should('be.visible')
+    .click();
+}
+
+function openDashboardEditProperties() {
+  // open dashboard properties edit modal
+  cy.get('#save-dash-split-button').trigger('click', { force: true });
+  cy.get('.dropdown-menu').contains('Edit dashboard properties').click();
+}
+
+describe('Dashboard edit action', () => {
+  beforeEach(() => {
+    cy.server();
+    cy.login();
+    cy.visit(WORLD_HEALTH_DASHBOARD);
+    cy.route(`/api/v1/dashboard/1`).as('dashboardGet');
+    cy.get('.dashboard-grid', { timeout: 50000 })
+      .should('be.visible') // wait for 50 secs to load dashboard
+      .then(() => {
+        cy.get('.dashboard-header [data-test=pencil]')
+          .should('be.visible')
+          .click();
+        openDashboardEditProperties();
+      });
+  });
+
+  xit('should update the title', () => {

Review comment:
       reran an confirmed which ones aren't passing on CI still. I also added 
comments to show why they are "exited". 

##########
File path: 
superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts
##########
@@ -0,0 +1,189 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// eslint-disable-next-line import/no-extraneous-dependencies
+import * as ace from 'brace';
+import shortid from 'shortid';
+import { WORLD_HEALTH_DASHBOARD } from './dashboard.helper';
+
+function selectColorScheme(color: string) {
+  // open color scheme dropdown
+  cy.get('.modal-body')
+    .contains('Color Scheme')
+    .parents('.ControlHeader')
+    .next('.Select')
+    .click()
+    .then($colorSelect => {
+      // select a new color scheme
+      cy.wrap($colorSelect).find(`[data-test="${color}"]`).click();
+    });
+}
+
+function assertMetadata(text: string) {
+  const regex = new RegExp(text);
+  cy.get('.modal-body')
+    .find('#json_metadata')
+    .should('be.visible')
+    .then(() => {
+      const metadata = cy.$$('#json_metadata')[0];
+
+      // cypress can read this locally, but not in ci
+      // so we have to use the ace module directly to fetch the value
+      expect(ace.edit(metadata).getValue()).to.match(regex);
+    });
+}
+
+function typeMetadata(text: string) {
+  cy.get('.modal-body').find('#json_metadata').should('be.visible').type(text);
+}
+
+function openAdvancedProperties() {
+  return cy
+    .get('.modal-body')
+    .contains('Advanced')
+    .should('be.visible')
+    .click();
+}
+
+function openDashboardEditProperties() {
+  // open dashboard properties edit modal
+  cy.get('#save-dash-split-button').trigger('click', { force: true });
+  cy.get('.dropdown-menu').contains('Edit dashboard properties').click();
+}
+
+describe('Dashboard edit action', () => {
+  beforeEach(() => {
+    cy.server();
+    cy.login();
+    cy.visit(WORLD_HEALTH_DASHBOARD);
+    cy.route(`/api/v1/dashboard/1`).as('dashboardGet');
+    cy.get('.dashboard-grid', { timeout: 50000 })
+      .should('be.visible') // wait for 50 secs to load dashboard
+      .then(() => {
+        cy.get('.dashboard-header [data-test=pencil]')
+          .should('be.visible')
+          .click();
+        openDashboardEditProperties();
+      });
+  });
+
+  xit('should update the title', () => {

Review comment:
       reran and confirmed which ones aren't passing on CI still. I also added 
comments to show why they are "exited". 




----------------------------------------------------------------
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]



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

Reply via email to