CodeceptJS v1.2.0 Release Notes

    • โœ… [WebDriverIO][Protractor]Multiple Sessions. Run several browser sessions in one test. Introduced session command, which opens additional browser window and closes it after a test.
    Scenario('run in different browsers', (I) => {
      I.amOnPage('/hello');
      I.see('Hello!');
      session('john', () => {
        I.amOnPage('/bye');
        I.dontSee('Hello');
        I.see('Bye');
      });
      I.see('Hello');
    });
    
    • โœ… Parallel Execution by @sveneisenschmidt. Run tests in parallel specifying number of chunks:
    "multiple": {
      "parallel": {
        // run in 2 processes
        "chunks": 2,
        // run all tests in chrome
        "browsers": ["chrome"]
      },
    }
    
    • ๐Ÿ— Locator Builder. Write complex locators with simplest API combining CSS and XPath:
    // select 'Edit' link inside 2nd row of a table
    locate('//table')
      .find('tr')
      .at(2)
      .find('a')
      .withText('Edit');
    
    • โšก๏ธ Dynamic configuration to update helpers config per test or per suite.
    • โž• Added event.test.finished which fires synchronously for both failed and passed tests.
    • ๐Ÿ‘€ [WebDriverIO][Protractor][Nightmare][Puppeteer] Full page screenshots on failure disabled by default. See [issue#1600. You can enabled them with fullPageScreenshots: true, however they may work unstable in Selenium.
    • ๐Ÿ“š within blocks can return values. See updated documentation.
    • โœ‚ Removed doublt call to _init in helpers. Fixes issue #1036
    • โž• Added scenario and feature configuration via fluent API:
    Feature('checkout')
      .timeout(3000)
      .retry(2);
    
    Scenario('user can order in firefox', (I) => {
      // see dynamic configuration
    }).config({ browser: 'firefox' })
      .timeout(20000);
    
    Scenario('this test should throw error', (I) => {
      // I.amOnPage
    }).throws(new Error);