Socket
Socket
Sign inDemoInstall

@processmaker/cypress-utils

Package Overview
Dependencies
Maintainers
0
Versions
262
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@processmaker/cypress-utils

ProcessMaker Cypress Testing Utilities


Version published
Weekly downloads
2.8K
increased by362.85%
Maintainers
0
Weekly downloads
 
Created
Source

ProcessMaker Cypress Testing Utilities

This package provides a collection of utilities designed to enhance and simplify the development of tests for ProcessMaker with Cypress, an end-to-end testing framework. These utilities aim to make your ProcessMaker automated testing workflow more efficient and manageable.

Features

  • Assertion Helpers: Simplify the process of writing assertions by utilizing ready-to-use helper functions.
  • Custom Commands: Extend Cypress's built-in commands with additional functionality for common use cases.
  • Pages: Utilize reusable page objects that encapsulate the structure and behavior of ProcessMaker's pages.
  • Selectors: Access predefined selectors for ProcessMaker's elements to facilitate test writing.

Installation

To start using the cypress-utils in your project, you'll need to add it as a dependency. Assuming you have Node.js and npm installed, you can add the package by running:

npm install --save @processmaker/cypress-utils

Usage

After installing, you can import and use the utilities in your Cypress tests.

First, add some aliases in your cypress.config.js file:

module.exports = defineConfig({
    e2e: {
        setupNodeEvents(on, config) {
            const options = {
                webpackOptions: {
                    resolve: {
                        alias: {
                            "@helpers": "@processmaker/cypress-utils/helpers",
                            "@pages": "@processmaker/cypress-utils/pages",
                            "@selectors": "@processmaker/cypress-utils/selectors",
                            "@support": "@processmaker/cypress-utils/support"
                        },
                    },
                },
            };
        },
        on("file:preprocessor", webpack(options));
    },
});

Then, import and use the utilities in your tests:

import { Login } from "@pages/login";

const login = new Login();

describe("Example Test", () => {
    beforeEach(() => {
        login.navigateToUrl();
        login.login();
    });

    it("Loads the requests page", () => {
        cy.visit("/requests");
        cy.url().should("include", "/requests");
    });
});

FAQs

Package last updated on 02 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc