New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mojotech/prismatest-css

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mojotech/prismatest-css

CSS adapter for use with @mojotech/prismatest.

  • 0.4.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Prismatest CSS Adapter

This adapter is used to interact with your test views using CSS selectors and native DOM APIs.

Element Type

Elements are native HTMLElement instances. They may be more specific depending on the element that is selected.

Selector Type

Selectors are specified using CSS selector fragments. When selectors are combined they are joined with a space. If multiple CSS selector fragments are specified in a single string using commas, then when they are combined the fragments are split, combined with the next selector, and rejoined using commas. This is effectively a cartesian product.

Quick Start

  1. Install

    yarn install --dev @mojotech/prismatest-css
    
  2. Render something

    import App from "./app";
    import * as ReactDOM from 'react-dom';
    
    const rendered  = document.createElement('div');
    ReactDOM.render(<App />, domContainer);
    
  3. Use some test views

    import testView from "@mojotech/prismatest-css";
    import TodoComponent from './todo-component';
    
    const TodoView = testView('#todo-component');
    
    const todoInput = TodoView(testView.defaultViews.textInput).materialize(rendered);
    const todoSubmit = TodoView(testView.defaultViews.button).materialize(rendered);
    
    todoInput.enterText("Write some tests!");
    todoSubmit.click();
    

FAQs

Package last updated on 28 Feb 2020

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