Skip to content

wix-incubator/wix-preview-tester

Repository files navigation

wix-preview-tester

The wix-preview-tester uses a method called refreshTestsConfigs to preview local source code with the Wix CLI and save siteRevision and branchId in a file named wix-preview-tester.config.json.

For example, by executing refreshTestsConfigs in the pre-commit of .git/hooks, you can keep siteRevision and branchId under source code management.

Furthermore, by using getTestsConfig, you can read this file to use Wix Preview URLs as a snapshot at the time of commit, and execute E2E tests on CI.

Requirements

Install

Add to package.json

{
  "devDependencies": {
    "wix-preview-tester": "git+https://github.com/hand-dot/wix-preview-tester.git"
  }
}

Usage

node

const { setTestsConfig, getTestsConfig, refreshTestsConfigs } = require('wix-preview-tester');

CLI - run refreshTestsConfigs (require install local and npm link)

npx wix-preview-tester

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published