|
| 1 | +## 3.5.7 |
| 2 | + |
| 3 | +Thanks all to those who contributed to make this release! |
| 4 | + |
| 5 | +🐛 *Bug Fixes* |
| 6 | +* Bump playwright to 1.39.0 - run `npx playwright install` to install the browsers as starting from 1.39.0 browsers are not installed automatically (#3924) - by @KobeNguyenT |
| 7 | +* fix(playwright): some wait functions draw error due to switchTo iframe (#3918) - by @KobeNguyenT |
| 8 | +* fix(appium): AppiumTestDistribution/appium-device-farm requires 'platformName' (#3950) - by @rock-tran |
| 9 | +* fix: autologin with empty fetch (#3947) - by @andonary |
| 10 | +* fix(cli): customLocator draws error in dry-mode (#3940) - by @KobeNguyenT |
| 11 | +* fix: ensure docs include @returns Promise<void> where appropriate (#3954) - by @fwouts |
| 12 | +* fix: long text in data table cuts off (#3936) - by @KobeNguyenT |
| 13 | +``` |
| 14 | +#language: de |
| 15 | +Funktionalität: Faker examples |
| 16 | +
|
| 17 | + Szenariogrundriss: Atualizar senha do usuário |
| 18 | + Angenommen que estou logado via REST com o usuário "<customer>" |
| 19 | + | protocol | https: | |
| 20 | + | hostname | https://cucumber.io/docs/gherkin/languages/ | |
| 21 | + |
| 22 | +
|
| 23 | +Faker examples -- |
| 24 | + Atualizar senha do usuário {"product":"{{vehicle.vehicle}}","customer":"Dr. {{name.findName}}","price":"{{commerce.price}}","cashier":"cashier 2"} |
| 25 | + On Angenommen: que estou logado via rest com o usuário "dr. {{name.find name}}" |
| 26 | + protocol | https: |
| 27 | + hostname | https://cucumber.io/docs/gherkin/languages/ |
| 28 | + |
| 29 | +Dr. {{name.findName}} |
| 30 | + ✔ OK in 13ms |
| 31 | +
|
| 32 | +``` |
| 33 | +* fix(playwright): move to waitFor (#3933) - by @KobeNguyenT |
| 34 | +* fix: relax grabCookie type (#3919) - by @KobeNguyenT |
| 35 | +* fix: proceedSee error when being called inside within (#3939) - by @KobeNguyenT |
| 36 | +* fix: rename haveRequestHeaders of ppt and pw helpers (#3937) - by @KobeNguyenT |
| 37 | +``` |
| 38 | +Renamed haveRequestHeaders of Puppeteer, Playwright helper so that it would not confuse the REST helper. |
| 39 | +Puppeteer: setPuppeteerRequestHeaders |
| 40 | +Playwright: setPlaywrightRequestHeaders |
| 41 | +``` |
| 42 | +* improvement: handle the way to load apifactory nicely (#3941) - by @KobeNguyenT |
| 43 | +``` |
| 44 | +With this fix, we could now use the following syntax: |
| 45 | +
|
| 46 | +export = new Factory() |
| 47 | + .attr('name', () => faker.name.findName()) |
| 48 | + .attr('job', () => 'leader'); |
| 49 | + |
| 50 | +export default new Factory() |
| 51 | + .attr('name', () => faker.name.findName()) |
| 52 | + .attr('job', () => 'leader'); |
| 53 | + |
| 54 | +modules.export = new Factory() |
| 55 | + .attr('name', () => faker.name.findName()) |
| 56 | + .attr('job', () => 'leader'); |
| 57 | +``` |
| 58 | + |
| 59 | +📖 *Documentation* |
| 60 | +* docs(appium): update to v2 (#3932) - by @KobeNguyenT |
| 61 | +* docs: improve BDD Gherkin docs (#3938) - by @KobeNguyenT |
| 62 | +* Other docs improvements |
| 63 | + |
| 64 | +🛩️ *Features* |
| 65 | +* feat(puppeteer): support trace recording - by @KobeNguyenT |
| 66 | +``` |
| 67 | +[Trace Recording Customization] |
| 68 | +Trace recording provides complete information on test execution and includes screenshots, and network requests logged during run. Traces will be saved to output/trace |
| 69 | +
|
| 70 | +trace: enables trace recording for failed tests; trace are saved into output/trace folder |
| 71 | +keepTraceForPassedTests: - save trace for passed tests |
| 72 | +``` |
| 73 | +* feat: expect helper (#3923) - by @KobeNguyenT |
| 74 | +``` |
| 75 | + * This helper allows performing assertions based on Chai. |
| 76 | + * |
| 77 | + * ### Examples |
| 78 | + * |
| 79 | + * Zero-configuration when paired with other helpers like REST, Playwright: |
| 80 | + * |
| 81 | + * ```js |
| 82 | + * // inside codecept.conf.js |
| 83 | + *{ |
| 84 | + * helpers: { |
| 85 | + * Playwright: {...}, |
| 86 | + * ExpectHelper: {}, |
| 87 | + * } |
| 88 | + |
| 89 | + Expect Helper |
| 90 | + #expectEqual |
| 91 | + #expectNotEqual |
| 92 | + #expectContain |
| 93 | + #expectNotContain |
| 94 | + #expectStartsWith |
| 95 | + #expectNotStartsWith |
| 96 | + #expectEndsWith |
| 97 | + #expectNotEndsWith |
| 98 | + #expectJsonSchema |
| 99 | + #expectHasProperty |
| 100 | + #expectHasAProperty |
| 101 | + #expectToBeA |
| 102 | + #expectToBeAn |
| 103 | + #expectMatchRegex |
| 104 | + #expectLengthOf |
| 105 | + #expectTrue |
| 106 | + #expectEmpty |
| 107 | + #expectFalse |
| 108 | + #expectAbove |
| 109 | + #expectBelow |
| 110 | + #expectLengthAboveThan |
| 111 | + #expectLengthBelowThan |
| 112 | + #expectLengthBelowThan |
| 113 | + #expectDeepMembers |
| 114 | + #expectDeepIncludeMembers |
| 115 | + #expectDeepEqualExcluding |
| 116 | + #expectLengthBelowThan |
| 117 | +``` |
| 118 | +* feat: run-workers with multiple browsers output folders - by @KobeNguyenT |
| 119 | +-  |
| 120 | +-  |
| 121 | +* feat: introduce new Playwright methods - by @hatufacci |
| 122 | +``` |
| 123 | +- grabCheckedElementStatus |
| 124 | +- grabDisabledElementStatus |
| 125 | +``` |
| 126 | +* feat: gherkin supports i18n (#3934) - by @KobeNguyenT |
| 127 | +``` |
| 128 | +#language: de |
| 129 | +Funktionalität: Checkout-Prozess |
| 130 | + Um Produkte zu kaufen |
| 131 | + Als Kunde |
| 132 | + Möchte ich in der Lage sein, mehrere Produkte zu kaufen |
| 133 | +
|
| 134 | + @i18n |
| 135 | + Szenariogrundriss: Bestellrabatt |
| 136 | + Angenommen ich habe ein Produkt mit einem Preis von <price>$ in meinem Warenkorb |
| 137 | + Und der Rabatt für Bestellungen über $20 beträgt 10 % |
| 138 | + Wenn ich zur Kasse gehe |
| 139 | + Dann sollte ich den Gesamtpreis von "<total>" $ sehen |
| 140 | +
|
| 141 | + Beispiele: |
| 142 | + | price | total | |
| 143 | + | 10 | 10.0 | |
| 144 | +``` |
| 145 | +* feat(autoLogin): improve the check method (#3935) - by @KobeNguyenT |
| 146 | +``` |
| 147 | +Instead of asserting on page elements for the current user in check, you can use the session you saved in fetch |
| 148 | +
|
| 149 | +autoLogin: { |
| 150 | + enabled: true, |
| 151 | + saveToFile: true, |
| 152 | + inject: 'login', |
| 153 | + users: { |
| 154 | + admin: { |
| 155 | + login: async (I) => { // If you use async function in the autoLogin plugin |
| 156 | + const phrase = await I.grabTextFrom('#phrase') |
| 157 | + I.fillField('username', 'admin'), |
| 158 | + I.fillField('password', 'password') |
| 159 | + I.fillField('phrase', phrase) |
| 160 | + }, |
| 161 | + check: (I, session) => { |
| 162 | + // Throwing an error in `check` will make CodeceptJS perform the login step for the user |
| 163 | + if (session.profile.email !== [email protected]) { |
| 164 | + throw new Error ('Wrong user signed in'); |
| 165 | + } |
| 166 | + }, |
| 167 | + } |
| 168 | + } |
| 169 | +} |
| 170 | +Scenario('login', async ( {I, login} ) => { |
| 171 | + await login('admin') // you should use `await` |
| 172 | +}) |
| 173 | +``` |
| 174 | + |
1 | 175 | ## 3.5.6
|
2 | 176 |
|
3 | 177 | Thanks all to those who contributed to make this release!
|
|
0 commit comments