npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cypress-orchardcore

v0.4.7

Published

Cypress commands for Orchard Core

Downloads

33

Readme

Cypress OrchardCore

A collection of cypress commands for interacting with OrchardCore CMS.

Installation

Install this package by running npm install cypress-orchardcore

Setup

Load the package in cypress support index file.

// cypress/support/index.js
import 'cypress-orchardcore'

Orchard admin credentials

First thing to do to use this package is to add the credentials to be used to interact with OrchardCore. These credentials must be added to the cypress.json config file under the orchard key.

{
  "baseUrl": "https://localhost:5001",
  "orchard": {
    "username":"admin",
    "email": "[email protected]",
    "password": "Orchard1!"
  }
}

Orchard default tenant

This library assumes that you will be testing OrchardCore by leveraging the Tenants feature. You must create a test that runs first and sets up the Default tenant using the Software as a service setup recipe.

To do so we suggest you create a test named integration\000-setup-saas-site.js with the following contents.

/// <reference types="Cypress" />

const sassTenant = {
  name: "Testing SaaS",
  setupRecipe: "SaaS",
}

describe("Default tenant setup using SaaS recipe", function() {
  it("Setup default tenant", function() {
    cy.visit("/");
    cy.siteSetup(sassTenant);
    cy.login()
    // this is required to increase paging in the Tenants list page. Since we will be creating a lot of tenants during out testing.
    cy.setPageSize(sassTenant, "100");
  });
});

Test Structure

Since we need to create tenants to test OrchardCore, it is recommended to use cypress's before() hook to create a tenant to use in your suite of tests. We recommend you use 1 tenant for each describe()

/// <reference types="Cypress" />
import { generateTenantInfo } from 'cypress-orchardcore/dist/utils';

describe("VueForm Tests", function() {    
  let tenant;

  before(() => {
      // generate a tenant for all tests below
      tenant = generateTenantInfo("SetupRecipeName")
      cy.newTenant(tenant);
      cy.login(tenant);
      cy.uploadRecipeJson(tenant, "fixturefile.json");
  })

  it("DoesSomething", function() {
    cy.visitContentPage(tenant, "<contentitemid>");
    //...
  })

  it("DoesSomethingElse", function() {
    
    cy.visitContentPage(tenant, "<contentitemid>");
    //...

  })
});

Available Commands

TODO