@get-skipper/nightwatch
v1.0.1
Published
Skipper plugin for Nightwatch.js — enable/disable tests from a Google Spreadsheet
Maintainers
Readme
@get-skipper/nightwatch
Skipper plugin for Nightwatch.js — enable/disable tests from a Google Spreadsheet.
Installation
pnpm add -D @get-skipper/nightwatch
# or
npm install --save-dev @get-skipper/nightwatchSetup
Update nightwatch.conf.js — this is the only change required:
const { createSkipperPlugin } = require('@get-skipper/nightwatch');
module.exports = {
globals: createSkipperPlugin({
spreadsheetId: process.env.SKIPPER_SPREADSHEET_ID,
credentials: { credentialsBase64: process.env.GOOGLE_CREDS_B64 },
// Or for local dev:
// credentials: { credentialsFile: './service-account.json' },
}),
// ... rest of your config
};No changes to test files are required. Tests with a future disabledUntil date are automatically skipped via beforeEach.
Test ID Format
{module path} > {test name}If Nightwatch exposes nested describe blocks via titlePath, the full path is used:
tests/auth/login.js > login > should log in with valid credentialsOptions
| Option | Default | Description |
|---|---|---|
| sheetName | first tab | Sheet tab to read/write |
| referenceSheets | [] | Additional tabs to read (read-only) |
| testIdColumn | "testId" | Column header for the test ID |
| disabledUntilColumn | "disabledUntil" | Column header for the disable date |
See the root README for the full configuration reference.
Modes
read-only(default): reads the spreadsheet, skips disabled tests. No writes.sync(SKIPPER_MODE=sync): same as read-only + reconciles the spreadsheet after the run.
See the root README for full setup instructions.
License
MIT
