tryTo() triggering false positive to pauseOnFail - stopping at first scenario
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, playwright
- 領域
- testing-qa
研究方向
使用 npx codeceptjs run ./tests/test.js --verbose -p pauseOnFail 重現提供的 test.js 情境,並比較 pauseOnFail 和 tryTo 外掛的行為。未指定除 test.js 之外的實作檔案或測試檔案;完成標準是第一個情境在沒有錯誤暫停的情況下完成,且第二個情境執行。
由索引模型根據 Issue 內容生成。
描述
What are you trying to achieve?
Trying to run 2 scenarios with one containing tryTo().
What do you get instead?
With the flag -p pauseOnFail, codeceptjs is stopping after scenario 1, even when no error or failure happens.
I believe this is a false positive triggered by tryTo() as seeing in the verbose:
[1] Error (Non-Terminated) | Error: Element "NOPE" is not visible on page. | (err) => { step.status = 'failed'; step.endTime =
Provide console output if related. Use
--verbosemode for more details.
> npx codeceptjs run ./tests/test.js --verbose -p pauseOnFail
***************************************
nodeInfo: 18.20.4
osInfo: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
cpuInfo: (32) x64 Intel(R) Core(TM) i9-14900HX
chromeInfo: Not Found
edgeInfo: "N/A"
firefoxInfo: undefined
safariInfo: N/A
If you need more detailed info, just run this: npx codeceptjs info
***************************************
CodeceptJS v3.6.6 #StandWithUkraine
Using test root "xxx"
Helpers: Playwright, Hooks
Plugins: screenshotOnFail, tryTo, retryFailedStep, retryTo, eachElement, pauseOnFail
Fixed Assets --
[1] Starting recording promises
Timeouts:
› [Session] Starting singleton browser session
01 - Test
I am on page "https://github.com/login"
I am on page "https://github.com/login"
Info: RetryFailedStep plugin is disabled inside tryTo block
I see element "NOPE"
I see element "NOPE"
[1] <tryTo> Error (Non-Terminated) | Error: Element "NOPE" is not visible on page. | (err) => { step.status = 'failed'; step.endTime = ...
› Unsuccessful try > Error: Element "NOPE" is not visible on page.
✔ OK in 3961ms
Interactive shell started
Use JavaScript syntax to try steps in action
- Press ENTER to run the next step
- Press TAB twice to see all available commands
- Type exit + Enter to exit the interactive shell
- Prefix => to run js commands
I.
Provide test source code if related
Feature('Fixed Assets');
Scenario('01 - Test', async ({ I }) => {
await I.amOnPage('https://github.com/login');
await tryTo(() => I.seeElement('NOPE'))
});
Scenario('02 - Test', async ({ I }) => {
await I.amOnPage('https://github.com/login');
});
Details
- CodeceptJS version: 3.6.6
- NodeJS Version: 18.20.4
- Operating System: Ubuntu 22.04.4
- Playwright
- Configuration file:
require('dotenv').config();
const http = require('http');
require('./heal');
const { setHeadlessWhen, setCommonPlugins } = require('@codeceptjs/configure');
// Turn on headless mode when running with HEADLESS=true environment variable
// Export HEADLESS=true && npx codeceptjs run
setHeadlessWhen(process.env.HEADLESS);
// Enable all common plugins https://github.com/codeceptjs/configure#setcommonplugins
setCommonPlugins();
/** @type {CodeceptJS.MainConfig} */
exports.config = {
name: 'xxx',
// For local development we rename the files we want to test
tests: './tests/*.js',
output: './output',
helpers: {
Playwright: {
browser: 'chromium',
url: 'http://localhost',
// Default time for all wait* actions
waitForTimeout: 60000,
// Time to wait after each action
waitForAction: 1000,
// Highlight element only work with --verbose
highlightElement: true,
show: true,
video: true,
keepVideoForPassedTests: true,
windowSize: '1024x768',
recordVideo: { // Seems to not work but required to use windowSize -- solved in 3.6.2
size: {
width: 1024,
height: 768
}
},
trace: false
},
Hooks: {
require: './events/hooks.js'
},
},
}
- 主要語言
- JavaScript
- 星號
- 4.2k
- 分支
- 756
- 平均合併
- 2 天 9 小時
- 30 天內合併 PR
- 16
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
codeceptjs/CodeceptJS 的其他 Issue
-
stale
難度 2/5 1-3 小時 新手友好度 72/100
codeceptjs/CodeceptJS#5420 · 1 則留言 ·
-
stale
難度 2/5 1-3 小時 新手友好度 76/100
codeceptjs/CodeceptJS#5358 · 1 則留言 ·
-
stale
難度 2/5 1-3 小時 新手友好度 78/100
codeceptjs/CodeceptJS#4958 · 10 則留言 · 2 個 reaction ·
-
stale
難度 1/5 1 小時以內 新手友好度 72/100
codeceptjs/CodeceptJS#4778 · 3 則留言 ·
-
stale
難度 4/5 3-5 天 新手友好度 38/100
codeceptjs/CodeceptJS#5618 · 1 則留言 ·
查看 codeceptjs/CodeceptJS 的全部 Issue
相似的 Issue
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 70/100
georgestephanis/p2026#40 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
Margaret-Petersen/food-delivery-app-clone-react-native#1981 ·