This package contains a set of helpers to perform End-2-End tests with TestCafé on a SharePoint Online environment with the modern experience.
Install the module in your solution:
npm i testcafe-sharepoint-helpers --save-dev
Import the module in your tests files:
import * as sp from 'testcafe-sharepoint-helpers';
Edit the SharePoint page
await sp.Page.edit();
The module need environment variables or an .env
file at the root folder of your app that contains:
SP_BASEURL=https://contoso.sharepoint.com
SP_USERNAME=testcafe@contoso.com
SP_PASSWORD=yoursuperpassword
Build and link module locally from the project:
npm link
Use local module to another project:
npm link testcafe-sharepoint-helpers
Generate the Markdown documentation with TypeDoc:
npm run doc
Run the local MkDocs server:
mkdocs serve