I'm building a webapp which falls back on a <noscript>
tag if Javascript is disabled. I'd like to validate that that tag shows, but I'm unsure how to do that with any of the frameworks I have, or any framework in general.
The app in question by default shows the following when Javascript is disabled:
<div>
<noscript>
<h1>Javascript Disabled</h1>
Use this page to show content when Javascript has been disabled
</noscript>
</div>
The app replaces the above with the following when the script is loaded:
<div>
Hello World
</div>
Right now for tests I'm using NightmareJS and Testem with jasmine. I don't have to be using those, but I'd like to still use Javascript if possible.
I'm completely stumped here and have no idea where I would even start - all the StackOverflow questions seem to be about how to USE <noscript>
, and not validating it in an end-to-end or unit test (in an automated manner).