apisix-dashboard
apisix-dashboard copied to clipboard
Feat: add tip for plugin editor (WIP)
Please answer these questions before submitting a pull request, or your PR will get closed.
Why submit this pull request?
- [ ] Bugfix
- [x] New feature provided
- [x] Improve performance
- [ ] Backport patches
What changes will this PR take into?
We need to tell users clearly that which part of the data should be filled.
Before the change:
After the change:
Related issues
#1363
Checklist:
- [x] Did you explain what problem does this PR solve? Or what new features have been added?
- [x] Have you added corresponding test cases?
- [x] Have you modified the corresponding document?
- [x] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first
Codecov Report
Merging #2581 (e14844a) into master (95566d5) will increase coverage by
9.10%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #2581 +/- ##
==========================================
+ Coverage 67.12% 76.23% +9.10%
==========================================
Files 178 139 -39
Lines 7172 3694 -3478
Branches 806 872 +66
==========================================
- Hits 4814 2816 -1998
+ Misses 2065 878 -1187
+ Partials 293 0 -293
Flag | Coverage Δ | |
---|---|---|
backend-e2e-test-ginkgo | ? |
|
backend-unit-test | ? |
|
frontend-e2e-test | 76.23% <100.00%> (+14.98%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
web/src/components/Plugin/Models.ts | 100.00% <100.00%> (ø) |
|
web/src/components/Plugin/PluginDetail.tsx | 75.40% <100.00%> (+10.60%) |
:arrow_up: |
web/src/components/Plugin/modelCode.ts | 100.00% <100.00%> (ø) |
|
api/internal/utils/pid.go | ||
api/internal/handler/schema/plugin.go | ||
api/internal/core/migrate/dataset.go | ||
api/internal/handler/service/service.go | ||
api/internal/handler/label/label.go | ||
api/internal/log/log.go | ||
api/internal/core/server/server.go | ||
... and 122 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@guoqqqi @Baoyuantop @bzp2010 @SkyeYoung This work has been completed. I think the degree of completion is very high. All the pages that need plug-ins have examples. Because it is non functional, there is no need for new test cases.
WIP, do not merge yet
@guoqqqi, you said before that you would consider merging only if E2E is completely correct, but recently you should have found that the current test is problematic, but it is completely correct and needs to be fixed. Among them, four test cases are problematic, and they are difficult to pass. (this is not my problem, but the new E2E test case error that occurred after ten days ago) are:
- Create delete in drawer plugin.cy.js
- Upstream create and_ edit_ upstream_ with_ no_ Nodes.cy.js_
- Service-edit-service-with-upstream.cy.js (this mainly occurs in the cloud)
- Plugin-schema.cy.js.
Fortunately, I solved the first and second. The fourth one is the most serious one. It can not pass at all. It is a loop test. There is a problem with a judgment in the middle. There is no problem in the test logic, but somehow the judgment fails and the loop jumps out midway. You can see this https://github.com/apache/apisix-dashboard/pull/2612/checks. If there is no change, there will be 100% errors. I tried to spend three days, but I didn't find the root cause. (the third and fourth should find a more professional tester to have a look. The pass rate of the third is only 10% in a certain environment. The elements are either separated, lost or missing, and only appear in the cloud. It is normal locally, as shown in the video below:)
https://user-images.githubusercontent.com/72308243/189047162-0da14fc5-a3fa-47ee-8ab4-821647624c8f.mp4
I passed the third one, service-edit-service-with-upstream.cy.js. I just want to mention that it has a low pass rate.
@Baoyuantop @bzp2010 @LiteSun
If you have time, you can give some suggestions. And, If anyone can try to fix the test cases of 3 and 4, you can find them. Many people have these two problems in PR.
To sum up, the effect of this PR is: add tip and preset model for plugin editor, improve E2E stability All my work on improving test stability can be seen in this pr. This should reduce the error rate of the test. For the explanation of model, please see the text at the top of this pr. It helps users to use the plug-in by presetting the plug-in template. There is a video.
@Baoyuantop @guoqqqi @bzp2010
All test cases of Dashboard have been repaired and passed, and the issue#2615 can be closed.
cc @butterfly1924 plugin-schema.cy.js has been fixed.
cc @Baoyuantop @bzp2010
I got rid of the prompts, maybe to make it a little more minimal @SkyeYoung
cc @Baoyuantop @guoqqqi