Part of meta issue #1926846: Extending gmap module *.tests. Catching test gaps.

not yet

Problem/Motivation

For creating simpletests for

we need helper module with all king of views variants which can be easy enabled in test. Thanks to @johnv for module. They are gmap_test and gmap_test_extended at gmap module root directory(hidden from administration modules as used only for testing)
This issue created for consolidating views exports that can be integrated into module afterwards and how-to`s initialize em for full gmap features working

Good to see here uploaded feature(in http://drupal.org/patch format) http://dgo.to/feature for Your config (node type + view) as starting point

  1. Upload Your working feature to /tests folder
  2. For those who familiar with simpletest tests - write tests for Your feature, extending /tests/gmap.test (or skip this if no)
  3. Create patch
  4. Upload patch into this issue with 'needs review' status
  5. Thanks!!!

We`ll commit it under Your credentials into repository

Proposed resolution

Extend commited tests
/gmap_test/tests/gmap_test.test
/gmap_test_extended/tests/gmap_test_extended.test
With Your specific checks and post patch here for review with status "needs review"

Remaining tasks

todo

Original report by @podarok

#1926846: Extending gmap module *.tests. Catching test gaps.

Follow up issues

#1938492: Undefined index: geofield
#1938634: Undefined index: iwq
#1938640: Undefined index: highlight_nodearg_color
#1938642: implode(): Invalid arguments passed

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

podarok’s picture

Assigned: Unassigned » johnv

@johnv can You help with this issue?
Possibly good to see here Your working views export with how-to reproduce it

podarok’s picture

Issue tags: +Needs tests

this tag is for me )

johnv’s picture

OK,
I can create a Feature , including a node type + views.

podarok’s picture

#3 yup, wohoo
This is very nice point for starting test implementation

podarok’s picture

Issue summary: View changes

Updated issue summary.

podarok’s picture

Issue summary: View changes

Updated issue summary.

podarok’s picture

Issue summary: View changes

Updated issue summary.

podarok’s picture

Issue summary: View changes

Updated issue summary.

podarok’s picture

Issue summary: View changes

added some points

podarok’s picture

any progress here?

johnv’s picture

Status: Active » Needs review
FileSize
41 KB

Please find a Feature attached. As a version number, it contains the date, so it is easy to see the latest version.
Please remove the .txt extension before unzipping.

it contains:
1. 2 Notetypes: Place and person. The person has an Entity reference to a Place. A place has a Geofield, Location, Addressfield, lat/lon fields.
2. a Views views with 6 displays: 3 for Places, 3 for persons, + its reference to places.

testscript:
1. create some Places, and in each node, enter the lat/lon manually in three different fields. (I did not use Geocoder, since it complicates the feature)
Place Latitude Longitude
Amsterdam 52.368500 4.891130
Brussels 50.852100 4.355490
Paris 48.623800 2.429370
Berlin 52.508200 13.374700
2. Create some Persons with reference to places;
3. go to /admin/structure/block , move the blocks from to ;
4. Go to /gmap-test-places, and see all views in one list.

First results:
- Geofield's 'all textfields' widget is not working (out of scope, )
- Show " 'location' of a referenced entity" is not working: there is no choice in the Plugin.
Todo:
- Extend with user reference/node reference instead of Entity reference. But those are almost legacy modules, already
- Extend with a node id as an argument.

podarok’s picture

wow, thanks a lot!!!

podarok’s picture

Assigned: johnv » podarok
Status: Needs review » Needs work

#6 commited as initial
working on test

podarok’s picture

Status: Needs work » Needs review
FileSize
4.11 KB

step 1

podarok’s picture

podarok’s picture

FileSize
11.19 KB

yet one step

podarok’s picture

FileSize
87.73 KB

another try

podarok’s picture

FileSize
87.82 KB

another try with reorganized files

podarok’s picture

FileSize
87.21 KB

should work now

podarok’s picture

another try

podarok’s picture

Status: Needs review » Needs work

status

podarok’s picture

Status: Needs work » Needs review

tag

podarok’s picture

yet one try

Status: Needs review » Needs work

The last submitted patch, 1934122-views-exports-for-tests-15.patch, failed testing.

