webdriverio/webdriverio

[🐛 Bug]: negated assertions fail in component tests

开放

#14,059 创建于 2025年1月10日

 (1 条评论) (0 个反应) (0 位负责人)JavaScript (1,793 个派生)batch import
Bug 🐛help wanted

仓库指标

星标
 (6,029 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

latest

Mode

Standalone Mode

Which capabilities are you using?

n/a

What happened?

When having assertions like:

await expect($('nonExisting')).not.toBeExisting()

it fails with:

[chrome 131.0.6778.265 mac #0-0] Expect $(`div`) not to be existing

Expected [not]: "not existing"
Received      : "existing"
[chrome 131.0.6778.265 mac #0-0] Error: Expect $(`div`) not to be existing
[chrome 131.0.6778.265 mac #0-0]
[chrome 131.0.6778.265 mac #0-0] Expected [not]: "not existing"
[chrome 131.0.6778.265 mac #0-0] Received      : "existing"

even though $('nonExisting').isExisting() correctly returns false.

What is your expected behavior?

The assertion should pass properly.

How to reproduce the bug.

n/a

Relevant log output

n/a

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

贡献者指南