Re: [w3c/webcomponents] Support `>>>` combinator in static profile (#78)

> But you wouldn't do this with builtin elements. You wouldn't reach into video element's controls and start messing with their buttons because you trust that video element is implemented & tested correctly on its isolation.

True - but again that doesn't scale up to the way web components are used today. This is due to two base reasons:

 1. Custom elements cannot properly participate in a form. Form elements inside the component have to be tested with elements outside of the component.
 2. As you combine base elements into distinct sets, the parent element becomes an app and testing requires interacting with the children in integration tests.

```html
<my-app>
  #shadowRoot
    <form>
      <name-fields>
        #shadowRoot
          <input type="text" name="fullname">
      </name-fields>
      <form-submission></form-submission>
    <form>
</my-app>
```

Take the above example. How do you test the form submission works? This is of course a contrived example, but the answer shouldn't be "don't do that". Having distinct grouping of input fields is handy to share between several forms.

As you continue to compose custom elements together, how else do your properly test the combined total? How do you test `<my-app>` in a final integration test in a browser?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/78#issuecomment-335049173

Received on Monday, 9 October 2017 00:20:17 UTC