Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fabienhenon/test-attribute

Add test attributes in test environment for end to end tests
https://github.com/fabienhenon/test-attribute

Last synced: 9 days ago
JSON representation

Add test attributes in test environment for end to end tests

Awesome Lists containing this project

README

        

# test-attribute [![Build Status](https://travis-ci.org/calions-app/test-attribute.svg?branch=master)](https://travis-ci.org/calions-app/test-attribute)

With the `TestAttribute` module you can add attributes to your html elements only for `Test` env.
This allows you to select DOM elements with these attributes for your end to end tests.

## Getting started

Here is how to add an id test attribute to an element:

```elm
div [ class "element", TestAttribute.addId "my-element" env ] [ text "My element" ]
```