? ? Success

User tests: Successful: Unsuccessful:

avatar yvesh
yvesh
7 Oct 2016

Summary of Changes

Fixes JavaScript tests failures in Firefox 49 and Drone.io tests.

The updated drone.io image contains Firefox 49. In this version Mozilla changed their behavior of where to add attributes, which are inserted by JavaScript.

E.g. instead of

<span rel="text" class="highlight">text</span>

The markup now looks like

<span class="highlight" rel="text">text</span>

As we currently run our JavaScript tests on two Firefox versions (39 on Travis, 49 on drone), we need a more generic solution. E.g. the tests are now only looking if the highlight class is added not for the full markup.

Testing Instructions

Review Travis + Drone.io log

Documentation Changes Required

None

// cc @rdeutz @zero-24

avatar yvesh yvesh - open - 7 Oct 2016
avatar yvesh yvesh - change - 7 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Oct 2016
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 7 Oct 2016
Category JavaScript Unit Tests
avatar yvesh yvesh - change - 7 Oct 2016
The description was changed
avatar dgt41
dgt41 - comment - 7 Oct 2016

how about

expect($('#text-depth-1')).hasClass("highlight"')).toBeTruthy();
avatar yvesh
yvesh - comment - 7 Oct 2016

@dgt41 hmm not sure. It then would then need to be something like that (yes you can write it shorter):

$('#text-depth-1').children('span').first().hasClass('highlight')

On some even more complex - As we mostly look at generated child elements (or even deeper were we would need find() instead of children()) without direct locators. That's the reason i choose toContain() for now.

screenshot 2016-10-07 18 29 28

What do you think?

avatar zero-24
zero-24 - comment - 7 Oct 2016

Travis is failing here? But maybe it is a different issue?

avatar yvesh
yvesh - comment - 7 Oct 2016

@zero-24 okay reboot fixed this. Travis js tests are now also green.

avatar zero-24 zero-24 - change - 7 Oct 2016
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-10-07 19:24:22
Closed_By zero-24
avatar zero-24 zero-24 - close - 7 Oct 2016
avatar zero-24 zero-24 - merge - 7 Oct 2016
avatar zero-24
zero-24 - comment - 7 Oct 2016

Thanks!

Add a Comment

Login with GitHub to post a comment