podarok’s picture

http://qa.drupal.org/pifr/test/462678
commited to dev

thans @johnv for help

podarok’s picture

Issue summary: View changes

Updated issue summary.

podarok’s picture

#1938492: Undefined index: geofield follow-up due to new test coverage

podarok’s picture

Issue summary: View changes

Updated issue summary. Add follow-up

podarok’s picture

Issue summary: View changes

Updated issue summary.

podarok’s picture

Version: 7.x-2.x-dev » 7.x-2.5-alpha1
Status: Needs work » Needs review
FileSize
51.08 KB

These messages need follow-ups

    if ($message == 'Undefined index: location_settings') {
      // change error (Notice) to debug message
      return $this->assert('debug', $message, 'Debug', $caller);
    }
    // @todo create follow-up
    if ($message == 'Undefined index: iwq') {
      // change error (Notice) to debug message
      return $this->assert('debug', $message, 'Debug', $caller);
    }
    // @todo create follow-up
    if ($message == 'Undefined index: highlight_nodearg_color') {
      // change error (Notice) to debug message
      return $this->assert('debug', $message, 'Debug', $caller);
    }
    // @todo create follow-up
    if ($message == 'implode(): Invalid arguments passed') {
      // change error (Notice) to debug message
      return $this->assert('debug', $message, 'Debug', $caller);
    }

tests for gmapextended views plugin style
bot?

podarok’s picture

woops
#22 comes with #1938492: Undefined index: geofield patch
removed

podarok’s picture

Issue summary: View changes

up

podarok’s picture

Issue summary: View changes

Updated issue summary.

podarok’s picture

Title: Views exports for tests » Views exports for tests. Needs extending and follow-ups
Version: 7.x-2.5-alpha1 » 7.x-2.x-dev
Status: Needs review » Needs work

#23 commited pushed to 7.x-2.x-dev
tagged 7.x-2.5-alpha2 release

podarok’s picture

Issue summary: View changes

Updated issue summary.

podarok’s picture

podarok’s picture

Issue summary: View changes

gmapextended tests

podarok’s picture

Issue summary: View changes

Updated issue summary.

podarok’s picture

Issue summary: View changes

Updated issue summary.

podarok’s picture

podarok’s picture

Issue summary: View changes

Updated issue summary.

podarok’s picture

podarok’s picture

Title: Views exports for tests. Needs extending and follow-ups » Gmap Views tests. Needs extending and fixing follow-ups
Assigned: podarok » Unassigned

better title and this is now common task

johnv’s picture

@podarok,
although I see your test-submodules in the gmap directory, they do not appear in my 'modules' page, so I can't use them. Any tips? I'm on PHP5.2.

podarok’s picture

#29 test submodules hidden from modules page
They needed only for "Testing" module during testing process

All You need for runing tests

  • Enable Testing module (from drupal core)
  • Go to Testing module configuration page
  • Look for Gmap topic and select tests You need
  • Run tests and look at results if any
johnv’s picture

  • Enable Testing module (from drupal core) --> I did, OK
  • Go to Testing module configuration page --> /admin/config/development/testing 'Testing 2.x', OK
  • Look for Gmap topic and select tests You need--> I only see media, Simpletest.
  • Run tests and look at results if any
podarok’s picture

FileSize
169.14 KB

here is a screenshot

podarok’s picture

@johnv
here is a complete example for test only and patch with related fix #1938492: Undefined index: geofield

johnv’s picture

Yes, thanks, but problem is I do not see the tests at all..
Are there any modules that must be enabled before seeing them? (Testing, =OK, features =OK, ...)

podarok’s picture

gmap, Testing
thats all
At screenshot You can see url for the page grabbed from
its for Drupal 7!

For Drupal 6 - there are few issues described in README.txt from git http://drupalcode.org/project/simpletest.git/blob/1633bd8c2cdaad5e5cc443...

podarok’s picture

johnv’s picture

My bad. I downloaded the 7.x Simpletest module, instead of using the core Simpletest.

podarok’s picture

)))))
nobody perfect ))))))))))))))))))

podarok’s picture

Issue summary: View changes

fixes