@enact/ui-test-utils 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## [4.0.1] (January 13, 2026)
4
+
5
+ * Updated Chrome driver version to 132 for screenshot tests.
6
+
3
7
  ## [4.0.0] (November 14, 2025)
4
8
 
5
9
  * Updated Chrome driver version to 132.
@@ -15,13 +15,13 @@ export const configure = (options) => {
15
15
 
16
16
  if (!process.env.CHROME_DRIVER) {
17
17
  // TODO: Update this version when chromedriver version in CI/CD is updated
18
- process.env.CHROME_DRIVER = base === 'screenshot' ? '120.0.6099.109' : '132.0.6834.159';
18
+ process.env.CHROME_DRIVER = '132.0.6834.159';
19
19
 
20
20
  console.log('Chrome Driver Version : ' + process.env.CHROME_DRIVER);
21
21
  }
22
22
 
23
23
  return Object.assign(
24
- opts,
24
+ {},
25
25
  {
26
26
  path: '/',
27
27
  //
@@ -87,25 +87,27 @@ export const configure = (options) => {
87
87
  We need to specify a browser version that matches chromedriver version running in CI/CD environment to
88
88
  ensure testing accuracy. */
89
89
  browserVersion: process.env.CHROME_DRIVER,
90
- 'goog:chromeOptions': visibleBrowser ?
90
+ 'goog:chromeOptions':
91
91
  {
92
92
  args: [
93
+ '--disable-infobars',
94
+ '--disable-search-engine-choice-screen',
95
+ '--disable-notifications',
96
+ '--disable-popup-blocking',
93
97
  '--disable-lcd-text',
94
98
  '--force-device-scale-factor=1',
95
99
  '--start-maximized',
96
- '--start-fullscreen',
97
100
  '--disable-gpu',
98
- '--window-size=1920,1080'
99
- ]
100
- } : {
101
- args: [
102
- '--disable-lcd-text',
103
- '--force-device-scale-factor=1',
104
- '--start-maximized',
105
- '--start-fullscreen',
106
- '--headless',
107
- '--disable-gpu',
108
- '--window-size=1920,1080'
101
+ '--window-size=1920,1080',
102
+ // Critical for Chrome 132 in Jenkins/Linux
103
+ '--no-sandbox',
104
+ '--disable-dev-shm-usage',
105
+ '--disable-setuid-sandbox',
106
+ // Performance optimizations for Chrome 132
107
+ '--disable-features=VizDisplayCompositor',
108
+ '--disable-features=IsolateOrigins,site-per-process',
109
+ '--js-flags=--max-old-space-size=512',
110
+ ...(visibleBrowser ? [] : ['--headless=new'])
109
111
  ]
110
112
  },
111
113
  webSocketUrl: false, // disables BiDi, forces classic mode
@@ -135,21 +137,23 @@ export const configure = (options) => {
135
137
  baseUrl: 'http://localhost:4567',
136
138
  //
137
139
  // Default timeout for all waitFor* commands.
138
- waitforTimeout: 10000,
140
+ waitforTimeout: 45000,
139
141
  //
140
142
  // Default timeout in milliseconds for request
141
143
  // if Selenium Grid doesn't send response
142
- connectionRetryTimeout: 120000,
144
+ connectionRetryTimeout: 240000,
143
145
  //
144
146
  // Default request retries count
145
- connectionRetryCount: 3,
147
+ connectionRetryCount: 5,
146
148
  // Ignore deprecation warnings
147
149
  deprecationWarnings: false,
148
150
  //
149
151
  // Default timeouts
150
152
  //
151
153
  timeouts: {
152
- script: 60000 // extend script timeout to 60s just in case
154
+ script: 600000,
155
+ pageLoad: 600000,
156
+ implicit: 20000
153
157
  },
154
158
  //
155
159
  // Initialize the browser instance with a WebdriverIO plugin. The object should have the
@@ -200,7 +204,8 @@ export const configure = (options) => {
200
204
  // See the full list at http://mochajs.org/
201
205
  mochaOpts: {
202
206
  ui: 'bdd',
203
- timeout: 60 * 60 * 1000
207
+ timeout: 60 * 60 * 1000,
208
+ retries: 2 // Retry failed tests up to 2 times (important for timeout recovery)
204
209
  },
205
210
  /**
206
211
  * Gets executed before test execution begins. At this point you can access to all global
@@ -209,14 +214,32 @@ export const configure = (options) => {
209
214
  before: async function () {
210
215
  global.wdioExpect = global.expect;
211
216
  // in Chrome 132, the browser window size takes into account also the address bar and tab area
212
- await browser.maximizeWindow();
213
- let browserHeight = base === 'screenshot' ? 1080 : 1272;
214
- await browser.setWindowSize(1920, browserHeight);
217
+ await browser.setWindowSize(1920, 1167);
218
+
219
+ // Small pause to let window resize complete
220
+ await browser.pause(200);
221
+
222
+ // Verify the window is ready
223
+ await browser.waitUntil(
224
+ async () => {
225
+ try {
226
+ const state = await browser.execute(() => document.readyState);
227
+ return state === 'complete';
228
+ } catch (e) {
229
+ return false;
230
+ }
231
+ },
232
+ {
233
+ timeout: 15000,
234
+ timeoutMsg: 'Page did not reach ready state'
235
+ }
236
+ );
215
237
 
216
238
  if (options.before) {
217
239
  await options.before();
218
240
  }
219
241
  }
220
- }
242
+ },
243
+ opts
221
244
  );
222
245
  };