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 Compare versions

Comparing version 0.3.3 to 0.3.4

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 0.3.4
* [Protractor] version 3.3.0 comptaibility, NPM 3 compatibility. Please update Protractor!
* allows using absolute path for helpers, output, in config and in command line. By @denis-sokolov
* Fixes 'Cannot read property '1' of null in generate.js:44' by @seethislight
## 0.3.3

@@ -2,0 +8,0 @@

2

lib/codecept.js

@@ -35,3 +35,3 @@ 'use strict';

global.codecept_dir = dir;
global.output_dir = fsPath.join(dir, this.config.output);
global.output_dir = fsPath.resolve(dir, this.config.output);
global.actor = global.codecept_actor = require('./actor');

@@ -38,0 +38,0 @@ global.Helper = global.codecept_helper = require('./helper');

@@ -44,3 +44,3 @@ 'use strict';

let defaultExt = config.tests.match(/\*(.*?)$/)[1] || '_test.js';
let defaultExt = config.tests.match((/\*(.*?)$/)[1]) || '_test.js';

@@ -47,0 +47,0 @@ inquirer.prompt([

@@ -9,3 +9,3 @@ 'use strict';

module.exports.getTestRoot = function (currentPath) {
let testsPath = path.join(process.cwd(), currentPath || '.');
let testsPath = path.resolve(currentPath || '.');

@@ -12,0 +12,0 @@ if (!currentPath) {

@@ -11,3 +11,3 @@ 'use strict';

module = config[helperName].require
? path.join(global.codecept_dir, config[helperName].require) // custom helper
? path.resolve(global.codecept_dir, config[helperName].require) // custom helper
: './helper/' + helperName; // built-in helper

@@ -14,0 +14,0 @@ let HelperClass = require(module);

@@ -77,3 +77,9 @@ 'use strict';

_init() {
this.webdriver = requireg('protractor/node_modules/selenium-webdriver');
try {
// get selenium-webdriver
this.webdriver = requireg('selenium-webdriver');
} catch (e) {
// maybe it is installed as protractor dependency?
this.webdriver = requireg('protractor/node_modules/selenium-webdriver');
}
protractorWrapper = requireg('protractor').wrapDriver;

@@ -84,3 +90,5 @@ EC = requireg('protractor').ExpectedConditions;

global.element = requireg('protractor').element;
this.driverProvider = requireg('protractor/built/driverProviders/'+this.options.driver)(this.options);
let driverProviderModule = requireg('protractor/built/driverProviders/'+this.options.driver);
let className = Object.keys(driverProviderModule)[0];
this.driverProvider = new driverProviderModule[className](this.options);
this.driverProvider.setupEnv();

@@ -93,4 +101,5 @@ }

requireg("protractor");
require('assert').ok(requireg("protractor/built/driverProviders/hosted").Hosted);
} catch(e) {
return ["protractor"];
return ["protractor@^3.3.0"];
}

@@ -238,3 +247,9 @@ }

/**
* Injects Angular module
* Injects Angular module.
*
* ```js
* I.haveModule('modName', function() {
* angular.module('modName', []).value('foo', 'bar');
* });
* ```
*/

@@ -246,3 +261,8 @@ haveModule(modName, fn) {

/**
* Resets Angualr module
* Removes mocked Angualr module. If modName not specified - clears all mock modules.
*
* ```js
* I.resetModule(); // clears all
* I.resetModule('modName');
* ```
*/

@@ -255,4 +275,2 @@ resetModule(modName) {

}
}

@@ -259,0 +277,0 @@

@@ -914,2 +914,10 @@ 'use strict';

}
/**
* Switches frame or in case of null locator reverts to parent.
*/
switchTo(locator) {
locator = locator || null;
return this.browser.frame(locator);
}
}

@@ -916,0 +924,0 @@

{
"name": "codeceptjs",
"version": "0.3.3",
"version": "0.3.4",
"description": "Modern Era Aceptance Testing Framework for NodeJS",

@@ -55,3 +55,3 @@ "homepage": "http://codecept.io",

"guppy-pre-commit": "^0.3.0",
"protractor": "^3.2.2",
"protractor": "^3.3.0",
"selenium-webdriver": "^2.53.1",

@@ -58,0 +58,0 @@ "sinon": "^1.17.2",

@@ -29,2 +29,4 @@ # CodeceptJS [![NPM version][npm-image]][npm-url] [![Build Status](https://travis-ci.org/Codeception/CodeceptJS.svg)](https://travis-ci.org/Codeception/CodeceptJS) [![Join the chat at https://gitter.im/Codeception/CodeceptJS](https://badges.gitter.im/Codeception/CodeceptJS.svg)](https://gitter.im/Codeception/CodeceptJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

* [**WebDriverIO**](https://github.com/Codeception/CodeceptJS/blob/master/docs/helpers/WebDriverIO.md) - wrapper on top of Selenium bindings library [WebDriverIO](http://webdriver.io/)
* [**Protractor**](https://github.com/Codeception/CodeceptJS/blob/master/docs/helpers/Protractor.md) - helper enpowered by [Protractor](http://protractortest.org/) framework for AngularJS testing
* [**SeleniumWebdriver**](https://github.com/Codeception/CodeceptJS/blob/master/docs/helpers/SeleniumWebdriver.md) - helper which for selenium testing using official Selenium Webdriver JS bindings.
* [**FileSystem**](https://github.com/Codeception/CodeceptJS/blob/master/docs/helpers/FileSystem.md) - simple helper for testing filesystem.

@@ -31,0 +33,0 @@

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