sdods record -p demo-shop -e staging --name checkout-mobile --device "iPhone 15" --viewport 390x900The session came up at the iPhone's own size, not 390x900. No warning, no note in the header comment, it just ignored the flag. Bug, or intended?
sdods record -p demo-shop -e staging --name checkout-mobile --device "iPhone 15" --viewport 390x900The session came up at the iPhone's own size, not 390x900. No warning, no note in the header comment, it just ignored the flag. Bug, or intended?
Accepted answer
Intended, and spelled out on the flag itself — --viewport <WxH> is documented as "ignored with --device".
A device profile is not only a size: it carries the viewport, the user agent, the device scale factor and whether touch is emulated. Letting a separate --viewport override half of it would hand you a context that matches no real phone, which is worse than either option on its own.
So pick one. --device "iPhone 15" for a real profile, --viewport 390x900 for an arbitrary window in a desktop browser. With neither, the recorder falls back to the project's screenshot viewport from sdods.project.yaml — 1280x720 in demo-shop.
Play it back the same way you recorded it, or the spec is exercising a different device than it was written against:
sdods run -p demo-shop -e staging -l recorded --device "iPhone 15"Quoting matters more than people expect here. --device "iPhone 15" with the quotes; without them the shell splits it and 15 arrives as a separate argument, so the flag never sees the name you meant. Whatever it fails with, it will not be a message about quoting.
If all you want is a mobile browser in the run matrix rather than a specific handset, -b mobile-chrome and -b mobile-safari are browsers you can pass to sdods run directly and they compose with the rest of the matrix.
Have the same question?
Ask it with the command you ran and the output you got, and it will be answered here.
Ask a question