victorious-father-41976
10/31/2022, 3:00 PMrhythmic-lizard-86607
10/31/2022, 3:38 PMhundreds-author-68171
10/31/2022, 5:14 PMhappy-megabyte-98400
10/31/2022, 6:45 PMstale-optician-85950
10/31/2022, 8:48 PMos:ubuntu
makes no difference as you're still visually testing Chrome for example.numerous-breakfast-11722
10/31/2022, 9:52 PMgorgeous-insurance-14811
11/01/2022, 6:38 AMmysterious-belgium-25713
11/01/2022, 7:07 AMmysterious-belgium-25713
11/01/2022, 7:08 AMgorgeous-insurance-14811
11/01/2022, 7:18 AMbright-twilight-69276
11/01/2022, 2:50 PMable-elephant-41059
11/01/2022, 6:23 PMmysterious-belgium-25713
11/01/2022, 6:51 PMred-honey-44438
11/02/2022, 10:00 AMstale-optician-85950
11/02/2022, 10:28 AMcypress.mobile.config.ts
which overrides any mobile specific values from `cypress.config.ts`:
import { defineConfig } from 'cypress';
import defu from 'defu';
import defaultConfig from '../../cypress.config';
export default defineConfig(
defu(
{
viewportWidth: 375,
viewportHeight: 812,
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) Mobile/15E148',
env: {
device: 'mobile',
},
},
defaultConfig
)
);
Run command:
"test:cy:run:mobile": "cypress run --browser chrome --config-file cypress/configs/cypress.mobile.config.ts",
red-honey-44438
11/02/2022, 10:31 AMstale-optician-85950
11/02/2022, 10:34 AMcy.viewport()
> check your network tab and you'll see that the browser still has a desktop UserAgent values. That's why you're not getting the mobile specific behaviour.red-honey-44438
11/02/2022, 10:48 AMred-honey-44438
11/02/2022, 11:03 AMstale-optician-85950
11/02/2022, 11:08 AMyarn cypress open --config viewportWidth=768,viewportHeight=1024,userAgent='Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15'
Then cy.visit(url)
your page, is set correctly then?stale-optician-85950
11/02/2022, 11:12 AMred-honey-44438
11/02/2022, 11:43 AMstale-optician-85950
11/02/2022, 11:49 AMred-honey-44438
11/02/2022, 12:06 PMbetter-carpenter-28878
11/02/2022, 1:15 PMbetter-carpenter-28878
11/02/2022, 1:16 PMfull-postman-68262
11/02/2022, 2:25 PMcypress/included
docker image, but with a read-only container. Currently I'm having an issue where the Cypress binary is running a smoke test (npx cypress verify
basically) and that's timing out. I'm not 100% clear on what the smoke test is trying to do, or why setting it to read-only prevents it from doing what it needs to do. Anyone able to shed any light?bright-twilight-69276
11/02/2022, 2:40 PMstale-optician-85950
11/02/2022, 2:43 PMtablet
gets the touch functional behaviour you are expecting.
Also, I would recommend you relaunch Cypress from scratch with that tablet UserAgent and even clear the Cypress browser cache and rerun (just to be sure).mysterious-belgium-25713
11/02/2022, 3:20 PM