Skip to content

Closes #1872. Implemented to_basic for geom_function #2042

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

Merged

Conversation

moutikabdessabour
Copy link
Contributor

@cpsievert Implemented to_basic for GeomFunction class.

@cpsievert
Copy link
Collaborator

Great, thanks, please add a test to demonstrate it works

@moutikabdessabour
Copy link
Contributor Author

@cpsievert by test do you mean just running ggplotly(p) without the error being thrown or a visual test?

@cpsievert
Copy link
Collaborator

A visual test (expect_doppelganger())

@moutikabdessabour
Copy link
Contributor Author

moutikabdessabour commented Oct 8, 2021

@cpsievert I'm sorry to bother you again. but if you can post some resources where I can read more about expect_doppelganger|_built I would appreciate it. Do you save the output as svg in the _snaps folder and then pass the name of the svg to expect_doppleganger?

@cpsievert
Copy link
Collaborator

There are lots of examples under test/testthat, for example https://github.com/plotly/plotly.R/blob/master/tests/testthat/test-plotly-area.R

@moutikabdessabour
Copy link
Contributor Author

@cpsievert thanks I found the function in helpers-vdiff and was able to understand the way it functions. I added two unit tests.

@moutikabdessabour moutikabdessabour merged commit e3043ae into plotly:master Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants