@@ -17,6 +17,10 @@ const chromiumFlags = [
1717const width = 1512 ;
1818const height = 824 ;
1919
20+ const isMac = process . platform === 'darwin' ;
21+
22+ const executablePath = isMac ? '/Applications/Opera.app/Contents/MacOS/Opera' : '/usr/bin/opera' ;
23+
2024const fakeDeviceChromiumFlags = [
2125 ...chromiumFlags ,
2226 '--headless=new' ,
@@ -53,7 +57,9 @@ export default defineConfig({
5357 ...devices [ 'Desktop Chrome' ] ,
5458 viewport : { width, height } ,
5559 channel : 'chrome' ,
56- launchOptions : { args : chromiumFlags } ,
60+ launchOptions : {
61+ args : chromiumFlags ,
62+ } ,
5763 } ,
5864 } ,
5965 {
@@ -62,7 +68,9 @@ export default defineConfig({
6268 ...devices [ 'Desktop Chrome' ] ,
6369 viewport : { width, height } ,
6470 channel : 'chrome' ,
65- launchOptions : { args : fakeDeviceChromiumFlags } ,
71+ launchOptions : {
72+ args : fakeDeviceChromiumFlags ,
73+ } ,
6674 } ,
6775 } ,
6876 {
@@ -98,15 +106,28 @@ export default defineConfig({
98106 ...devices [ 'Desktop Edge' ] ,
99107 viewport : { width, height } ,
100108 channel : 'msedge' ,
101- launchOptions : { args : fakeDeviceChromiumFlags } ,
109+ launchOptions : {
110+ args : fakeDeviceChromiumFlags ,
111+ } ,
102112 } ,
103113 } ,
104114 {
105115 name : 'Mobile Chrome' ,
106116 use : {
107117 ...devices [ 'Pixel 5' ] ,
108- launchOptions : { args : fakeDeviceChromiumFlags } ,
109- viewport : { width : 393 , height : 851 } ,
118+ launchOptions : {
119+ args : fakeDeviceChromiumFlags ,
120+ } ,
121+ } ,
122+ } ,
123+ {
124+ name : 'Opera' ,
125+ use : {
126+ viewport : { width, height } ,
127+ launchOptions : {
128+ args : fakeDeviceChromiumFlags ,
129+ executablePath,
130+ } ,
110131 } ,
111132 } ,
112133 {
@@ -115,7 +136,9 @@ export default defineConfig({
115136 launchOptions : {
116137 args : [ '--use-fake-device-for-media-stream' , '--use-fake-ui-for-media-stream' ] ,
117138 } ,
118- contextOptions : { viewport : { width, height } } ,
139+ contextOptions : {
140+ viewport : { width, height } ,
141+ } ,
119142 } ,
120143 } ,
121144 ] ,
0 commit comments