-
Notifications
You must be signed in to change notification settings - Fork 527
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
fix:When create the upstream, some properties can still be edited on … #1828
Conversation
…the preview page bug
Deploy preview for apisix-dashboard ready! Built with commit 103c3a3 |
Codecov Report
@@ Coverage Diff @@
## master #1828 +/- ##
==========================================
+ Coverage 72.07% 72.15% +0.07%
==========================================
Files 125 125
Lines 2944 2945 +1
Branches 711 711
==========================================
+ Hits 2122 2125 +3
+ Misses 822 820 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -83,6 +83,7 @@ const UpstreamForm: React.FC<Props> = forwardRef( | |||
|
|||
const resetForm = (upstream_id: string) => { | |||
if (upstream_id === undefined) { | |||
setReadonly(disabled); |
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.
noted, need @guoqqqi to confirm
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.
Yes, currently all can be edited on the preview page when first configuring upstream.
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.
Does this will affect Route module?
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.
Does this will affect Route module?
Yes!When the router, service, and upstream are created for the first time, this problem also occurs in the upstream involved.
LGTM! |
LGTM for code and founction, it would be better to add test case about it @Engine-AI |
… be edited on the preview page bug
@liuxiran @juzhiyuan ,This is my first time write test case using cypress. Could you please check if my test case complies with the specification |
|
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.
Hi, we can also determine if the input is disabled.
web/cypress/integration/route/create-route-when-not-select-upsteam-id.spec.js
Outdated
Show resolved
Hide resolved
web/cypress/integration/route/create-route-when-not-select-upsteam-id.spec.js
Outdated
Show resolved
Hide resolved
cy.get(this.domSelector.nodes_0_host).should('be.disabled','true'); | ||
cy.get(this.domSelector.nodes_0_port).should('be.disabled','true'); | ||
cy.get(this.domSelector.nodes_0_weight).should('be.disabled','true'); | ||
cy.get('#timeout_connect').should('be.disabled','true'); | ||
cy.get('#timeout_send').should('be.disabled','true'); | ||
cy.get('#timeout_read').should('be.disabled','true'); | ||
cy.get('#custom_checks_active').should('be.disabled','true'); | ||
cy.get('#custom_checks_passive').should('be.disabled','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.
ditto
cy.get(this.domSelector.nodes_0_host).should('be.disabled','true'); | ||
cy.get(this.domSelector.nodes_0_port).should('be.disabled','true'); | ||
cy.get(this.domSelector.nodes_0_weight).should('be.disabled','true'); | ||
cy.get('#timeout_connect').should('be.disabled','true'); | ||
cy.get('#timeout_send').should('be.disabled','true'); | ||
cy.get('#timeout_read').should('be.disabled','true'); | ||
cy.get('#custom_checks_active').should('be.disabled','true'); | ||
cy.get('#custom_checks_passive').should('be.disabled','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.
ditto
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.
@guoqqqi If this suggestion or comment is resolved, please click Resolve conversition
web/cypress/integration/upstream/create_and_delete_upstream.spec.js
Outdated
Show resolved
Hide resolved
…team-id.spec.js Co-authored-by: guoqqqi <[email protected]>
…team-id.spec.js Co-authored-by: guoqqqi <[email protected]>
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.
Hi~ also😊
web/cypress/integration/service/create-service-with-not-select-upstream.spec.js
Outdated
Show resolved
Hide resolved
web/cypress/integration/service/create-service-with-not-select-upstream.spec.js
Outdated
Show resolved
Hide resolved
web/cypress/integration/upstream/create_and_delete_upstream.spec.js
Outdated
Show resolved
Hide resolved
…ec.js Co-authored-by: guoqqqi <[email protected]>
…-upstream.spec.js Co-authored-by: guoqqqi <[email protected]>
…-upstream.spec.js Co-authored-by: guoqqqi <[email protected]>
Thank you @guoqqqi for pointing out my problem |
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!
…the preview page bug
Why submit this pull request?
What changes will this PR take into?
#1827