qian0817 commented on a change in pull request #1907:
URL: https://github.com/apache/apisix-dashboard/pull/1907#discussion_r644761722



##########
File path: 
web/cypress/integration/consumer/create-consumer-with-api-breaker-plugin-form.spec.js
##########
@@ -60,17 +59,13 @@ context('Create and delete consumer with api-breaker plugin 
form', () => {
     });
     cy.focused(selector.drawer).should('exist');
     cy.get(selector.disabledSwitcher).click();
-    // edit codemirror
-    cy.get(selector.codeMirror)
-      .first()
-      .then((editor) => {
-        editor[0].CodeMirror.setValue(
-          JSON.stringify({
-            key: 'test',
-          }),
-        );
-        cy.contains('button', 'Submit').click();
-      });
+
+    // edit monaco
+    cy.window().then((window) => {
+      cy.waitUntil(() => window.monacoEditor)

Review comment:
       @liuxiran I need to wait for `window.monacoEditor` to be set which means 
monaco editor is initialized successfully. Can you tell me any better way to 
achieve this, please.




-- 
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:
us...@infra.apache.org


Reply via email to