Cucumber-js: انتهاء مهلة مثال NodeJS

تم إنشاؤها على ٣٠ مارس ٢٠١٧  ·  3تعليقات  ·  مصدر: cucumber/cucumber-js

أنا أتبع المثال الموجود في هذه الصفحة cucumber-js / docs / nodejs_example.md

يمر أحيانًا ، لكني أحصل على الكثير من المهلات أيضًا. هل يحتاج المثال إلى تحديث ، أم أن هذه مشكلة في عداء الاختبار؟

NodeJS v6.9.1

"chromedriver": "^2.28.0",
"cucumber": "2.0.0-rc.9",
"selenium-webdriver": "^3.3.0"
Feature: Example feature

    As a user of Cucumber.js
    I want to have documentation on Cucumber
    So that I can concentrate on building awesome applications

  Scenario: Reading documentation
  ✔ Given I am on the Cucumber.js GitHub repository
  ✔ When I click on "CLI"
  ✖ Then I should see "Running specific features"

Failures:

1) Scenario: Reading documentation - features/documentation.feature:6
   Step: Then I should see "Running specific features" - features/documentation.feature:9
   Step Definition: features/step_definitions/browser_steps.js:15
   Message:
     Error: function timed out after 5000 milliseconds
         at Timeout.<anonymous> (node_modules/cucumber/lib/user_code_runner.js:91:22)
         at ontimeout (timers.js:365:14)
         at tryOnTimeout (timers.js:237:5)
         at Timer.listOnTimeout (timers.js:207:5)

1 scenario (1 failed)
3 steps (1 failed, 2 passed)



md5-2a2c7c10e6fd71308dbd83970eac71b5



Feature: Example feature

    As a user of Cucumber.js
    I want to have documentation on Cucumber
    So that I can concentrate on building awesome applications

  Scenario: Reading documentation
  ✖ Given I am on the Cucumber.js GitHub repository
  - When I click on "CLI"
  - Then I should see "Running specific features"

Failures:

1) Scenario: Reading documentation - features/documentation.feature:6
   Step: Given I am on the Cucumber.js GitHub repository - features/documentation.feature:7
   Step Definition: features/step_definitions/browser_steps.js:5
   Message:
     Error: function timed out after 5000 milliseconds
         at Timeout.<anonymous> (node_modules/cucumber/lib/user_code_runner.js:91:22)
         at ontimeout (timers.js:365:14)
         at tryOnTimeout (timers.js:237:5)
         at Timer.listOnTimeout (timers.js:207:5)

1 scenario (1 failed)
3 steps (1 failed, 2 skipped)

التعليق الأكثر فائدة

تحرير : آسف لإزعاجك. في 5 دقائق من نشر هذه الرسالة ، وجدت حلاً لزيادة مهلة الخطوة الموضحة هنا . ترك التعليق هنا لمن يجد هذه المشكلة
charlierudolph ، أين تزيد المهلة؟ هذه هي الوظيفة التي كتبتها لي لتسجيل الدخول باستخدام auth0

login(userId, password): void {
        let self: any = this;
        self.signInButton.click().then(function () {
            self.password.sendKeys(password)
            // element(by.css('input[name="password"]')).sendKeys(password);
            browser.waitForAngularEnabled(false);
            self.email.sendKeys(userId);
            self.loginSubmitButton.click().then(function() {
                browser.driver.wait(function() {
                    return self.loginConfirmationWindow.isPresent();
                }, 15000).then(function() {
                    return;
                }, function(){
                    console.log(new Error('Login confirmed window did not show up'));
                    return;
                })
                self.loginConfirmationClose.click();
            });

        })
    }

أعلم أنني منحت الدالة browser.driver.wait مهلة قدرها 15 ثانية ، لكن هذا لا يهم ، تنتهي مهلة الخطوة بـ 5 ثوانٍ.
ثم حاولت بعد ذلك إضافة القيم التالية بشكل عام في ملف config.ts

    allScriptsTimeout: 60000,
    getPageTimeout: 60000,
    setDefaultTimeout: 60000,

حتى بعد كل هذا ما زلت أتلقى الخطأ التالي

 Error: function timed out after 5000 milliseconds
         at Timeout.<anonymous> (/Users/mohamedr2/workspace/test_app/node_modules/cucumber/lib/user_code_runner.js:91:22)
         at ontimeout (timers.js:386:14)
         at tryOnTimeout (timers.js:250:5)
         at Timer.listOnTimeout (timers.js:214:5)

ال 3 كومينتر

لقد أكدت أن هذا كان يعمل من أجلي. يرجى محاولة زيادة مهلة الخاص بك.

تحرير : آسف لإزعاجك. في 5 دقائق من نشر هذه الرسالة ، وجدت حلاً لزيادة مهلة الخطوة الموضحة هنا . ترك التعليق هنا لمن يجد هذه المشكلة
charlierudolph ، أين تزيد المهلة؟ هذه هي الوظيفة التي كتبتها لي لتسجيل الدخول باستخدام auth0

login(userId, password): void {
        let self: any = this;
        self.signInButton.click().then(function () {
            self.password.sendKeys(password)
            // element(by.css('input[name="password"]')).sendKeys(password);
            browser.waitForAngularEnabled(false);
            self.email.sendKeys(userId);
            self.loginSubmitButton.click().then(function() {
                browser.driver.wait(function() {
                    return self.loginConfirmationWindow.isPresent();
                }, 15000).then(function() {
                    return;
                }, function(){
                    console.log(new Error('Login confirmed window did not show up'));
                    return;
                })
                self.loginConfirmationClose.click();
            });

        })
    }

أعلم أنني منحت الدالة browser.driver.wait مهلة قدرها 15 ثانية ، لكن هذا لا يهم ، تنتهي مهلة الخطوة بـ 5 ثوانٍ.
ثم حاولت بعد ذلك إضافة القيم التالية بشكل عام في ملف config.ts

    allScriptsTimeout: 60000,
    getPageTimeout: 60000,
    setDefaultTimeout: 60000,

حتى بعد كل هذا ما زلت أتلقى الخطأ التالي

 Error: function timed out after 5000 milliseconds
         at Timeout.<anonymous> (/Users/mohamedr2/workspace/test_app/node_modules/cucumber/lib/user_code_runner.js:91:22)
         at ontimeout (timers.js:386:14)
         at tryOnTimeout (timers.js:250:5)
         at Timer.listOnTimeout (timers.js:214:5)

تم قفل سلسلة الرسائل هذه تلقائيًا نظرًا لعدم وجود أي نشاط حديث بعد إغلاقه. الرجاء فتح قضية جديدة للأخطاء ذات الصلة.

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات