Hmm, I was going to say no, but then I realized that we actually will need to test it - reason being we'll want to make sure that adding required fields with a fixed number of options affects the add to cart form. I figure it's worth baking that functionality into our DrupalCommerceWebTestCase and at least asserting that the fields are showing up on the product add / edit forms. Then the Cart module's tests will need to assert that the fields are being used as "Attribute" selectors on the add to cart form.
When i'm doing the following assertion to verify that the list of the products is okay:
$this->drupalGet('admin/commerce/products');
The response code is a 403, i settled the right permissions and i don't know why i got this code. I saw that the url admin/commerce/products was defined in a view but the Products view only define the following path: admin/commerce/products/list.
Hmm, not sure. Views appearing in tabs is still voodoo to me... I don't really know how it handles them, I just managed to find the right combination of options that made the IA work for me. Does the assertion work if you use the /list URL?
Yes that's what i tried instead and now... when i'm doing a get assertion on admin/commerce/products/list i'm always getting a 404...
Views issue ? :)
I'll see with Damz tomorrow.
Also, you might chat with auzigog in the #drupalcommerce channel. He's been doing some testing work as well, and I'd hate for you guys to accidentally write the same stuff. His repository is http://github.com/auzigog/drupalcommerce.
Oh I'm glad someone already started an issue around this! I though I was just caught in simpletest hell (well... I kind of am).
I happened to be attempting to trying $this->drupalGet('admin/commerce/products'); myself and encountering the same problem! Same goes for admin/commerce/products/list.
admin/commerce/products redirects me to /store but still has the products tabs along the top. This page used to give me an access denied error until I threw 5 different clear_cache_all() calls throughout the test.
admin/commerce/products/list gives me 404 not found.
It drove me crazy all day today when I was trying to verify if a product creation function was acting properly.
Artusamak, hit me up in IRC tomorrow. I'll be there all day (starting around 8am PST).
Comments
Comment #1
artusamakIs it necessary to add fields to a product type for the CRUD testing?
Comment #2
rszrama commentedHmm, I was going to say no, but then I realized that we actually will need to test it - reason being we'll want to make sure that adding required fields with a fixed number of options affects the add to cart form. I figure it's worth baking that functionality into our DrupalCommerceWebTestCase and at least asserting that the fields are showing up on the product add / edit forms. Then the Cart module's tests will need to assert that the fields are being used as "Attribute" selectors on the add to cart form.
Comment #3
artusamakWhen i'm doing the following assertion to verify that the list of the products is okay:
The response code is a 403, i settled the right permissions and i don't know why i got this code. I saw that the url admin/commerce/products was defined in a view but the Products view only define the following path: admin/commerce/products/list.
Isn't something wrong? :)
Thanks.
Comment #4
rszrama commentedHmm, not sure. Views appearing in tabs is still voodoo to me... I don't really know how it handles them, I just managed to find the right combination of options that made the IA work for me. Does the assertion work if you use the /list URL?
Comment #5
artusamakYes that's what i tried instead and now... when i'm doing a get assertion on admin/commerce/products/list i'm always getting a 404...
Views issue ? :)
I'll see with Damz tomorrow.
Comment #6
rszrama commentedWhen in doubt, blame DamZ. : D
Also, you might chat with auzigog in the #drupalcommerce channel. He's been doing some testing work as well, and I'd hate for you guys to accidentally write the same stuff. His repository is http://github.com/auzigog/drupalcommerce.
Comment #7
Anonymous (not verified) commentedOh I'm glad someone already started an issue around this! I though I was just caught in simpletest hell (well... I kind of am).
I happened to be attempting to trying
$this->drupalGet('admin/commerce/products');myself and encountering the same problem! Same goes foradmin/commerce/products/list.admin/commerce/products redirects me to /store but still has the products tabs along the top. This page used to give me an access denied error until I threw 5 different clear_cache_all() calls throughout the test.
admin/commerce/products/list gives me 404 not found.
It drove me crazy all day today when I was trying to verify if a product creation function was acting properly.
Artusamak, hit me up in IRC tomorrow. I'll be there all day (starting around 8am PST).
Comment #8
pcambraComment #9
pcambrahttps://github.com/pcambra/drupalcommerce/commit/a9ef09365ba585f2b89e71c...
Comment #10
rszrama commentedYou are THE MAN. Thanks, Pedro... committed. ; )