项目作者: rimian

项目描述 :
Capybara Selectors for Angular Material
高级语言: Ruby
项目地址: git://github.com/rimian/capybara-angular-material.git
创建时间: 2015-09-14T17:01:40Z
项目社区:https://github.com/rimian/capybara-angular-material

开源协议:MIT License

下载


Capybara Selectors for Angular Material

Build Status
Gem Version

A DSL for interacting and/or checking against Angular Material components.

This is tested using the capybara/poltergeist driver.

If you want to test how this works locally, check out this repo, install then run rackup -p8000. You’ll see the paths in the app.js file. eg: localhost:8000/#/radio. I’ll get around to documenting more later.

Installation

Add this line to your application’s Gemfile:

  1. gem 'capybara-angular-material'

You’ll also need to install Capybara.

Usage

In your spec helper, include the DSL:

  1. require 'capybara/angular/material'
  2. RSpec.configure do |config|
  3. include Capybara::Angular::Material
  4. end

The DSL

Querying forms

  1. have_md_checkbox('Some text')
  2. have_md_checkbox('Other thing', :checked => true)
  3. have_md_button('Some text')
  4. have_md_radio_button('Banana', :checked => true)
  5. have_md_radio_button('Banana')
  6. have_md_radio_button('Some place holder text')
  7. have_md_select('Select Label')

Interacting with forms

  1. md_check('A checkbox')
  2. md_uncheck('A checkbox')
  3. md_select('An option', :from => 'Select Menu')