Unit Testing with Web Component Tester -- Polycasts #36

preview_player
Показать описание
Testing the behavior of your components is not only useful for peace of mind, but it also makes your it much easier to refactor and add new behavior in the future without accidentally triggering regressions and bugs. Today on Polycasts I'll show you how to get setup with Polymer's test runner, Web Component Tester, and demonstrate how to write your first couple of tests!

Web Component Tester

Seed Element

Рекомендации по теме
Комментарии
Автор

Can you go over writing tests in ES6, and using Babel to transpile. Also, browser detection in Windows takes a ridiculously long time. Is there a way to tell WCT to use an existing Selenium server?

knottheoffice
Автор

Can Web Component Tester be used to do functional tests? I have tried to use Selenium, but have ran into problems with ID's. (Selenium doesn't understand shadow DOM) How would you recommend doing functional tests? Thanks!

im.a.nickel
Автор

+RobDodson can I put `<template is="dom-bind">` into `<test-fixture>`?

tomekwytrebowicz
Автор

Rob, thanks for the video. In the next one can you please cover dual-binding in tests? Thanks!

Panzerboy
Автор

At 9:00, could you use this.$$('button')? Instead of

BobbyBattista
Автор

+RobDobson a great Polycast my question is the web-component-tester is the same as iron-test-helpers or different

rodolfotovartorres
Автор

Is there is any way to simulate and test drag and drop events?

sasivarnan
Автор

Hi +RobDodson,
Recently, the notion of mutation testing has come to my attention.
I would like to measure the correctness of my unit tests in WCT.
Will WCT support mutation testing in the future?

SpecialeW
Автор

What are the "module not found" errors popping up at the beginning of your terminal when you run wct?

charlieh
Автор

Hey Rob, Thanks for this, very helpful. I was wondering how to add/remove browsers from the suite. I also presume nothing will work with IE....? Looking forward to more esp about the sinon bit.Cheers, Peter

prushforth
Автор

How would you test a web component that performs Ajax requests?

griffadev
Автор

How to resolve this error.

Error:
The web-component-tester Bower package is not installed as a dependency of this project (predix-webapp-starter).

Please run this command to install:
bower install --save-dev web-component-tester

Web Component Tester >=6.0 requires that support files needed in the browser are installed as part of the project's dependencies or dev-dependencies. This is to give projects
greater control over the versions that are served, while also making Web Component Tester's behavior easier to understand.

Expected to find a package.json or bower.json or .bower.json at: C:\Polymer Unit

rajeshful
Автор

Thx for good video, but like a typical mid frontend dev here, I'm doesn't use testing and really don't understand big part of this video. Where I can get basics?

obvious_things
Автор

+RobDodson A video for unit testing elements, that uses firebase would be nice!

BornMarc