Gapminder / tools-page

Gapminder tools page vanilla
8 stars 5 forks source link

Problem with selector when switching through charts #37

Closed mirzapqa closed 6 years ago

mirzapqa commented 6 years ago

We have problem when all-charts.e2e is executed. Test is breaking on selector selectedCountries:$('[class*="vzb-bmc-entity label"]'). It is initialized on map-chart.po.ts.

selectedCountries: ExtendedArrayFinder = _$$('[class*="vzb-bmc-entity label"]');

I have changed it to $$('[class*="vzb-find-item vzb-dialog-checkbox vzb-checked vzb-separator"]') but in Angies opinion this is to long and not good for coding standards. This was only selector that I could use for count, which is coming up later in test. Angies opinion is that we should again have some selector that is similar to the first one, because if we use the other one on different devices it will break up because of the size of screen and driver will not pick it up.

I have spoke to Angie and he told me to address this problem here. Please we need to have another selector(label, class, id) where we can use it for testing purposes that meets coding standards and that will not break on different devices (screen sizes).

AntonOlkhovskyi commented 6 years ago

@mirzapqa If you need to use $$('[class="vzb-find-item vzb-dialog-checkbox vzb-checked vzb-separator"]') to only get count, you can just use $$('[class="checked"]') it will be the same but shorter. and it is present(not visible) in the DOM on all layouts (mobile and tablet). But from what i saw in the DOM, neither Checkbox or Label will guarantee that country bubble is actually selected.

mirzapqa commented 6 years ago

Thanks Anton, I will try this way and see what happens.

mirzapqa commented 6 years ago

This helped and it works. Thanks @AntonOlkhovskyi