-
Notifications
You must be signed in to change notification settings - Fork 21
IA-697: adding Rstudio smoke test #1703
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
Conversation
|
jenkins retest |
|
|
||
| class RStudioMainPage(override val url: String)(implicit override val authToken: AuthToken, | ||
| implicit override val webDriver: WebDriver) | ||
| extends JupyterPage |
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.
Just wondering if we should rename JupyterPage to ToolPage or something if it's meant to be abstract
| import org.openqa.selenium.WebDriver | ||
| import org.broadinstitute.dsde.workbench.leonardo.notebooks.{JupyterPage, NotebooksListPage} | ||
|
|
||
| class RStudioPage(override val url: String)(implicit override val authToken: AuthToken, |
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.
Curious what the difference is between RStudioMainPage and RStudioPage -- I thought there was only 1 RStudio page (contrast with Jupyter which has the "list" page and the "notebook" page).
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.
I initially copied over the Notebook format because I was running into some issues running the test, but I think it was separate. Removing the extra RStudioMainPage
| // // See this ticket for adding more comprehensive selenium tests for RStudio: | ||
| // // https://broadworkbench.atlassian.net/browse/IA-697 | ||
| Thread.sleep(10000) | ||
| rstudioPage.pressKeys("varA <- 1000") |
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.
Awesome!! does this work? :)
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.
Yep, looks like it does work. I do want to see if there's a more precise selector for the global environment table, but Keys does seem to work as intended
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.
More specifically, press keys works here because the console is already active when we get onto the page. There may be some more complexity in typing into other areas of the screen, but for now this should satisfy what we need
d670eeb to
d976231
Compare
|
jenkins retest |
8ed4823 to
ef2bbdb
Compare
| Thread.sleep(10000) | ||
| rstudioPage.pressKeys("varA <- 1000") | ||
| rstudioPage.pressKeys(Keys.ENTER.toString) | ||
| Thread.sleep(10000) |
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.
Curious if the sleeps are needed.. wonder if there is a way to use Selenium to await conditions instead of hard-coding sleeps.
rtitle
left a comment
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.
This looks great! Approving this PR, we can iterate and add more RStudio tests as needed.
|
jenkins retest |
Codecov Report
@@ Coverage Diff @@
## develop #1703 +/- ##
========================================
Coverage 76.71% 76.71%
========================================
Files 112 112
Lines 8038 8038
Branches 138 138
========================================
Hits 6166 6166
Misses 1872 1872 Continue to review full report at Codecov.
|
04219d1 to
ab04174
Compare
|
jenkins retest |
Added a RStudio object and RStudioPage class to help run the test.
Right now, this WIP only has a generic: open the proxy, set a value to a variable, verify the variable shows under the Global Environment section.
Will probably do some more work to add in a more specific CSS Selector and see if there's anything else that we can do.
Have you read CONTRIBUTING.md lately? If not, do that first.
I, the developer opening this PR, do solemnly pinky swear that:
In all cases: