CodeceptJS v3.1.3 Release Notes

  • ๐Ÿ›ฉ๏ธ Features:

    • BDD Improvement. Added DataTableArgument class to work with table data structures.
    const { DataTableArgument } = require('codeceptjs');
    //...
    Given('I have an employee card', (table) => {
      const dataTableArgument = new DataTableArgument(table);
      const hashes = dataTableArgument.hashes(); 
      // hashes = [{ name: 'Harry', surname: 'Potter', position: 'Seeker' }];
      const rows = dataTableArgument.rows();
      // rows = [['Harry', 'Potter', Seeker]];
      }
    

    โšก๏ธ See updated BDD section for more API options.

    • ๐Ÿ‘Œ Support cjs file extensions for config file: codecept.conf.cjs. See #3052 by @kalvenschraut
    • โšก๏ธ API updates: Added test.file and suite.file properties to test and suite objects to use in helpers and plugins.

    ๐Ÿ›  ๐Ÿ› Bugfixes:

    • ๐Ÿ‘€ [Playwright] Fixed resetting test.artifacts for failing tests. See #3033 by @jancorvus. Fixes #3032
    • ๐Ÿ‘€ [Playwright] Apply basicAuth credentials to all opened browser contexts. See #3036 by @nikocanvacom. Fixes #3035
    • โšก๏ธ [WebDriver] Updated webdriverio default version to ^6.12.1. See #3043 by @sridhareaswaran
    • ๐Ÿ‘€ [Playwright] I.haveRequestHeaders affects all tabs. See #3049 by @jancorvus
    • ๐Ÿ›  BDD: Fixed unhandled empty feature files. Fix #3046 by @abhimanyupandian
    • ๐Ÿ›  Fixed RangeError: Invalid string length in recorder.js when running huge amount of tests.

    ๐Ÿ“š ๐Ÿ“– Documentation: