-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
refinements to print template #8337
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8337 +/- ##
==========================================
+ Coverage 81.28% 81.87% +0.58%
==========================================
Files 101 101
Lines 5872 5902 +30
==========================================
+ Hits 4773 4832 +59
+ Misses 1099 1070 -29
|
11e47b7
to
0081f28
Compare
Hey @jywarren @cesswairimu as per the discussion this will now open the print template in a new tab and has removed the header/footer and other partials from the print template 😅 Now can you help guide me on what all checks I should add to the tests? and what other changes we should incorporate here Thanks ✌️ |
Hi Sneha! Can you share a screenshot? This looks great. For tests maybe some basic functional tests to confirm content on the page, and then perhaps some specific ones in a system test to look for how it handles dynamic content like inline grid tables, YouTube vids, things like that? That system test can be kind of a policy description of how we wish such content to be rendered for print. What do you think? |
6fa0981
to
bb8f70f
Compare
Hey @jywarren @cesswairimu while writing tests, I am facing this difficulty that my tests written are passing locally but on travis its showing wrong number of arguments (1,3) I looked it up and its a bug https://stackoverflow.com/questions/49151785/error-while-doing-escape-interpolation-inside-assert-select-in-rails-4-2 Also for the system tests, right now I have just added a test to check a new tab is opened. For writing tests to check specific content, I will have to first add them to the revisions.yml file right? (like the video/inline table etc in markdown form) and then check for fetching those tags and if the styles are applied or not? 😅 (Also a curious question : why can't we write this as a functional test 😅 ) A bit new to this bit. Thanks ✌️ |
Hmm, is it a difference in the environment for Travis? I can dig into this more soon but could we either use a different kind of assertion or change the Travis config? Yes, that's right we can change the fixture, or you could edit the node revision in Ruby in the test! Finally, a functional test could work! However if we write a system test we can confirm if JavaScript works on the page as well, but it's up to you. I'm not sure if a functional test can test for a new tab though...? It might have to be an integration test. System tests are a little more expensive but much more powerful and closer to live usage. Thanks!!! |
bb8f70f
to
e4ed7ea
Compare
@jywarren Update here that changing the form of assertion from Now, will start working on inline tables and video tests 😅 |
This is awesome. Would you like to merge this and work progressively in add-on PRs? Or just wait a bit? Thanks a ton!! |
e4ed7ea
to
362a1c5
Compare
Hey @jywarren Have added some more system tests to check blockquotes, videos, code blocks and tables. can you kindly review and let me know if this works? 😅 Also adding gif for showing the new tab change and also no nav bar |
I think this looks great! Let's merge it, what do you think? |
Can we keep headers in the same font, Junction light? |
Yessss!! @jywarren if there are any more changes to be done please let me know I will take up in more follow up prs 😅 |
Ohh yeah sure : sweat_smile: I will change that I used Arial because for printing it was the most suggested font |
362a1c5
to
df0f43a
Compare
Hey @jywarren have changed the heading font to Junction light 😅 sorry for the delay got busy with assignments |
No prob, and i think the fallback would be Arial if any issues occur with rendering Junction. Thanks! Merging!!!! |
Woohoo!!! |
* refine print template * add tests
* refine print template * add tests
* refine print template * add tests
* refine print template * add tests
* refine print template * add tests
* refine print template * add tests
* refine print template * add tests
* refine print template * add tests
* refine print template * add tests
Follow up pr to #8292
rake test
@publiclab/reviewers
for help, in a comment belowIf tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Thanks!