Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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?

Đang mở
#2,830 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
18/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, node.js
Lĩnh vực
testing-qa

Hướng nghiên cứu

Bắt đầu với pages/login.js, đặc biệt là các lệnh gọi I.amOnPage, và cấu hình Puppeteer sử dụng waitForNavigation: "networkidle0" cùng getPageTimeout: 60000. Xem xét các lỗi trình duyệt 401 và 409 đã được báo cáo cùng với timeout của LifecycleWatcher trong Puppeteer. Done cần xác định một nguyên nhân có thể tái hiện và định nghĩa hành vi điều hướng đã được xác minh cho các bài kiểm thử người dùng bị lỗi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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 --verbose mode 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", "test1artemis@artemissoftware.net") 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?
user_inserts_text_and_html_macro failed

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'
  };

Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
756
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codeceptjs/CodeceptJS

Tất cả issue của codeceptjs/CodeceptJS

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.