-
Notifications
You must be signed in to change notification settings - Fork 241
[JENKINS-64708] Deprecate PageObject constructor receiving the Injector as parameter #2003
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
base: master
Are you sure you want to change the base?
Conversation
ccefe65
to
048430b
Compare
Hello @fcojfernandez, Thanks! |
When you set an element to deprecated you should ensure that you are not using it in your own code base. The code migration is not clear to me: All my page objects use this constructor right now. If I remember correctly, this was required to create these page objects dynamically. Is this still possible then? |
ac72770
to
ffe892e
Compare
Hi @uhafner, Thanks! |
I have no idea. Since you are trying to mark the constructor as deprecated I thought that you know what to do for all those plugins that use it right now. Why are you fixing this specific issue then? Or did you pick an arbitrary issue that you want to solve? Maybe it is best to set the issue as in progress in Jira, assign your name in Jira as well and ask in Jira what should be done for those plugins that use the constructor right now. Hopefully, the author of the issue responds and tells you what to do instead. It would be also helpful to remove the usages of this constructor in the acceptance harness. Then you will see if your proposed changes break something... |
BTW: when you are rebasing your code then it makes sense to squash the commits to a single one. |
ffe892e
to
1202ffa
Compare
@@ -53,6 +53,11 @@ protected ConfigurablePageObject(PageObject context, URL url) { | |||
super(context, url); | |||
} | |||
|
|||
/** | |||
* @deprecated Use {@link #ConfigurablePageObject(PageObject, URL)} instead to properly maintain context hierarchy. | |||
* This constructor will be removed in a future version. |
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.
that will make the Jenkins Page object interesting....
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.
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.
Hello @jtnord, I didn't quite get that.
What would you pass as the context for theJenkins
PageObject
()acceptance-test-harness/src/main/java/org/jenkinsci/test/acceptance/po/Jenkins.java
Line 70 in 7358513
this(injector, startAndGetUrl(controller));
But what is the problem with the constructor with the Injector? what issue are you trying to solve here?
e9d4b43
to
cb90118
Compare
5d332ab
to
22872d6
Compare
Hello @basil Could you give me a quick review on how to proceed further? Thanks! |
What problem is this PR trying to solve? The linked Jira ticket does not clearly describe the problem or why this task is a solution for it. |
24ef28d
to
3f8f8fc
Compare
JENKINS-64708
Now,
Testing done
Submitter checklist