|
| 1 | +## 3.5.4 |
| 2 | + |
| 3 | +🐛 Bug Fixes: |
| 4 | + * [Playwright] When passing `userDataDir`, it throws error after test execution (#3814) - by @KobeNguyenT |
| 5 | + * [CodeceptJS-CLI] Improve command to generate types (#3788) - by @KobeNguyenT |
| 6 | + * Heal plugin fix (#3820) - by @davert |
| 7 | + * Fix for error in using `all` with `run-workers` (#3805) - by @KobeNguyenT |
| 8 | +```js |
| 9 | + helpers: { |
| 10 | + Playwright: { |
| 11 | + url: 'https://github.com', |
| 12 | + show: false, |
| 13 | + browser: 'chromium', |
| 14 | + waitForNavigation: 'load', |
| 15 | + waitForTimeout: 30_000, |
| 16 | + trace: true, |
| 17 | + keepTraceForPassedTests: true |
| 18 | + }, |
| 19 | + }, |
| 20 | + multiple: { |
| 21 | + profile1: { |
| 22 | + browsers: [ |
| 23 | + { |
| 24 | + browser: "chromium", |
| 25 | + } |
| 26 | + ] |
| 27 | + }, |
| 28 | + }, |
| 29 | +``` |
| 30 | + * Highlight elements issues (#3779) (#3778) - by @philkas |
| 31 | + * Support ` ` symbol in `I.see` method (#3815) - by @KobeNguyenT |
| 32 | + |
| 33 | +```js |
| 34 | +// HTML code uses instead of space |
| 35 | +<div class="dJHe_" style="color: rgb(255, 255, 255);">My Text!</div> |
| 36 | + |
| 37 | +I.see("My Text!") // this test would work with both and space |
| 38 | +``` |
| 39 | + |
| 40 | +📖 Documentation |
| 41 | + * Improve the configuration of electron testing when the app is build with electron-forge (#3802) - by @KobeNguyenT |
| 42 | + |
| 43 | +```js |
| 44 | +const path = require("path"); |
| 45 | + |
| 46 | +exports.config = { |
| 47 | + helpers: { |
| 48 | + Playwright: { |
| 49 | + browser: "electron", |
| 50 | + electron: { |
| 51 | + executablePath: require("electron"), |
| 52 | + args: [path.join(__dirname, ".webpack/main/index.js")], |
| 53 | + }, |
| 54 | + }, |
| 55 | + }, |
| 56 | + // rest of config |
| 57 | +} |
| 58 | +``` |
| 59 | + |
| 60 | +🛩️ Features |
| 61 | + |
| 62 | +#### [Playwright] new features and improvements |
| 63 | + * Parse the response in recording network steps (#3771) - by @KobeNguyenT |
| 64 | + |
| 65 | +```js |
| 66 | + const traffics = await I.grabRecordedNetworkTraffics(); |
| 67 | + expect(traffics[0].url).to.equal('https://reqres.in/api/comments/1'); |
| 68 | + expect(traffics[0].response.status).to.equal(200); |
| 69 | + expect(traffics[0].response.body).to.contain({ name: 'this was mocked' }); |
| 70 | + |
| 71 | + expect(traffics[1].url).to.equal('https://reqres.in/api/comments/1'); |
| 72 | + expect(traffics[1].response.status).to.equal(200); |
| 73 | + expect(traffics[1].response.body).to.contain({ name: 'this was another mocked' }); |
| 74 | +``` |
| 75 | + * Grab metrics (#3809) - by @KobeNguyenT |
| 76 | + |
| 77 | +```js |
| 78 | +const metrics = await I.grabMetrics(); |
| 79 | + |
| 80 | +// returned metrics |
| 81 | + |
| 82 | +[ |
| 83 | + { name: 'Timestamp', value: 1584904.203473 }, |
| 84 | + { name: 'AudioHandlers', value: 0 }, |
| 85 | + { name: 'AudioWorkletProcessors', value: 0 }, |
| 86 | + { name: 'Documents', value: 22 }, |
| 87 | + { name: 'Frames', value: 10 }, |
| 88 | + { name: 'JSEventListeners', value: 366 }, |
| 89 | + { name: 'LayoutObjects', value: 1240 }, |
| 90 | + { name: 'MediaKeySessions', value: 0 }, |
| 91 | + { name: 'MediaKeys', value: 0 }, |
| 92 | + { name: 'Nodes', value: 4505 }, |
| 93 | + { name: 'Resources', value: 141 }, |
| 94 | + { name: 'ContextLifecycleStateObservers', value: 34 }, |
| 95 | + { name: 'V8PerContextDatas', value: 4 }, |
| 96 | + { name: 'WorkerGlobalScopes', value: 0 }, |
| 97 | + { name: 'UACSSResources', value: 0 }, |
| 98 | + { name: 'RTCPeerConnections', value: 0 }, |
| 99 | + { name: 'ResourceFetchers', value: 22 }, |
| 100 | + { name: 'AdSubframes', value: 0 }, |
| 101 | + { name: 'DetachedScriptStates', value: 2 }, |
| 102 | + { name: 'ArrayBufferContents', value: 1 }, |
| 103 | + { name: 'LayoutCount', value: 0 }, |
| 104 | + { name: 'RecalcStyleCount', value: 0 }, |
| 105 | + { name: 'LayoutDuration', value: 0 }, |
| 106 | + { name: 'RecalcStyleDuration', value: 0 }, |
| 107 | + { name: 'DevToolsCommandDuration', value: 0.000013 }, |
| 108 | + { name: 'ScriptDuration', value: 0 }, |
| 109 | + { name: 'V8CompileDuration', value: 0 }, |
| 110 | + { name: 'TaskDuration', value: 0.000014 }, |
| 111 | + { name: 'TaskOtherDuration', value: 0.000001 }, |
| 112 | + { name: 'ThreadTime', value: 0.000046 }, |
| 113 | + { name: 'ProcessTime', value: 0.616852 }, |
| 114 | + { name: 'JSHeapUsedSize', value: 19004908 }, |
| 115 | + { name: 'JSHeapTotalSize', value: 26820608 }, |
| 116 | + { name: 'FirstMeaningfulPaint', value: 0 }, |
| 117 | + { name: 'DomContentLoaded', value: 1584903.690491 }, |
| 118 | + { name: 'NavigationStart', value: 1584902.841845 } |
| 119 | +] |
| 120 | +``` |
| 121 | + |
| 122 | +* Grab WebSocket (WS) messages (#3789) - by @KobeNguyenT |
| 123 | + * `flushWebSocketMessages` |
| 124 | + * `grabWebSocketMessages` |
| 125 | + * `startRecordingWebSocketMessages` |
| 126 | + * `stopRecordingWebSocketMessages` |
| 127 | + |
| 128 | +```js |
| 129 | +await I.startRecordingWebSocketMessages(); |
| 130 | +I.amOnPage('https://websocketstest.com/'); |
| 131 | +I.waitForText('Work for You!'); |
| 132 | +I.flushNetworkTraffics(); |
| 133 | +const wsMessages = I.grabWebSocketMessages(); |
| 134 | +expect(wsMessages.length).to.equal(0); |
| 135 | +``` |
| 136 | + |
| 137 | +```js |
| 138 | +await I.startRecordingWebSocketMessages(); |
| 139 | +await I.amOnPage('https://websocketstest.com/'); |
| 140 | +I.waitForText('Work for You!'); |
| 141 | +const wsMessages = I.grabWebSocketMessages(); |
| 142 | +expect(wsMessages.length).to.greaterThan(0); |
| 143 | +``` |
| 144 | + |
| 145 | +```js |
| 146 | +await I.startRecordingWebSocketMessages(); |
| 147 | +await I.amOnPage('https://websocketstest.com/'); |
| 148 | +I.waitForText('Work for You!'); |
| 149 | +const wsMessages = I.grabWebSocketMessages(); |
| 150 | +await I.stopRecordingWebSocketMessages(); |
| 151 | +await I.amOnPage('https://websocketstest.com/'); |
| 152 | +I.waitForText('Work for You!'); |
| 153 | +const afterWsMessages = I.grabWebSocketMessages(); |
| 154 | +expect(wsMessages.length).to.equal(afterWsMessages.length); |
| 155 | +``` |
| 156 | + |
| 157 | +* Move from `ElementHandle` to `Locator`. This change is quite major, but it happened under hood, so should not affect your code. (#3738) - by @KobeNguyenT |
| 158 | + |
1 | 159 | ## 3.5.3
|
2 | 160 |
|
3 | 161 | 🛩️ Features
|
|
0 commit comments