Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

codeceptjs

Package Overview
Dependencies
Maintainers
1
Versions
235
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codeceptjs - npm Package Versions

1
23

1.0.2

Diff

Changelog

Source

1.0.2

  • Introduced generators support in scenario hooks for BeforeSuite/Before/AfterSuite/After
  • [ApiDataFactory] Fixed loading helper; requireg package included.
  • Fix #485run-multiple: the first browser-resolution combination was be used in all configurations
  • Fixed unique test names:
    • Fixed #447 tests failed silently if they have the same name as other tests.
    • Use uuid in screenshot names when uniqueScreenshotNames: true
  • [Protractor] Fixed testing non-angular application. amOutsideAngularApp is executed before each step. Fixes #458* Added output for steps in hooks when they fail
davert
published 1.0.1 •

Changelog

Source

1.0.1

  • Reporters improvements:
    • Allows to execute multiple reporters
    • Added Mochawesome helper
    • addMochawesomeContext method to add custom data to mochawesome reports
    • Fixed Mochawesome context for failed screenshots.
  • [WebDriverIO] improved click on context to match clickable element with a text inside. Fixes #647* [Nightmare] Added refresh function by @awhanks
  • fixed Unhandled promise rejection (rejection id: 1): Error: Unknown wait type: pageLoad
  • support for tests with retries in html report
  • be sure that change window size and timeouts completes before test
  • [Nightmare] Fixed [Wrapped Error] "codeceptjs is not defined"; Reinjectiing client scripts to a webpage on changes.
  • [Nightmare] Added more detailed error messages for Wait* methods
  • [Nightmare] Fixed adding screenshots to Mochawesome
  • [Nightmare] Fix unique screenshots names in Nightmare
  • Fixed CodeceptJS work with hooks in helpers to finish codeceptJS correctly if errors appears in helpers hooks
  • Create a new session for next test If selenium grid error received
  • Create screenshots for failed hooks from a Feature file
  • Fixed retries option

1.0

CodeceptJS hits first stable release. CodeceptJS provides a unified API for web testing for Webdriverio, Protractor, and NightmareJS. Since 1.0 you can also test mobile applications in the similar manner with Appium.

Sample test:

I.seeAppIsInstalled("io.super.app");
I.click('~startUserRegistrationCD');
I.fillField('~email of the customer', 'Nothing special'));
I.see('davert@codecept.io', '~email of the customer'));
I.clearField('~email of the customer'));
I.dontSee('Nothing special', '~email of the customer'));

We also introduced two new helpers for data management. Using them you can easily prepare and cleanup data for your tests using public REST API.

Sample test

// create a user using data factories and REST API
I.have('user', { name: 'davert', password: '123456' });
// use it to login
I.amOnPage('/login');
I.fillField('login', 'davert');
I.fillField('password', '123456');
I.click('Login');
I.see('Hello, davert');
// user will be removed after the test

Next notable feature is SmartWait for WebDriverIO, Protractor, SeleniumWebdriver. When smartwait option is set, script will wait for extra milliseconds to locate an element before failing. This feature uses implicit waits of Selenium but turns them on only in applicable pieces. For instance, implicit waits are enabled for seeElement but disabled for dontSeeElement

Changelog
  • Minimal NodeJS version is 6.11.1 LTS
  • Use within command with generators.
  • Data Driven Tests introduced.
  • Print execution time per step in --debug mode. #591 by @APshenkin
  • [WebDriverIO][Protractor][Nightmare] Added disableScreenshots option to disable screenshots on fail by @Apshenkin
  • [WebDriverIO][Protractor][Nightmare] Added uniqueScreenshotNames option to generate unique names for screenshots on failure by @Apshenkin
  • [WebDriverIO][Nightmare] Fixed click on context; click('text', '#el') will throw exception if text is not found inside #el.
  • [WebDriverIO][Protractor][SeleniumWebdriver] SmartWait introduced.
  • [WebDriverIO][Protractor][Nightmare]Fixed saveScreenshot for PhantomJS, fullPageScreenshots option introduced by @HughZurname #549
  • [Appium] helper introduced by @APshenkin
  • [REST] helper introduced by @atrevino in #504
  • [WebDriverIO][SeleniumWebdriver] Fixed "windowSize": "maximize" for Chrome 59+ version #560 by @APshenkin
  • [Nightmare] Fixed restarting by @APshenkin #581
  • [WebDriverIO] Methods added by @APshenkin:
  • Use mkdirp to create output directory. #592 by @vkramskikh
  • [WebDriverIO] Fixed seeNumberOfVisibleElements by @BorisOsipov #574
  • Lots of fixes for promise chain by @APshenkin #568
    • Fix #543- After block not properly executed if Scenario fails
    • Expected behavior in promise chains: _beforeSuite hooks from helpers -> BeforeSuite from test -> _before hooks from helpers -> Before from test - > Test steps -> _failed hooks from helpers (if test failed) -> After from test -> _after hooks from helpers -> AfterSuite from test -> _afterSuite hook from helpers.
    • if during test we got errors from any hook (in test or in helper) - stop complete this suite and go to another
    • if during test we got error from Selenium server - stop complete this suite and go to another
    • [WebDriverIO][Protractor] if restart option is false - close all tabs expect one in _after.
    • Complete _after, _afterSuite hooks even After/AfterSuite from test was failed
    • Don't close browser between suites, when restart option is false. We should start browser only one time and close it only after all tests.
    • Close tabs and clear local storage, if keepCookies flag is enabled
  • Fix TypeError when using babel-node or ts-node on node.js 7+ #586 by @vkramskikh
  • [Nightmare] fixed usage of _locate

Special thanks to Andrey Pshenkin for his work on this release and the major improvements.

davert
published 1.0.0 •

davert
published 0.6.3 •

Changelog

Source

0.6.3

  • Errors are printed in non-verbose mode. Shows "Selenium not started" and other important errors.
  • Allowed to set custom test options:
Scenario('My scenario', { build_id: 123, type: 'slow' }, function (I)

those options can be accessed as opts property inside a test object. Can be used in custom listeners.

  • Added docs directory to a package.
  • [WebDriverIO][Protractor][SeleniumWebdriver] Bugfix: cleaning session when restart: false by @tfiwm #519
  • [WebDriverIO][Protractor][Nightmare] Added second parameter to saveScreenshot to allow a full page screenshot. By @HughZurname
  • Added suite object to suite.before and suite.after events by @implico. #496
davert
published 0.6.3-pre •

davert
published 0.6.2 •

Changelog

Source

0.6.2

  • Added config object to public API
  • Extended index.js to include actor and helpers, so they could be required:
const actor = require('codeceptjs').actor;
  • Added example for creating custom runner with public API.
  • run command to create output directory if it doesn't exist
  • [Protractor] fixed loading globally installed Protractor
  • run-multiple command improvements:
    • create output directories for each process
    • print process ids in output
davert
published 0.6.1 •

Changelog

Source

0.6.1

  • Fixed loading hooks
davert
published 0.6.0 •

Changelog

Source

0.6.0

Major release with extension API and parallel execution.

  • Breaking Removed path argument from run. To specify path other than current directory use --config or -c option:

Instead of: codeceptjs run tests use:

# load config and run from tests directory
codeceptjs run -c tests/
davert
published 0.5.1 •

Changelog

Source

0.5.1

  • Polish translation added by @limes.
  • Update process exit code so that mocha saves reports before exit by @romanovma.
  • [Nightmare] fixed getAttributeFrom for custom attributes by @robrkerr
  • [Nightmare] Fixed UnhandledPromiseRejectionWarning error when selecting the dropdown using selectOption by @robrkerr. [Se PR.
  • [Protractor] fixed pressKey method by @romanovma
davert
published 0.5.0 •

Changelog

Source

0.5.0

  • Protractor ^5.0.0 support (while keeping ^4.0.9 compatibility)
  • Fix 'fullTitle() is not a function' in exit.js by @hubidu. See #388.
  • [Nightmare] Fix for waitTimeout by @HughZurname. See #391. Resolves #236* Dockerized CodeceptJS setup by @artiomnist. See reference
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc