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

codeceptjs

Package Overview
Dependencies
Maintainers
2
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
24

1.1.3

Diff

Changelog

Source

1.1.3

  • [Puppeteer] +25 Functions added by @reubenmiller
    • _locateCheckable
    • _locateClickable
    • _locateFields
    • closeOtherTabs
    • dragAndDrop
    • grabBrowserLogs
    • grabCssPropertyFrom
    • grabHTMLFrom
    • grabNumberOfVisibleElements
    • grabSource
    • rightClick
    • scrollPageToBottom
    • scrollPageToTop
    • scrollTo
    • seeAttributesOnElements
    • seeCssPropertiesOnElements
    • seeInField
    • seeNumberOfElements
    • seeNumberOfVisibleElements
    • seeTextEquals
    • seeTitleEquals
    • switchTo
    • waitForInvisible
    • waitInUrl
    • waitUrlEquals
  • [Protractor] +8 functions added by @reubenmiller
    • closeCurrentTab
    • grabSource
    • openNewTab
    • seeNumberOfElements
    • seeTextEquals
    • seeTitleEquals
    • switchToNextTab
    • switchToPreviousTab
  • [Nightmare] waitForInvisible added by @reubenmiller
  • [Puppeteer] Printing console.log information in debug mode.
  • [Nightmare] Integrated with nightmare-har-plugin by mingfang. Added enableHAR option. Added HAR functions:
    • grabHAR
    • saveHAR
    • resetHAR
  • [WebDriverIO] Fixed execution stability for parallel requests with Chromedriver
  • [WebDriverIO] Fixed resizeWindow when resizing to 'maximize' by @reubenmiller
  • [WebDriverIO] Fixing resizing window to full screen when taking a screenshot by @reubenmiller
davert
published 1.1.2 •

Changelog

Source

1.1.2

  • [Puppeteer] Upgraded to Puppeteer 1.0
  • Added grep option to config to set default matching pattern for tests.
  • [Puppeteer] Added acceptPopup, cancelPopup, seeInPopup and grabPopupText functions by @reubenmiller
  • [Puppeteer] within iframe and nested iframe support added by @reubenmiller
  • [REST] Added support for JSON objects since payload (as a JSON) was automatically converted into "URL query" type of parameter by @Kalostrinho
  • [REST] Added resetRequestHeaders method by @Kalostrinho
  • [REST] Added followRedirect option and amFollowingRequestRedirects/amNotFollowingRequestRedirects methods by @Kalostrinho
  • [WebDriverIO] uncheckOption implemented by @brunobg
  • [WebDriverIO] Added grabBrowserUrl by @Kalostrinho
  • Add ability to require helpers from node_modules by @APshenkin
  • Added --profile option to run-multiple command by @jamie-beck
  • Custom output name for multiple browser run by @tfiwm
  • Fixed passing data to scenarios by @KennyRules
davert
published 1.1.1 •

Changelog

Source

1.1.1

  • [WebDriverIO] fixed waitForInvisible by @Kporal
davert
published 1.1.0 •

Changelog

Source

1.1.0

Major update to CodeceptJS. NodeJS v 8.9.1 is now minimal Node version required. This brings native async-await support to CodeceptJS. It is recommended to start using await for tests instead of generators:

async () => {
  I.amOnPage('/page');
  const url = await I.grabTextFrom('.nextPage');
  I.amOnPage(url);
}

Thanks to @Apshenkin for implementation. Also, most helpers were refactored to use async-await. This made our code simpler. We hope that this encourages more users to send pull requests!

We also introduced strict ESLint policies for our codebase. Thanks to @Galkin for that.

within({frame: ['#wrapperId', '[name=content]']}, () => {
  I.click('Sign in!');
  I.see('Email Address');
});
I.see('Nested Iframe test');
I.dontSee('Email Address');
});
  • [WebDriverIO] Support for ~ locator to find elements by aria-label. This behavior is similar as it is in Appium and helps testing cross-platform React apps. Example:
<Text accessibilityLabel="foobar">
    CodeceptJS is awesome
</Text>

↑ This element can be located with ~foobar in WebDriverIO and Appium helpers. Thanks to @flyskywhy

  • Allow providing arbitrary objects in config includes by @rlewan
  • [REST] Prevent from mutating default headers by @alexashley. See #789
  • [REST] Fixed sending empty helpers with haveRequestHeaders in sendPostRequest. By @petrisorionel
  • Fixed displaying undefined args in output by @APshenkin
  • Fixed NaN instead of seconds in output by @APshenkin
  • Add browser name to report file for multiple-run by @trollr
  • Mocha updated to 4.x
davert
published 1.0.3 •

Changelog

Source

1.0.3

  • [WebDriverIO][Protractor][Nightmare] method waitUntilExists implemented by @sabau
  • Absolute path can be set for output dir by @APshenkin. Fix #571* Data table rows can be ignored by using xadd. By @APhenkin
  • Added Data(table).only.Scenario to give ability to launch only Data tests. By @APhenkin
  • Implemented ElementNotFound error by @BorisOsipov.
  • Added TypeScript compiler / configs to check the JavaScript by @KennyRules
  • [Nightmare] fix executeScript return value by @jploskonka
  • [Nightmare] fixed: err.indexOf not a function when waitForText times out in nightmare by @joeypedicini92
  • Fixed: Retries not working when using .only. By @APhenkin
davert
published 1.0.2 •

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 •

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