liuxiran commented on a change in pull request #1907:
URL: https://github.com/apache/apisix-dashboard/pull/1907#discussion_r650210573
##########
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:
sorry for late reply @qian0817 , actually I don't have better way and
what I mean is that you can add note or some references to helper new comers.
anyway , thanks for your great work
##########
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:
also cc @LiteSun @guoqqqi see if there are any good suggestions
--
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]