0.0.6 • Published 3 years ago

cypress-dataverse v0.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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.

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago