Baoyuantop commented on a change in pull request #2393: URL: https://github.com/apache/apisix-dashboard/pull/2393#discussion_r834880695
########## File path: web/src/pages/PluginTemplate/List.tsx ########## @@ -162,6 +180,21 @@ const Page: React.FC = () => { </Button>, ]} /> + <RawDataEditor + visible={visible} + type="service" + readonly={true} + data={rawData} + onClose={() => { + setVisible(false); + }} + onSubmit={(data: any) => { + (editorMode === 'create' ? create(data) : update(id, data)).then(() => { + setVisible(false); Review comment: Do we need a message alert? ########## File path: web/cypress/integration/pluginTemplate/create-edit-delete-plugin-template.spec.js ########## @@ -77,6 +78,19 @@ context('Create Configure and Delete PluginTemplate', () => { cy.contains('Submit').click(); cy.get(selector.notification).should('contain', data.createPluginTemplateSuccess); }); + it('should view the service', function () { + cy.visit('plugin-template/list'); + cy.get(selector.refresh).click(); + cy.get(selector.descriptionSelector).type(data.pluginTemplateName); + cy.contains('button', 'Search').click(); + cy.contains(data.pluginTemplateName).siblings().contains('View').click(); + cy.get(selector.drawer).should('be.visible'); + + cy.get(selector.monacoScroll).within(() => { + cy.contains('plugins').should('exist'); + cy.contains(data.pluginTemplateName).should('exist'); + }); + }); Review comment: Since see that RawDataEditor has the ability to modify data, should we add tests to cover it? -- 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. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org