Closed (fixed)
Project:
Ubercart Addresses
Version:
6.x-2.x-dev
Component:
Automated tests
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2011 at 15:39 UTC
Updated:
24 Feb 2013 at 13:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
megachrizAutomated tests for the API, the address book, checkout and order administration are committed.
The following automated tests were added:
Tests for the address book: view, edit and delete addresses.
Tests for the address book: view, edit and delete addresses.
Tests for the address book: view, edit and delete addresses.
Tests for the address book: view, edit and delete addresses.
Tests for the address book: view, edit and delete addresses.
Tests for the address book: view, edit and delete addresses.
Tests for the address book: view, edit and delete addresses.
Tests for the address book: view, edit and delete addresses.
Tests for the address book: view, edit and delete addresses.
Ensures the cart and checkout process is functioning when Ubercart Addresses is enabled.
Ensure that orders function properly when Ubercart Addresses is enabled.
Ensure that the API behaves as expected.
Test registration with address information.
Reviews are welcome.
Comment #2
megachrizI will work on the automated tests for the 7.x-1.x version.
Comment #3
megachrizThe automated tests for the 7.x-1.x version are updated.
See commit.
Reviews are still welcome.
Comment #4
megachrizSome automated tests are not executed by the drupal.org testbot. That's because not all dependency projects are loaded (like the rules module). I'll try to fix that by adding a dummy module that lists all dependencies that are needed for the tests.
Comment #5
megachrizAll tests are now executed by the testbot.
In Ubercart 7.x-3.1 some of the automated tests were adjusted, causing a failure when executing the checkout test of Ubercart Addresses. This is fixed with the following commit:
http://drupalcode.org/project/uc_addresses.git/commit/c819aad
Comment #6
megachrizI adjusted the checkout tests of both 6.x-2.x and 7.x-1.x to keep consistent with the checkout test in Ubercart. The checkout test in Ubercart now returns an order object instead of an order id. See for example this change in Ubercart.
Commits:
Comment #7
megachrizI have made the methods getEditAddressValues() and generateAddressFieldValue() from UcAddressesTestCase class public static methods, so they can be accessed within other tests that don't extend UcAddressesTestCase. This a requirement for the tests I'm working on for #1735678: Autofill doesn't work, cause these tests are implemented in a test case class that extend UbercartTestHelper instead of UcAddressesTestCase.
Commits:
Comment #8
megachrizThe attached patch improves the uc_addresses_test module. Currently, this module defines two fields for Ubercart Addresses, but it didn't add alter the database so the values for these fields can be saved. I also moved the check for if the field should be in delivery/billing pane to a new field handler in the method checkContext(). This is not also cleaner, but it makes it easier to use uc_addresses_test in more automated tests. Currently, the test module is not compatible with all tests.
Let's see if the changes don't break any tests.
Comment #9
megachriz#8 committed.
Moving to 6.x-2.x.
Comment #10
megachrizThis patch backports the test module to 6.x-2.x. However, the module isn't used in any tests yet. But these could be added later in other issues when needed.
Comment #11
megachrizThe test module couldn't be installed properly, so I added an automated test just to test that. Since that test "requires" the Views module, it's quite possible it's ignored by the testbot. If that's the case, then I will adjust the patch to strip out the requirement for Views, though it will added back in when I do the commit.
Comment #12
megachrizOkay, now without the Views requirement.
Comment #13
megachrizCommitted #11.
I'm closing this issue now. Eventually further improvements for the automated tests should be handled in new issues.