Questions tagged [wct]

Web-Components-Tester is a unit-test harness that makes testing your Polymer Web components a breeze!

33 questions
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
0 answers

should I replace wct-istanbul by WCT-istanbub in order to estimate how much polymer web compnents is test coveraged

There is some similiarity between my question and How to measure common coverage for Polymer components + .js files?. Nevertheless, it is accepted as answer "split to .js files and include it to components" in order to use wct-istanbul and all my…
Jim C
  • 3,957
  • 25
  • 85
  • 162
1
vote
0 answers

Disable ready event or dom change event in a WCT test?

In polymer 1.*, I am writing a test. My original element has a ready handler which acts on dom-change. WCT does not provide a way to stub anything in the ready handler. It also does not allow me to stub data on the host property at the time exact…
dman
  • 10,406
  • 18
  • 102
  • 201
1
vote
0 answers

Polymer flush when calling fixture

Is it ok to put flush function in setup where the fixture called? I've tried it and it still work also better, because I don't need to flush in every single test. No example found on google doing that kind of things. Any…
1
vote
0 answers

IE 11.0.9600.18538 "state":"session not created" while doing testing of polymer application with WCT

Getting the error while running the test case for polymer application. I am not getting where I am doing wrong. Error is: IE 11.0.9600.18538 Tests failed:{ "state":"session not created", "sessionId":null, "hCode":613752704, …
Anita Mehta
  • 625
  • 2
  • 13
  • 30
1
vote
1 answer

Running web-component-tester on TeamCity

Can someone help me running wct on teamcity. I have the buld configured, but I get below error when running wct: [12:15:54][Step 1/1] /opt/jetbrains/TeamCityAgent/work/f73ec8c1325df542/node_modules/web-component-tester/bin/wct:21 [12:15:54][Step…
kleptomac
  • 49
  • 6
1
vote
1 answer

How can I pass a wct test while rearranging children spans in a Polymer element?

I am creating a polymer element called "price-text" that displays a monetary value and some text associated with it. I am also adding the ability to reverse their positions when the "swap" attribute is present. I have performed a large amount of…
1
vote
1 answer

Unit test a polymer web component that uses firebase

I have been trying to configure offline unit tests for polymer web components that use the latest release of Firebase distributed database. Some of my tests are passing, but others—that look nigh identical to passing ones—are not running properly.…
Paul Gestwicki
  • 1,610
  • 1
  • 15
  • 18
0
votes
1 answer

Selenium exited before it could start error while running WCT in Jenkins Pipeline

I get errors while running WCT in the Jenkins pipeline. I share that errors detail on the bottom. These errors may be related to Openshift. Maybe you can share your opinion. Note: My tests are running at Openshift. First case: -> I running with a…
0
votes
0 answers

How to define 'filter' on WCT?

how to read property 'filter' on WCT I'm getting error when I run WCT "Cannot read property 'filter' of undefined" How can we define a filter on WCT suites
MandaliVenkat
  • 33
  • 2
  • 9
0
votes
1 answer

How to read this.$$('#startdate').value on WCT using polymer

I'm unable to read the value from this.$$('#startdate').value to WebComponentTest(WCT) startDate = this.$$('#startdate').value
MandaliVenkat
  • 33
  • 2
  • 9
0
votes
1 answer

web-component-tester cannot bind to port

I have a docker setup with following containers: selenium-hub selenium-firefox selenium-chrome spring boot app node/java service for wct tests All these containers are defined via docker-compose. The node/java service is created as follows…
Homewrecker
  • 1,076
  • 1
  • 15
  • 38
0
votes
0 answers

how to test ajax request in custom component made by polymer

component html file part where request is being send Login
learning code
  • 11
  • 1
  • 7
0
votes
1 answer

WCT is not able to detect google chrome browser in Redhat Linux

WCT is not able to detect google chrome browser in Redhat Linux when running polymer test --skip-selenium-install and is throwing below error: cli runtime exception: Error: {"value":{"stacktrace":"org.openqa.selenium.WebDriverException: unknown…
Gangadhar Jannu
  • 4,136
  • 6
  • 29
  • 49
0
votes
1 answer

How do you specify which browsers Sauce Labs should use when initiating tests from the Polymer CLI?

I have a Polymer v1.7 element only project. I have it set up with Travis CI and Sauce Labs which works great! However, I would like to be able to initiate tests in specific browsers through Sauce Labs without having to tinker with my wct.conf.json…
Ben
  • 5,525
  • 8
  • 42
  • 66