Skip to content

Commit

Permalink
examples/material: use composite descriptors and Child components
Browse files Browse the repository at this point in the history
  • Loading branch information
xrg committed Jul 30, 2019
1 parent 1da776b commit 145488b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
6 changes: 4 additions & 2 deletions examples/material/site/components/autocomplete-overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
<use-template id="layout">
<!--<div slot="title">Filter autocomplete</div>-->
<mat-form-field pe-deep slot="body" this="autocomplete"
pe-controller="mat-autocomplete">
pe-controller="mat-autocomplete"
class="[invalid]:+ng-invalid"
class="[pristine]:+ng-pristine">
<input pe-deep this="input"
type="text" matinput role="combobox"
aria-owns='[owns]'>
<pe-matchid id="root['input'].owns" this="panel">
<pe-matchid id="root['input'].owns" this="panel" pe-optional>
<mat-option this="[text]" role="option">
<span class="mat-option-text">[text]</span>
</mat-option>
Expand Down
14 changes: 13 additions & 1 deletion examples/material/steps/mat_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ def value(self, val):

@property
def error_message(self):
return self['error'].message
try:
return self['error'].message
except KeyError:
return None

class ChildComponent(object):
pass



Expand Down Expand Up @@ -83,6 +89,9 @@ def value(self, val):
self._scope.wait_all('short', welem=self._remote)
assert self['input'].value == val

class ChildComponent(object):
pass


class MaterialVersionCtrl(DOMScope):
_name = 'mat-version-picker'
Expand All @@ -102,4 +111,7 @@ def set_version(self, value):
self['menu'][value].click()
self._scope.wait_all('short')

class ChildComponent(object):
pass

#eof

0 comments on commit 145488b

Please sign in to comment.