Skip to content

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