@@ -20,6 +20,10 @@ const chromiumFlags = [
2020const width = 1512 ;
2121const height = 824 ;
2222
23+ const isMac = process . platform === 'darwin' ;
24+
25+ const executablePath = isMac ? '/Applications/Opera.app/Contents/MacOS/Opera' : '/usr/bin/opera' ;
26+
2327const fakeDeviceChromiumFlags = [
2428 ...chromiumFlags ,
2529 // headless only on CI
@@ -57,7 +61,9 @@ export default defineConfig({
5761 ...devices [ 'Desktop Chrome' ] ,
5862 viewport : { width, height } ,
5963 channel : 'chrome' ,
60- launchOptions : { args : chromiumFlags } ,
64+ launchOptions : {
65+ args : chromiumFlags ,
66+ } ,
6167 } ,
6268 } ,
6369 {
@@ -66,7 +72,9 @@ export default defineConfig({
6672 ...devices [ 'Desktop Chrome' ] ,
6773 viewport : { width, height } ,
6874 channel : 'chrome' ,
69- launchOptions : { args : fakeDeviceChromiumFlags } ,
75+ launchOptions : {
76+ args : fakeDeviceChromiumFlags ,
77+ } ,
7078 } ,
7179 } ,
7280 {
@@ -102,20 +110,39 @@ export default defineConfig({
102110 ...devices [ 'Desktop Edge' ] ,
103111 viewport : { width, height } ,
104112 channel : 'msedge' ,
105- launchOptions : { args : fakeDeviceChromiumFlags } ,
113+ launchOptions : {
114+ args : fakeDeviceChromiumFlags ,
115+ } ,
106116 } ,
107117 } ,
108118 {
109119 name : 'Mobile Chrome' ,
110- use : { ...devices [ 'Pixel 5' ] , launchOptions : { args : fakeDeviceChromiumFlags } } ,
120+ use : {
121+ ...devices [ 'Pixel 5' ] ,
122+ launchOptions : {
123+ args : fakeDeviceChromiumFlags ,
124+ } ,
125+ } ,
126+ } ,
127+ {
128+ name : 'Opera' ,
129+ use : {
130+ viewport : { width, height } ,
131+ launchOptions : {
132+ args : fakeDeviceChromiumFlags ,
133+ executablePath,
134+ } ,
135+ } ,
111136 } ,
112137 {
113138 name : 'Electron' ,
114139 use : {
115140 launchOptions : {
116141 args : [ '--use-fake-device-for-media-stream' , '--use-fake-ui-for-media-stream' ] ,
117142 } ,
118- contextOptions : { viewport : { width, height } } ,
143+ contextOptions : {
144+ viewport : { width, height } ,
145+ } ,
119146 } ,
120147 } ,
121148 ] ,
0 commit comments