Problem/Motivation

The current dev branch fails a number of previously defined tests. This blocks all automated testing of patches submitted for any issue with this module. Having these tests running successfully is an important requirement for using this module in a client project. Without these tests showing green, I won't be able to use this module and the site architecture for the client project will be oh-so-unelegant-and-denormalised.

Proposed resolution

I'm going to try to file an issue forlist each failing test below, link those issues back to this testing meta-issue, and hopefully get through restoring that green status on this dev branch without too much effort.

One, two, three: go!

Remaining tasks

The following are all the test assertions that currently fail when the entire suite of tests for Multifield is executed:

  • Enumerate all the failing tests here and relate this issue to each distinct failing tests' issue.
  • Link Add multifield does not exist on /admin/structure/multifield in MultifieldAdministrationTestCase.test on line 24
  • Failed to set field label to Test label in MultifieldAdministrationTestCase.test on line 30
  • Failed to set field machine_name to cpwfkj7sazqfrucjmez6figflxq5bz2gi2tscef0rintbdxuykmm3eoeev3f9yrc3o2nn5wle6o6xdzold9avzmhiu7b5fpa62vjc9yuzu5diu0xhg8y9gsrh8d1b6jeo in MultifieldAdministrationTestCase.test on line 30
  • Found the Save button in MultifieldAdministrationTestCase.test on line 30
  • Found the requested form fields at in MultifieldAdministrationTestCase.test on line 30
  • "Machine name cannot be longer than 128 characters but is currently 129 characters long." found in MultifieldAdministrationTestCase.test on line 31
  • Failed to set field label to Test label in MultifieldAdministrationTestCase.test on line 34
  • Failed to set field machine_name to jansho7tur6qqgslw7vv1p4unult0wpzydszo79tx32kct9ahzz7gnbvujhgqphxeb8szctpbfmc1otrltaqvezniuuexadfniz9kuzy2wyuqdsw9ldlt7wkrousqwu6 in MultifieldAdministrationTestCase.test on line 34
  • Found the Save button in MultifieldAdministrationTestCase.test on line 34
  • Found the requested form fields at in MultifieldAdministrationTestCase.test on line 34
  • Remove or modify assertions to track correct behaviour since the previously-deprecated "Add multifield" page (e.g. with the path "admin/structure/multifield/add") is now entirely removed from the menu router with an "access callback" = FALSE.

None!

Please review the patch in #2464813-5: Current 7.x-1.x dev branch fails some tests

CommentFileSizeAuthor
#5 multifield-fix-tests-2464813-5.patch1.75 KBJamesAn
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JamesAn’s picture

Issue summary: View changes
JamesAn’s picture

Issue summary: View changes
JamesAn’s picture

Issue summary: View changes

I decided to list each failed assertion here instead its own issue. I thought it'd be more appreciated if I didn't proliferate a bunch of issues just for this one thing. I might break out to a separate issue if fixing a failing assertion turns out to be more involved like requiring API or architectural changes/fixes. I'm hoping I can just bang out each fix in a small patch and move on.

JamesAn’s picture

Issue summary: View changes

This is much less work than I expected. All the failing tests pass when I re-instantiate the 'Add multifield' menu router item (with the path 'admin/structure/multifield/add') by changing its access logic to what I think was originally there -- one, remove 'access callback' altogether so it uses the default user_access() function; and two, add 'access arguments' with a value of array('administer multifield').

Since it seems that we're moving away from the workflow using this was-deprecated-now-obsolete page, I'll try to figure out how to still test what these assertions were essentially trying to confirm if those things are still relevant given that this page is no longer available.

JamesAn’s picture

Okay, looks like all the failing assertions are also obsolete now as they all check things only related to that obsolete "Add multifield" page. There is a commented out class definition stub to test the new admin UI using the 'Multifield' field type. But that's another issue.

For this, I'm submitting a patch to remove the obsolete assertions as well as deleting the lines defining the obsolete menu router item as that obsoletion happened almost 9 months ago according to git blame.

The only use that MultifieldAdministrationTestCase has now is to confirm that the multifield page (i.e. admin/structure/multifield) returns the correct empty text when no instances of Multifield exists. I'd argue this test should be merge in with that MultifieldTestCase class definition stub, but that's also for another issue to resolve when MultifieldTestCase is specified and functional.

JamesAn’s picture

Issue summary: View changes

Just tidying up the issue text to reflect the proposed resolution.

JamesAn’s picture

Status: Active » Needs review

And flipping the state to be reviewed.

Dave Reid’s picture

Status: Needs review » Fixed

I just committed an updated version of the test, instead of just removing the code.

Status: Fixed » Needs work

The last submitted patch, 5: multifield-fix-tests-2464813-5.patch, failed testing.

Dave Reid’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.