cypress-dataverse
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

cypress-dataverse

A library of custom Cypress commands for building tests for Microsoft Dataverse.

Installation

Add cypress-dataverse to your project by running the following:

npm install --save-dev cypress-dataverse

Setup

Plugin

Add the following to cypress/plugins/index.js:

const { registerDataversePlugin } = require("cypress-dataverse/plugin");

module.exports = (on, config) => {
  registerDataversePlugin(on, config);
};

Commands

Add the following to cypress/support/index.js:

const { registerDataverseCommands } = require("cypress-dataverse/commands");

registerDataverseCommands();

Usage

Add the following beforeEach call to any of your .spec.js files to login to Dataverse:

beforeEach(() => {
  cy.login({
    username: Cypress.config("username"),
    password: Cypress.config("password"),
  });
});

Note: This assumes that you are storing username and password for a test account in your Cypress. You might instead want to add these credentials as environment variables.

/cypress-dataverse/

    Package Sidebar

    Install

    npm i cypress-dataverse

    Weekly Downloads

    9

    Version

    0.0.6

    License

    ISC

    Unpacked Size

    7.82 kB

    Total Files

    18

    Last publish

    Collaborators

    • mhogsett