animint / animint2

Animated interactive grammar of graphics
https://animint.github.io/animint2/
59 stars 20 forks source link

Replace phantomjs with chromote as headless browser #124

Open siddhesh195 opened 1 month ago

siddhesh195 commented 1 month ago

chromote browser can be used as headless browser for testing instead of phantomjs

Discussion on why chromote is suitable choice of browser: https://github.com/animint/animint2/pull/82

Using chromote cause the following test failures:

(test-renderer3-update-axes.R:46:1) (test-renderer3-update-axes-multiple-ss.R:75:1) (test-renderer3-tooltip-interactivity.R:12:1 (test-renderer3-path-key.R:49:3) (test-renderer2-widerect.R:229:1) (test-renderer2-PredictedPeaks.R:126:1) (test-renderer1-variable-value.R:171:3) (test-renderer1-url-fragment.R:35:1) (test-renderer1-global-variables.R:25:3) (test-renderer1-geom-text-color.R:20:1) (test-renderer1-facet-lines.R:50:1)

Please note that these test cases are failing only for chromote.

The above failures are caused because the following helper functions are not compatible with chromote and need to be changed to work with chromote:

1) clickHTML 2) clickID 3) expect_rotate_anchor

tdhock commented 1 month ago

thanks, this is useful info.

siddhesh195 commented 4 weeks ago

I have modified the functions clickHTML and clickID so that they work for chromote as well.

Now these are the test cases that are still failing only for chromote:

renderer1-axis-angle-rotate renderer1-facet-lines renderer1-global-variables renderer1-url-fragment renderer2-widerect

I will spend time fixing the above tests as a next step

tdhock commented 4 weeks ago

great progress, thanks for sharing! please link the PR where your code is

siddhesh195 commented 3 weeks ago

with the changes made in helper-HTML.R , helper-functions.R and within some test files, all test files that pass on Firefox also pass on chromote except one test file "renderer2-widerect". I will continue to work on passing that test file for chromote

tdhock commented 3 weeks ago

wow that is great progress, thanks! what is the problem with widerect?

tdhock commented 3 weeks ago

where is the code/PR?

siddhesh195 commented 3 weeks ago

wow that is great progress, thanks! what is the problem with widerect?

I am actively working on finding the exact causes of failure in widerect test file. it is taking more time because the test file is much longer than the other test files. it is 455 lines long and uses some helper functions which do not have equivalent function in chromote. Since 1st iteration of GSoC in my project proposal is already coming to end is it fine I make the PR today even if I am not able to pass widerect on chromote ? I will create another PR for widerect once I have a solution

tdhock commented 3 weeks ago

it is always better to make a PR with partial code so we can review earlier you can always add more commits to a PR