Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@boozt/webtest-runner
Advanced tools
Use the webtest-runner to run your test synchronously. This is a simple module that you can easily use with Selenium.
Readme
When it comes to working on complex or sensitive UI you probably want to cover it with some tests.
The webtest-runner
allows you to invoke your tests synchronously and get some information about the process.
Therefore, you can create awesome, simple and convenient tests.
Add node ./node_modules/@boozt/webtest-runner {path}
to the script section in your package.json. Where the {path}
is a path to the file which imports all of your tests.
You can also specify which of your tests should be performed by adding the filter
option with the names of your test. For instance:
node webtest-runner ./web/tests/list.js filter testCheckout testCart
In this example, of all existing tests specified in list.js
, only testCheckout
and testCart
will be executed.
This file can look like:
const testChekout = require('./tests/testChekout');
const testCart = require('./tests/testCart')
/**
* Here you can add your tests
*/
module.exports = {
testChekout,
testCart
};
// ./tests/testCart.js
const { Builder, By } = require('selenium-webdriver');
const assert = require('assert');
const { getUrl } = require('../config');
// URL
const url = getUrl('/cart');
// Selectors
const modalClass = 'cart-modal';
/**
* Test modal exists
*
* The test object must contain ONLY test cases
*/
module.exports = {
/**
* Case 1
*
* Open popup
*/
testOpenPopup: async function() {
let driver = await new Builder().forBrowser('chrome').build();
try {
await driver.get(url);
const $modal = await driver.findElement(By.className(modalClass));
const _class = await $form.getAttribute('class');
assert.strictEqual(modalClass, _class, 'The modal is not shown');
} finally {
await driver.quit();
}
}
}
beforeTest and afterTest
If you need to perform some actions before or/and after your test you can use these functions in your test object.
Wherever you place these functions in your test object it ensures that beforeTest
will be invoked first and afterTest
last.
FAQs
Use the webtest-runner to run your test synchronously. This is a simple module that you can easily use with Selenium.
The npm package @boozt/webtest-runner receives a total of 678 weekly downloads. As such, @boozt/webtest-runner popularity was classified as not popular.
We found that @boozt/webtest-runner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.