-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slider functional tests #322
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis looks like it's having some issues, but this looks good otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little iffy on adding extraClasses
just for easier targeting in tests, but I'm OK with it if you think it's worth it.
.findByCssSelector(`.${css.input}`) | ||
.getProperty('value') | ||
.then((value: string) => { | ||
currentValue = parseInt(value, 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this works because all the example page sliders are from 0-100, but it's probably worth noting that if that ever changes, this check will fail.
}) | ||
.end(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One other potential test: clicking on the UI elements (or at least on the x,y position of the visible UI) sets focus on the <input>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in a bunch of tests for this
9b6a78e
to
fd9d745
Compare
src/slider/example/index.ts
Outdated
@@ -65,6 +66,7 @@ export class App extends WidgetBase<WidgetProperties> { | |||
}), | |||
v('h1', {}, ['Disabled slider']), | |||
w(Slider, { | |||
extraClasses: { root: 's2' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as with label PR, should wrap in a div with a functional test class then use that along with slidercss.root
to target.
Codecov Report
@@ Coverage Diff @@
## master #322 +/- ##
=======================================
Coverage 97.78% 97.78%
=======================================
Files 25 25
Lines 1940 1940
Branches 491 491
=======================================
Hits 1897 1897
Misses 20 20
Partials 23 23 Continue to review full report at Codecov.
|
140c574
to
9d6e627
Compare
9d6e627
to
8b211bd
Compare
Type: feature
The following has been addressed in the PR:
Description:
Adds basic functional tests for
Dialog
based on lzhoucs's PR #178 with rebasing and updates.Resolves #158