Questions tagged [web-component-tester]

For question about web-component-tester, a tool for testing Polymer-based web components.

web-component-tester is a browser-based testing environment for -based web components, configured out of the box with:

For more details, see

111 questions
3
votes
1 answer

How to mock global variables in Web Component Tester

We have several situations where our Polymer elements have methods that rely on global behaviour, such as viewport size detection, or an analytics package that injects a global variable. Now I'm trying to test these methods using Web Component…
Vincent
  • 4,876
  • 3
  • 44
  • 55
3
votes
1 answer

Web Component Tester: Accessing the DOM

I have hundreds of Polymer test suites. At the end of each test, I'd like to access the DOM to do some custom quality checks. Would writing a wct plugin work? If so, how should I access the DOM from within a plugin? Thanks in advance!
x74x61
  • 423
  • 6
  • 18
3
votes
1 answer

Polymer Web Component Tester sendKeys

Is there a method that I can use to send keys to an input field using web component tester? I'd like to test sending the return key to a form.
Kyle Buchanan
  • 193
  • 1
  • 10
3
votes
3 answers

Polymer unit test: dom-repeat is not rendered when "ready" is called

I have the following unit test for my custom polymer component: survey
taylorstine
  • 905
  • 7
  • 17
3
votes
1 answer

All tests fail in Web Component Tester for Firefox

After creating a clean copy of the Polymer Starter Kit, running the tests using the Web Component Tester ("test" Gulp task) results in all tests failing in Firefox. The tests run through fine in both Chrome and IE. The error is: firefox 39 …
Brett Postin
  • 11,215
  • 10
  • 60
  • 95
2
votes
1 answer

How to test existence of element in polymer?

I am facing this issue in my polymer component and unable to find out where I am facing. The following are my code: