-
Notifications
You must be signed in to change notification settings - Fork 539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Adding a Loading state to buttons #2630
Conversation
also @SkyeYoung PTAL |
Codecov Report
@@ Coverage Diff @@
## master #2630 +/- ##
==========================================
+ Coverage 68.29% 69.42% +1.12%
==========================================
Files 139 140 +1
Lines 3694 3702 +8
Branches 872 869 -3
==========================================
+ Hits 2523 2570 +47
+ Misses 1171 1132 -39
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hi @Silence-dream, excellent work. Can you get the CI passed? Feel free to ask if you need any help! |
I have no experience with Cypress, can you give me some ideas? |
@Silence-dream Just read the documentation in https://www.cypress.io/, which is very friendly. 😸 |
Hello, You can read some of the older test cases and if you have any questions about starting a test environment, you can refer to: https://github.com/apache/apisix-dashboard/blob/master/docs/en/latest/develop.md |
60ad026
to
2a40b32
Compare
cy.get(selector.drawerBody).within(($drawer) => { | ||
cy.wrap($drawer) | ||
.contains('button', 'Add') | ||
.should('not.be.disabled') | ||
.click() | ||
.click({ force: true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does it need to add force here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make click work
Hello @Silence-dream After the CI is run, you can download the video to help determine the cause of the bug. |
Thank you very much! It was very useful! |
NOTE: Since you are contributing to CI for the first time, you will need a Committer to trigger the CI to run. |
dcd8935
to
4b0cb0a
Compare
bc4650c
to
71f7b59
Compare
71f7b59
to
4cfbc70
Compare
web/cypress/e2e/route/create-route-with-search-service-and-set-priority.cy.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, also cc @LiteSun @Baoyuantop PTAL
* upstream/master: fix: change default CSP value (apache#2601) fix: ant-table unable to request (apache#2641) fix: plugin_config missing on service exist (apache#2657) feat: add etcd store auto re-initialize (apache#2650) feat: add login filter of OpenID-Connect (apache#2608) feat:Configure plug-ins to support this feature (apache#2647) feat: Adding a Loading state to buttons (apache#2630) feat: dashboard support windows (apache#2619) Feat: add tip and preset model for plugin editor, improve e2e stability (apache#2581) docs: add Slack invitation link badge (apache#2617) # Conflicts: # .github/workflows/backend-cli-test.yml # Dockerfile # api/test/shell/cli_test.sh # web/src/components/Footer/index.tsx # web/src/components/RightContent/index.tsx # web/src/pages/ServerInfo/List.tsx
Please answer these questions before submitting a pull request, or your PR will get closed.
Why submit this pull request?
What changes will this PR take into?
Add a global custom Hook to change the state of the button to Loading when clicking on a button in the Create, Submit, Delete etc. category and restore the state when the request interface is successful.
The specific scope of modification :
in routes submit,publish,offline button
in upstream submit and delete button
in service submit and delete button
in consumer submit and delete button
in proto submit and delete button
in plugin submit and delete button
in ssl submit and delete button
Related issues
fix/resolve #2625
Checklist: