cypress-capybara
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -53,3 +53,4 @@ const logCommand = require('./lib/log-command') | ||
input[type=button][value*="${'locator'}"], | ||
input[type=button][id="${'locator'}"] | ||
input[type=button][id="${'locator'}"], | ||
*[role=button]:contains("${'locator'}") | ||
` | ||
@@ -56,0 +57,0 @@ }) |
@@ -11,3 +11,3 @@ module.exports = function buildCommand ({name, type, locatorTemplate, labelTemplate}) { | ||
}).and($el => { | ||
if (labelTemplate && $el && $el.is('label')) { | ||
if (labelTemplate && $el && $el.is('label') && $el.attr('for')) { | ||
return cy.get(labelTemplate.format({id: $el.attr('for')})) | ||
@@ -14,0 +14,0 @@ } else { |
{ | ||
"name": "cypress-capybara", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Capybara finders re-implemented as custom Cypress commands", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# cypress-capybara | ||
[![CircleCI](https://circleci.com/gh/testdouble/cypress-capybara/tree/master.svg?style=svg)](https://circleci.com/gh/testdouble/cypress-capybara/tree/master) | ||
[![CircleCI](https://circleci.com/gh/testdouble/cypress-capybara/tree/main.svg?style=svg)](https://circleci.com/gh/testdouble/cypress-capybara/tree/main) | ||
@@ -34,2 +34,5 @@ An abbreviated port of [Capybara](https://github.com/teamcapybara/capybara)'s | ||
To see these in action, check out the library's [test | ||
file](cypress/integration/capybara.spec.js). | ||
## Why haven't you implemented `x` method from Capybara::DSL? | ||
@@ -36,0 +39,0 @@ |
Sorry, the diff of this file is not supported yet
11905
204
54