Make sure to read this post before raising a thread here:
Then tell us:
- What language is this for? Typescript
- Which rule? S2699
I get an error but there is clearly a expectation.
I am using eslint-plugin-sonarjs (4.2.0) and also sonarqube server (paid customer)
test('should save selected cookie consent categories', async ({
page,
render,
timers,
visit,
}) => {
await test.step('Setup', async () => {
// etc.
});
await test.step('Saves the selected cookie categories', async () => {
await expect
.poll(() =>
page.evaluate(
() =>
document.cookie
.split('; ')
.find((cookie) => cookie.startsWith('cookie_preference='))
?.split('=', 2)[1],
),
)
.toBe('essential,statistical,marketing');
});
});