Closed (fixed)
Project:
Views (for Drupal 7)
Version:
8.x-3.x-dev
Component:
tests
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Sep 2012 at 08:42 UTC
Updated:
4 Jan 2014 at 02:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehner$handler doesn't exist in this local scope ... you probably mean $view
just some whitespace
Even there is a 80 chars limit for the first sentence, it's not that important for me, because it describes detailed what the function does.
$handler doesn't exist in this local scope ... you probably mean $view
Comment #2
damiankloip commentedThanks @dawehner, I have made those changes. I don't expect this to pass, but we might as well get an idea of where we are.
Comment #3
damiankloip commentedOh god, sorry. --cached is usually good for added files.
Comment #5
aspilicious commentedSome of these files have that weird
core: '8' VS core: { } and human_name: '' VS human_name: { }mixup.
Why does views have so many api versions!
Comment #6
damiankloip commentedHmm, all of these were exported directly from the instantiated classes the the original exports provide. We need to look at that one, because I think they all started life as '8' when I started this patch?
Comment #7
tim.plunkettThe human_name: {} and tag: {} are causing most of these failures.
Also, views.view.test_view_fieldapi.yml doesn't exist?
So, we have tests/views_test/config and tests/default_views now? Why not just use the first one?
Comment #8
damiankloip commentedI think you are right, we're also dependent on #1772146: Clean up properties on View object (and add default values), as that will get rid of these bogus arrays when exporting anyway.
The new folder was something me and dawehner discussed, then we can lose the dependency on the views_test module, unless we keep everything in that folder and load them basically as they are now?
Comment #9
dawehnerWe have two seperate use cases for now. First: Use the views in the UI, second: use the views in API.
If we put all into the config directory basically all tests would require the views_test module to be enabled (you worked so hard to get rid of it if possible).
If we put everything into the default_views folder, we cannot any longer directly use that in the ui, though one thing what we could do
is to load and save the view and then start to edit the view.
Comment #10
tim.plunkettIt's weird seeing them not in a /config folder.
Another possibility is having an empty test module like 'views_test_config' only to contain these, that can be enabled in the usual way with
public static $modules, and rename views_test to views_test_data.Comment #11
dawehnerOh i like the suggestion of tim. What about doing views_test_views instead of views_test_data?
Comment #12
tim.plunkettOkay, going to work on this.
Comment #13
tim.plunkettOkay, here's an attempt to fix this all up.
I was able to really clean up createViewFromConfig() now that views_test_config is a real module.
Comment #15
tim.plunkettAnd the interdiff.
Comment #16
tim.plunkettDuh!
Comment #18
tim.plunkettOh wow. Fun with stupid bugs!
Comment #20
tim.plunkettThis was a bug in the original patch.
Comment #21
tim.plunkettComment #23
tim.plunkettFixed more failures.
Comment #25
tim.plunkettEven more.
Comment #27
tim.plunkettMore fixes.
Comment #29
tim.plunkettLess fails.
Comment #31
tim.plunkett3 more fixes
Comment #33
tim.plunkettAlright, I've had enough :)
Someone else will have to finish off those failures.
Comment #34
dawehnerSome of the tests could be fixed by adding ->cloneView() but sadly i don't really understand why this helps in most cases.
For the translatable text for example unpackOptions might have changed the values already so unpackTranslatables might have a different result.
Please don't trust the interdiff that much, as it contains git-crap.
Comment #35
tim.plunkettI think I understand why cloneView is necessary, but it's not optimal. I opened #1773778: Standardize on using $this->view in setUp(), $this->view->destroy in tearDown() as a follow-up.
Here's a different take on #34, with an interdiff against #31.
Comment #37
tim.plunkettShit, those failures are in HEAD.
http://qa.drupal.org/pifr/test/273938
Comment #38
tim.plunkettHopefully the last patch.
Comment #41
tim.plunkettFamous last words.
Comment #43
tim.plunkettComment #45
tim.plunkettFixed those locally
Comment #46
tim.plunkettFinal tweaks. If this passes, please commit!
Comment #47
tim.plunkett#1774278: Update views_test_data schema and variables is the follow-up for the schema
Comment #49
tim.plunkettRemoved the offending changes.
Comment #50
tim.plunkettComment #52
tim.plunkettTracked down the last bug.
Because both @damiankloip and I put in substantial time into this issue, I have a feature branch I'd like to merge in. I'll do that once it's RTBC by one of the VDC team.
Comment #53
dawehnerAwesome!
Comment #54
tim.plunkettMerged in! Whew, what a day.
Comment #55
damiankloip commentedThis makes me happy :) Great work!