You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
We should ideally test that the code in content that modifies the browser window works as expected. One way to test this would be to trigger an event that would cause the tweets to be styled, and check that the styling was applied. In our case that means checking classes were applied.
It may be useful to keep a copy of a twitter page downloaded to use as the example twitter page we attempt to modify.
I was thinking to use jsdom to mock a browser page, I tried this but was running in to problems because I could not figure out how to run our code on another dom. But it should be possible.
Describe alternatives you've considered
End to End testing. Really not a bad idea. I think that if this is too hard, we should really consider this. And cypress does firefox now. End to end testing requires more overhead and configuration, so in this case I would like to avoid it.
If testing the interaction between the dom and the content scripts for the plugin are too difficult to do with jest, we should seriously consider End to End testing
Minimum requirements
Twitter dom has changed (css class for modified tweet style)
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
We should ideally test that the code in
content
that modifies the browser window works as expected. One way to test this would be to trigger an event that would cause the tweets to be styled, and check that the styling was applied. In our case that means checking classes were applied.It may be useful to keep a copy of a twitter page downloaded to use as the example twitter page we attempt to modify.
I was thinking to use
jsdom
to mock a browser page, I tried this but was running in to problems because I could not figure out how to run our code on another dom. But it should be possible.Describe alternatives you've considered
End to End testing. Really not a bad idea. I think that if this is too hard, we should really consider this. And cypress does firefox now. End to end testing requires more overhead and configuration, so in this case I would like to avoid it.
If testing the interaction between the dom and the content scripts for the plugin are too difficult to do with jest, we should seriously consider End to End testing
Minimum requirements
Twitter dom has changed (css class for modified tweet style)
Testing that tweet text is correctly extracted
Test that fetch request sends with correct params
(Moved to Test API request is fired when expected #119) Test that api request is fired at proper time
The text was updated successfully, but these errors were encountered: