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

@leonknabel/gitlab-cypress-integration

v1.2.4

Published

Runs cypress tests in gitlab issue description and notes

Downloads

20

Readme

Cypress gitlab integration

An example of the simple integration into gitlab-ci can be seen here.

Usage

In GitLab, you can post code blocks with cypress commands and they will be updated with screenshots and state. Updates on pipeline runs on issue related branches.

```cypress
cy.visit('/sub-page');
cy.get('button').contains('Click me').click();
cy.get('simple-snack-bar');
```

Passed test

cy.visit('/sub-page');
cy.get('button').contains('Click me').click();
cy.get('simple-snack-bar');

Failed test

cy.visit('/sub-page');
cy.get('button').contains('Click me').click();
cy.get('simple-snack-bar');

Issues

A branch name containing a number is considered related to an issue with given number as id. The description and notes will be checked against this branch.

Note on issue

After creating an issue add a comment with one or more tests to it.

cy.visit('/sub-page');
cy.get('button').contains('Click me').click();
cy.get('simple-snack-bar');

note with cypress test

Create branch

Create a branch to address the issue. The issue id musst be part of the chosen branch name. This can be easily done directly via the issue. Now everytime the branch has changes pushed, the comments will be updated.

Resulting in a screenshot and failure indication on the test and on the comment itself.

cy.visit('/sub-page');
cy.get('button').contains('Click me').click();
cy.get('simple-snack-bar');

After pushing a fix for the issue to the related branch, the comment is updated again.

cy.visit('/sub-page');
cy.get('button').contains('Click me').click();
cy.get('simple-snack-bar');

Setup

This project was generated with Angular CLI version 17.3.2.

Cypress

Add cypress as e2e testing framework

ng add @cypress/schematic

Gitlab cypress integration

Shell

The gitlab token can either be passed as cli argument -t, --token or with the variable GITLAB_TOKEN. The token must have at least api access.

npx @leonknabel/gitlab-cypress-integration -r <repository> -b <branch> -a <application> -t <gitlab-token>

Gitlab Pipeline .gitlab-ci.yml

image: node:latest

report_branch:
  stage: report
  script:
    - npx -y @leonknabel/[email protected] -b "$CI_COMMIT_BRANCH" -r "$CI_PROJECT_PATH" -a "angular-example" -t "$GITLAB_TOKEN" --local