Skip to content

Using Dynamic Configs Cuts WaitForTimeout by 1000 Each Time #1995

@vkoves

Description

@vkoves

What are you trying to achieve?

We are looking to use dynamic configs to be able to test a second site within our larger suite, which has a different base URL but shares a lot of common UI elements.

What do you get instead?

Every time we use .config on a Feature, it causes the config to get revalidated and the waitForTimeout property's value appears to get divided by 1000 every time, making it so that each feature gets a smaller and smaller timeout, going from 10 sec to 0.01 sec, to 0.00001 sec, and so on.

Here's some sample output from one of our tests:

-- FAILURES:

1) Admin - FEATURE 1 NAME
  SCENARIO NAME
  element (.reveal-modal-bg) still visible after 0.01 sec

2) Admin - FEATURE 1 NAME
  SCENARIO NAME
  element (.reveal-modal-bg) still visible after 0.01 sec

3) Admin - FEATURE 2 NAME
  SCENARIO NAME
  element ({css: .fixed-width-message}) still not visible after 0.00001 sec

...

6) Admin - FEATURE 3 NAME
  SCENARIO NAME
  element ({css: .cdk-global-overlay-wrapper form}) still not visible after 1e-8 sec

...

9) Admin - FEATURE 4 NAME
  SCENARIO NAME
  element ({css: communities-list table > tbody > tr:nth-child(1)}) still not visible after 1.0000000000000001e-11 sec

Here is some sample source code of how we use .config. We confirmed that removing this fixed the issue:

Feature('Admin - XXXXX').config({
    // Required for all admin tests
    url: process.env.CI ? CONSTANTS.frontendUrls.admin.internal : CONSTANTS.frontendUrls.admin.external
});

Details

  • CodeceptJS version: Codecept v2.3.5
  • NodeJS Version: Node v12.10.0
  • Operating System: Ubuntu 18.04.03 LTS
  • Protractor || WebDriverIO || Nightmare version: Webdriver 5.13.2
  • Configuration file: The only important bit is that under our helpers we specify:
waitForTimeout: 10000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions