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

aitk-qe

v1.0.1-AITK-96-contract-tests-65edee5.0

Published

Cypress Tests for AI Force

Downloads

12

Readme

Cypress integration tests for https://github.com/ImagineLearning/ai-toolkit/

[!NOTE] These instructions are based on https://github.com/edgenuity/mpng-automation-ui/blob/main/README.MD Please direct questions on Slack to the #qa_cypress channel on the Imagine Learning Enterprise workspace.

SETUP

Install Node 20+ (current: v20.11.1) Install npm 10+ (current: 10.2.4) Clone this repo and run npm i

CREATE .env FILE

Create a local .env file in the root of the repo. The file MUST contain the following:

CYPRESS_TEAM=
CYPRESS_ENV=
CYPRESS_API_URL="https://cypress-director.imaginelearning.engineering/"

CYPRESS_ENV specifies the environment where tests will run from your local machine:

  • "local"
  • "qa"
  • "prod"

CYPRESS_TEAM specifies which team's data to use for tests:

  • "lmsadmin" uses env-mps-data (this is the default test data if CYPRESS_TEAM is not provided)
  • "edgeex" uses ...
  • "mpng" uses ``

PLEASE DO NOT COMMIT YOUR LOCAL .env FILE!

RUNNING TESTS

Cypress E2E UI (headed : local) Tests can be run using the Cypress E2E UI on your local machine. You can choose which test(s) to run and view it in realtime.

npm run cy-open

Sorry Cypress (headless : local) Tests can be run on Sorry Cypress from your local machine. Tests will run in the environment set in your .env file. Test tags are implemented with Gleb Bahmutov's cy-grep and can be used to run a subset of tests: @smoke

#to run tests with a tag, surround the tag in quotes
#run ALL tests with @smoke tag
npm run local '@smoke'

#to run tests with a tag OR another tag, surround each tag in quotes
#run ALL tests with @alladmin OR @teacher tags (||)
npm run local '@alladmin' '@teacher'

#to run tests with a tag AND another tag, concatenate tags with + and surround in quotes
#run ALL tests with @schooladmin AND @smoke tags (&&)
npm run local '@schooladmin+@smoke'

#to run tests with a tag AND another tag OR tests with a tag, combine the tagging methods
#run ALL tests with @teacher AND @smoke tags OR ALL tests with @student tag (&& and ||)
npm run local '@teacher+smoke' '@student' 

Scripts are also included for local test runs:

__RUN ALL TESTS__
#run every test in the repo
npm run local

VIEWING TEST RESULTS

Cypress E2E UI (headed : local) Test results from Cypress E2E UI runs are stored in the repo directory:

cypress/reports/downloads
cypress/reports/screenshots
cypress/reports/videos

Sorry Cypress (headless : local or remote) Test results from local and CI/CD pipeline runs are stored online: Sorry Cypress Dashboard

TROUBLESHOOTING

CYPRESS E2E UI ISSUES

  • Cypress E2E UI and Chrome can eat up a lot of memory. If you get the "Aw, Snap!" Chrome error message, you have to shut down Cypress entirely from the CLI and restart again. Restarting the Cypress E2E UI is not enough; the error will persist.
  • In cypress.config.js, the value numTestsKeptInMemory is set to 0 to save memory. This can be increased to view results from local test runs if desired but please remember to set to 0 on pushes.