0.3.0 • Published 1 year ago

@vasily.strelyaev/tcd-screenshot-updater v0.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

tcd-screenshot-updater

Use this module to download and update baseline images in your local project's layout tests after you complete the review on TestCafe Dashboard.

Setup

  1. Ask the TestCafe Dashboard team for an authentication token.
  2. Create a .dashboardrc.json configuration file in your project's root directory. Specify the authentication token in the jwtToken property. If you use a TestCafe Dashboard deployment that is not https://dashboard.testcafe.io, specify its URL in the dashboardUrl property.

    {
        "jwtToken": "<authentication_token>",
        "dashboardUrl": "https://local.dashboard.mycorp.com"
    }

Usage

  1. Study the test report on TestCafe Dashboard. Mark baseline screenshots that need to be updated. After you finish, copy the review ID.
  2. Run the tcd-update command in the console and pass the review ID as the first parameter:

    tcd-update '<review-id>'
  3. Alternatively, use the updateLayoutScreenshots function to update screenshots from code. The getOptions function can read settings from the configuration file.

    import { updateLayoutScreenshots, getOptions } from 'tcd-screenshot-updater';
    
    const { jwtToken, dashboardUrl } = await getOptions();
    
    await updateLayoutScreenshots(dashboardUrl, jwtToken, '<review-id>');
0.3.0

1 year ago

0.2.0

2 years ago

0.3.0-rc.1

1 year ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.1-alpha.1

2 years ago