Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Dec 2014 at 20:54 UTC
Updated:
26 Jan 2015 at 14:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
spadxiii commentedComment #2
dawehnerSorry, but every bug needs a test :(
Comment #3
spadxiii commentedHere's a small test for the combined columns.
Not sure if this is the correct way to write the test, but it's what I could come up with for now.
It's the first test I've ever written for views :)
Comment #4
dawehnerassertText()is not really a full test ... shouldn't we use some xpath select to check whether the result is really as expected?Comment #6
spadxiii commentedWhat kind of tests are you thinking of?
I think I noticed that the td-class is wrong as well. I'll have to double check that and extend the patch for that. If I remember correctly, the td-class is set to the field that's added to the column of the first field.
Comment #7
spadxiii commentedI also noticed that the attributes of the second column override those from the first column.
For example, the class of the first column is gone, and only the one from the second column is there.
`$column_reference['attributes']` was being reset every time, instead of checking if it already existed. I've added the check in the attached patch.
Only thing that remains, is extend the test.
Comment #8
dawehnerSpadXIII
Did my response in IRC helped you?
Comment #9
spadxiii commenteddawehner, I got called away so I didn't get around doing anything anymore then. I'll probably have some time later to fix some tests. I'll get back on irc then, to check if I understood it correctly.
Comment #10
spadxiii commentedExtended the tests quite a bit (removed the assertText completely).
The test data now adds the job field in 2 separate columns. In the test, it combines them into one. That way, some before/after tests can be done.
Comment #11
dawehnerAwesome that you changed it!
RTBC if it passes
Comment #13
dawehnerWe do have some test coverage now.
Comment #14
spadxiii commentedyep, and the tests fail for the correct reason! (and pass with the whole patch merged)
Comment #15
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 4a9c76a and pushed to 8.0.x. Thanks!