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
2
votes
0 answers

web-component-tester progress has incorrect total

The progress ring widget that appears at the top right-hand corner of the page when running web-component-tester seems to show the total number of tests as always 3x the number of test suites, rather than the actual total of tests. Is this a known…
Nathan
  • 108
  • 7
2
votes
0 answers

Timeouts testing polymer elements with web-component-tester and sauce labs

We're having trouble testing our polymer elements with web-component-tester and Sauce Labs. When we try to test with more browsers than our subscription level allows to run simultaneously, the tests that don't run immediately eventually time out. It…
cayblood
  • 1,838
  • 1
  • 24
  • 44
2
votes
1 answer

How to allow web-component-tester to run tests stored with my components

I am experimenting with the framework to build an SPA using polymer. This will include a large number of custom elements at various levels in the overall application hierarchy. I would like to use web-component-tester to run the module tests on…
akc42
  • 4,893
  • 5
  • 41
  • 60
1
vote
0 answers

Cypress component testing error Module parse failed: Unexpected token

Follow up this question I am using NX 14.5.1 and cypress 10.2.0. I tried another way by creating a custom webpack (I catched from "node_modules/@nrwl/react/plugins/webpack.js") and adding "process.env" into it. const webpack =…
1
vote
1 answer

In Cypress how to count the number of rows in a table?

I am doing E2E tests with cypress. i have to count the number of rows in a table which are different from case to case. in normal javascript I just write this to get the number of total rows of the…
1
vote
0 answers

web component test not running, command line gives error, wct is not a command

I just install web-component-tester by npm and trying to run test by wct command, but getting error. WCT command is not working cmd is not recognizing this command Title
Hussain Shahid
  • 131
  • 2
  • 5
1
vote
0 answers

children and parentNode commands not work on web components

I have page that is based on web components. I can find every custom compenent by custom tag name, but when I want to get children of element in chrome devtools console, I have empty list (document.getElementsByTagName…
Lucas
  • 81
  • 7
1
vote
0 answers

How to test a custom element which includes other modules?

Is there a way to test a custom element (using WCT) which includes an external module (let's say a npm one) or another custom element? For instance I'm trying to test a custom element that looks like: // ~/root/src/index.js import…
1
vote
1 answer

Disable Sauce connect prefetch

Is there a way I can disable the prefetching of the sauce connect binary when I run an npm install on a polymer project? I am running my tests on a CI that has no connection to the outside world. I do not wish to use the sauce connect binary so I…
Homewrecker
  • 1,076
  • 1
  • 15
  • 38
1
vote
2 answers

Unable to access elements inside Shadow Root in WCT

In my unit test, I am unable to access dom element from shadow root. var el = fixture('basic'); var imgElement = el.shadowRoot.querySelector('img'); I am getting null in imgElement. How to get the img element? I have tried also, var imgElement2=…
D.P
  • 65
  • 6
1
vote
1 answer

How to test service files using wct in polymer if it doesn't contain any custom component

I would like to write unit test case for a service file named session.js, where there is no custom element is defined. Can we call functions defined in service file from Polymer WCT. export const ValidateSession=()=>{ try{ …
1
vote
1 answer

How can I resolve Web Component Testing error?

Hello to anyone reading: Currently, I am trying to run a test in a demo repository, seen here. After doing the npx wct command, I see the following: TYS-ITS-169599:wct-eyes-example lhuddlesto$ npx wct Eyes WCT plugin loaded. Starting Selenium server…
1
vote
0 answers

Polymer not Defined in Web Component Tester

I am trying to run two tests with web-component-tester interactively on a Polymer 2 project in Chrome v69, web-component-test v 6.5.0, and webcomponentsjs v 2.1.3. The first super basic test passes, and the second fails with the following error:…
Matthew
  • 1,461
  • 3
  • 23
  • 49
1
vote
1 answer

flush function always makes polymer test (for dom-if) pass

I am writing tests for polymer-3.x element where I am using dom-if. According to the docs, i used flush. But this does not evaluate and directly marks all tests as passed. my-element_test.html
Raj
  • 1,100
  • 3
  • 20
  • 33
1
vote
0 answers

Run Web Component Tester on HTTPs

We need to test a Polymer element in an HTTPS URL when we run $ wct, aka the Web Component Tester. We're developing an element for screensharing, which requires a Chrome screensharing browser extension which only works on HTTPS. We're aware that WCT…
nicholaswmin
  • 21,686
  • 15
  • 91
  • 167