How to test for mobile & desktop pages for the same URL?
samarpanda opened this issue · 16 comments
Testing for mobile & desktop when they are using completely different setup. Any flags to use for screen-size / user agent / desktop|mobile?
@samarpanda is there a specific user-agent that identifies a mobile client? if so, we could support a --mobile
flag that will set it. We can also set a window size indeed.
Can you figure out the details for the above flags of a window size and user-agent that would be good to identify a mobile device? If so, and you'd like to make the change yourself I'd be happy to merge a Pull Request doing this.
Hey, I would like to work on it.
What do you think about general flag of --ua
?
I think it might be too specific vs specifying --mobile
.
The idea is that the flag will request a mobile version of the site, without someone needing to understand the internals of user agents, etc.
So just make sure I got it right, --mobile
will enable the flag --emulated-form-factor
in lighthouse.
Is that correct?
--emulated-form-factor Controls the emulated device form factor (mobile vs. desktop) if not disabled [choices: "mobile", "desktop", "none"] [default: "mobile"]
Yes, as per the lighthouse cli options doc
Yep
I’m planning to deliver it during the weekend.. Sorry that it’s taking me forever
@zivkaziv no worries at all and no rush, family and your well being comes first ❤️
@zivkaziv Can i push one work in progress PR if you don't mind?
Sure
Nope.
BTW, @samarpanda are you sure that emulatedFormFactor
should be part of the opts, and not part of the lighthouseSettings?
My bad, I understand it now... You set it in the right place...
I wanted to include the new flags in the readme. But it seems @zivkaziv has already added that to the readme. So, we don't need any documentation changes in this PR.
Yep, looks good!