running 6 identical tests. for 2 of them I.amOnPage() takes you to the desired page... but then times out because it is impossible to load the desired page. screenshots confirm the desired page is loading. wtf?
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 18/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- javascript, node.js
- 領域
- testing-qa
研究方向
從 pages/login.js 開始,特別查看 I.amOnPage 呼叫,以及使用 waitForNavigation: "networkidle0" 和 getPageTimeout: 60000 的 Puppeteer 設定。結合 Puppeteer 的 LifecycleWatcher 逾時,檢查回報的 401 和 409 瀏覽器錯誤。Done 應識別出一個可重現的原因,並為失敗的使用者測試定義經過驗證的導覽行為。
由索引模型根據 Issue 內容生成。
描述
What are you trying to achieve?
I am writing automated tests. I have 3 user test suites and 3 admin test suites. they are identical except for passwords. they go to the SAME page where they run the EXACT SAME tests. I am running them on gitlab where the admin tests have 0 issue. but the user tests fail. I am currently trying to make the I.amOnPage() method to work. but it does not. I am currently testing some jira plugins and just assumed it was an Atlassian issue. it is not. I log into atlassian and I redirect to the space where my content is hosted but codeceptjs fails because it says that space cannot be loaded. when I check the screenshots I see that the page was in fact loaded. there is 0 doubt about it. the admin tests and user tests are exactly identical and yet the user cannot even load the space in confluence. I am currently using 60 second timeouts to load the page but still the page cannot load. why? what is going on?
What do you get instead?
I get an error saying that it is impossible to navigate to this confluence space. this is the error Navigation timeout of 60000 ms exceeded. I download the artifacts from the job and I open the screenshot and see that I am in fact on the desired page. there is 0 doubt about it. I am on the right page. I am running identical tests and yet for some reason codeceptjs refuses to navigate to the page.
Provide console output if related. Use
--verbosemode for more details.
I am on page "https://artemis-staging.atlassian.net/wiki/spaces/AS/overview"
89 › [Url] https://artemis-staging.atlassian.net/wiki/spaces/AS/overview
90 › [Browser:Warning] WidthDetector will be deprecated, please use WidthObserver from @atlaskit/width-detector instead.JSHandle:WidthDetector will be deprecated, please use WidthObserver from @atlaskit/width-detector instead.
91 › [Browser:Warning] WidthDetector will be deprecated, please use WidthObserver from @atlaskit/width-detector instead.JSHandle:WidthDetector will be deprecated, please use WidthObserver from @atlaskit/width-detector instead.
92 › [Browser:Warning] WidthDetector will be deprecated, please use WidthObserver from @atlaskit/width-detector instead.JSHandle:WidthDetector will be deprecated, please use WidthObserver from @atlaskit/width-detector instead.
93 › [Browser:Warning] WidthDetector will be deprecated, please use WidthObserver from @atlaskit/width-detector instead.JSHandle:WidthDetector will be deprecated, please use WidthObserver from @atlaskit/width-detector instead.
94 › [Browser:Error] Failed to load resource: the server responded with a status of 401 ()
95 › [Browser:Error] Failed to load resource: the server responded with a status of 401 ()
96 › [Browser:Error] Failed to load resource: the server responded with a status of 401 ()
97 › [Browser:Error] Failed to load resource: the server responded with a status of 401 ()
98 › [Browser:Warning] Deprecation notice: Accessing Env through metalTypes will soon be deprecated.JSHandle:Deprecation notice: Accessing Env through metalTypes will soon be deprecated.
99 › [Browser:Warning] WidthDetector will be deprecated, please use WidthObserver from @atlaskit/width-detector instead.JSHandle:WidthDetector will be deprecated, please use WidthObserver from @atlaskit/width-detector instead.
100 › [Browser:Error] Failed to load resource: the server responded with a status of 409 ()
101 › [Browser:Error] Failed to load resource: the server responded with a status of 409 ()
102 › [Browser:Error] Failed to load resource: the server responded with a status of 409 ()
103 › [Browser:Error] Failed to load resource: the server responded with a status of 409 ()
104 › [Browser:Warning] AJS's create element functionality has been deprecated since 5.9.0.
105No alternative will be provided.
106Use document.createElement() or jQuery.parseHTML(), or preferably use a templating library.JSHandle:AJS's create element functionality has been deprecated since 5.9.0.
107No alternative will be provided.
108Use document.createElement() or jQuery.parseHTML(), or preferably use a templating library.
109 › [Browser:Warning] DEPRECATED JS - Dialog has been deprecated since 6.0.6 and will be removed in a future release. Use require('confluence-create-content/space-blueprint')
110 at HTMLDocument.<anonymous> (https://d3i2khpa91nejt.cloudfront.net/artemis-staging.atlassian.net/wiki/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-1699667819/h/b02826bf95bb751002bcca6ac1cadcc1/_/download/contextbatch/js/_super/batch.js?externals=__local-default__&locale=en-US:376:136)JSHandle:DEPRECATED JS - Dialog has been deprecated since 6.0.6 and will be removed in a future release. Use require('confluence-create-content/space-blueprint') JSHandle:
111 at HTMLDocument.<anonymous> (https://d3i2khpa91nejt.cloudfront.net/artemis-staging.atlassian.net/wiki/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-1699667819/h/b02826bf95bb751002bcca6ac1cadcc1/_/download/contextbatch/js/_super/batch.js?externals=__local-default__&locale=en-US:376:136)
112 › [Browser:Log] Finished loading Autocomplete base, Macro browser, JIM, Jira chart pluginJSHandle:Finished loading Autocomplete base, Macro browser, JIM, Jira chart plugin
113 › [Browser:Error] Failed to load resource: the server responded with a status of 401 ()
114 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
115 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
116 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
117 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
118 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
119 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
120 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
121 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
122 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
123 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
124 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
125 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
126 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
127 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
128 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
129 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
130 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
131 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
132 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
133 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
134 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
135 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
136 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
137 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
138 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
139 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
140 [1] Error | TimeoutError: Navigation timeout of 60000 ms exceeded
141 [1] Starting <teardown> session
142 [1] <teardown> Stopping recording promises
143 › <screenshotOnFail> Test failed, try to save a screenshot
144 › Screenshot is saving to /builds/ameen3/html-macro-user-tests/output/user_inserts_text_and_html_macro.failed.png
145 ✖ FAILED in 41178ms
146 [2] Starting recording promises
147-- FAILURES:
148 1) example
149 user inserts text and html macro:
150 Navigation timeout of 60000 ms exceeded
151 at /builds/ameen3/html-macro-user-tests/node_modules/puppeteer/lib/cjs/puppeteer/common/LifecycleWatcher.js:106:111
152
153 Scenario Steps:
154 - I.amOnPage("https://artemis-staging.atlassian.net/wiki/spaces/AS/overview") at Object.login (./pages/login.js:20:11)
155 - I.wait(3) at Object.login (./pages/login.js:19:11)
156 - I.pressKey("Enter") at Object.login (./pages/login.js:18:11)
157 - I.wait(2) at Object.login (./pages/login.js:17:11)
158 - I.fillField("#password", "ArtemisFun123") at Object.login (./pages/login.js:16:11)
159 - I.wait(1) at Object.login (./pages/login.js:15:11)
160 - I.pressKey("Enter") at Object.login (./pages/login.js:14:11)
161 - I.wait(1) at Object.login (./pages/login.js:13:11)
162 - I.fillField("#username", "[email protected]") at Object.login (./pages/login.js:12:11)
163 - I.amOnPage("https://id.atlassian.com/login") at Object.login (./pages/login.js:11:11)
164
here is the screenshot. it is on the page it is supposed to navigate to. I am running these tests in multiple places and all of them navigate to this page, but only 1 set of user tests fails to navigate to this page. why? what is going on?

Provide test source code if related
const { I } = inject();
const loginURL = process.env.LOGINURL
const username = process.env.USERNAME
const password = process.env.PASSWORD
const redirectURL = process.env.REDIRECTURL
module.exports = {
login(){
I.amOnPage(loginURL);
// this works with 0 issue
I.fillField('#username', username);
I.wait(1);
I.pressKey('Enter');
I.wait(1);
I.fillField('#password', password);
I.wait(2);
I.pressKey('Enter');
I.wait(3);
I.amOnPage(redirectURL);
// this fails every time and yes it does successfully log ini
I.wait(10);
}
};
Details
- CodeceptJS version: 3.0.4
- NodeJS Version: 14.15.4
- Operating System: macOS Big Sur version 11.2.1
- puppeteer: 7.0.1
- @codeceptjs/helper: 1.0.2
- Configuration file:
exports.config = {
tests: './tests/test_test.js',
output: './output/',
helpers: {
Puppeteer: {
show: false,
waitForNavigation: "networkidle0",
getPageTimeout: 60000,
chrome: {
"args": ["--no-sandbox", "--disable-setuid-sandbox", '--disable-web-security',
'--disable-features=IsolateOrigins,site-per-process']
}
},
PageObject: {
require: './helpers/pageobject_helper.js',
},
},
include: {
I: './steps_file.js',
login: './pages/login.js',
confluence: './pages/confluence.js',
editor: './pages/editor.js',
},
bootstrap: null,
mocha: {},
name: 'html macro admin tests'
};
- 主要語言
- JavaScript
- 星號
- 4.2k
- 分支
- 756
- 平均合併
- 1 天 6 小時
- 30 天內合併 PR
- 19
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
codeceptjs/CodeceptJS 的其他 Issue
-
stale
難度 2/5 1-3 小時 新手友好度 72/100
codeceptjs/CodeceptJS#5420 · 1 則留言 ·
維護者通常 1 天內回覆
-
stale
難度 2/5 1-3 小時 新手友好度 76/100
codeceptjs/CodeceptJS#5358 · 1 則留言 ·
維護者通常 1 天內回覆
-
stale
難度 2/5 1-3 小時 新手友好度 78/100
codeceptjs/CodeceptJS#4958 · 10 則留言 · 2 個 reaction ·
維護者通常 1 天內回覆
-
stale
難度 1/5 1 小時以內 新手友好度 72/100
codeceptjs/CodeceptJS#4778 · 3 則留言 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 68/100
codeceptjs/CodeceptJS#5725 ·
維護者通常 1 天內回覆
查看 codeceptjs/CodeceptJS 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
CopilotKit/aimock#491 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 75/100
keyxmakerx/Chronicle#967 ·
維護者通常 1 天內回覆
-
good first issue hacktoberfest
難度 1/5 1 小時以內 新手友好度 92/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 92/100
DietrichGebert/ponytail#978 ·
維護者通常 2 天內回覆
-
bug component: bulk editor support
難度 2/5 1-3 小時 新手友好度 78/100
Yoast/wordpress-seo#23669 ·
維護者通常 3 天內回覆