Skip to content

Commit

Permalink
fix:fix plugin test case
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Aug 12, 2022
1 parent 8454208 commit 5969525
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ context('Delete Plugin List with the Drawer', () => {
});
cy.get(selector.notification).should('contain', 'Delete Plugin Successfully');
cy.get(selector.notificationCloseIcon).click({ multiple: true });

cy.contains(data.basicAuthPlugin)
.parents(selector.pluginCardBordered)
.within(() => {
cy.get('button').then(($el) => {
const text = $el.text();
expect(text).to.eq('Enable');
});
});
cy.visit('/plugin/list');
cy.get(selector.empty).should('be.visible');
});
Expand Down
4 changes: 1 addition & 3 deletions web/src/pages/Plugin/PluginMarket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ const PluginMarket: React.FC = () => {
schemaType="route"
onChange={(pluginsData, pluginId, handleType) => {
createOrUpdate({
plugins: {
...pluginsData,
},
plugins: pluginsData,
}).then(() => {
initPageData();
notification.success({
Expand Down

0 comments on commit 5969525

Please sign in to comment.