Skip to content

Conversation

@drhaliburton
Copy link
Contributor

@drhaliburton drhaliburton commented Jan 30, 2019

Test suite is failing due to label selectors not triggering the proper events for MdCheckbox and MdSwitch tests. Converted tests to use container selectors found in other functioning tests within the same files.

Hopefully this helps with the backlog of PRs that are all failing!

@marcosmoura marcosmoura changed the title fix test selectors for checkbox and switch test: fix test selectors for checkbox and switch May 11, 2019
@marcosmoura marcosmoura merged commit cc341e6 into vuematerial:dev May 11, 2019
marcosmoura added a commit that referenced this pull request May 12, 2019
* origin: docs: fix 2 wrong property names with autocomplete docs (#2006) fix(MdTable): undefined table sorting #1906 (#2012) docs: fix dynamic tooltip text to show bottom instead of top (#2013) refactor(MdDatepicker): upgrade date-fns (#2037) fix(MdDatepicker): positioning when used inside flex container (#2036) fix(MdSelect): infinite loop error, when no v-model provided (#2035) fix(MdApp): normalized component's tag before checking to match slot … (#1994) chore: some misspellings in config.js (#1986) fixFixed non unique ids on MdSelect (#2001) fix(MdInput): invert password on-off icons (#2008) test: fix test selectors for checkbox and switch (#2009) docs: add default theme as a suggestion (#2043) Fixed md-wave transition (#2034) fix(MdRipple): fixed missing ripple effect (#2059)
marcosmoura added a commit that referenced this pull request May 12, 2019
* origin: (80 commits) docs: remove wrong text-shadow docs: add referal code fix(MdProgressSpinner): improve transition (#1946) chore: upgrade deps docs: fix 2 wrong property names with autocomplete docs (#2006) fix(MdTable): undefined table sorting #1906 (#2012) docs: fix dynamic tooltip text to show bottom instead of top (#2013) refactor(MdDatepicker): upgrade date-fns (#2037) fix(MdDatepicker): positioning when used inside flex container (#2036) fix(MdSelect): infinite loop error, when no v-model provided (#2035) fix(MdApp): normalized component's tag before checking to match slot … (#1994) chore: some misspellings in config.js (#1986) fixFixed non unique ids on MdSelect (#2001) fix(MdInput): invert password on-off icons (#2008) test: fix test selectors for checkbox and switch (#2009) docs: add default theme as a suggestion (#2043) Fixed md-wave transition (#2034) fix(MdRipple): fixed missing ripple effect (#2059) docs: add codefund ads and remove old sponsors fix(MdSvgLoader): svg loader for invalid / missing mimetype (#1942) ...
@DavidHavl
Copy link

Unfortunately I don't think this is the right way to go about it. The tests specifically need to test if a click on LABEL works properly. The changes made are clicking on the container of the input not on a label, so it's not really a point of the test.

@DavidHavl
Copy link

I have found the issue... it bubbles up and creates double click for some reason.
Here is how to fix it (I am lazy to create a PR):

put everything the way it was (selecting label and clicking on it), but prevent bubbling up.
So instead of
label.trigger('click')

it needs to be:
label.trigger('click', { cancelBubble: true })

which basically adds info to the underlying Event created by test script which prevents bubbling up.

@DavidHavl
Copy link

@marcosmoura , @drhaliburton
I hope this helped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants