Closed dacook closed 4 days ago
What about create_specs
instead of new_specs
? "new" is a bit ambiguous
What about
create_specs
instead ofnew_specs
? "new" is a bit ambiguous
I think @dacook used the Rails convention here where new
represents form fields that are filled to create
an object in DB by using the data that was filled.
That's why in context of the above,new_specs
maybe sounds better here as we will be writing specs that will be taking data in the form to create
product records. 😅
I agree "new" is more ambiguous, because it could also be describing the new products screen vs the old.
For "system" (feature) specs, the focus should be the user's point of view, not necessarily describing the code. The screen it tests is called "New product" (in default locale), so "new" makes sense, but I suppose the goal is to "create" a product. At the end of the day, we just want to avoid ambiguity, so I think "create" is a good idea, but I don't care that much :)
Hi @filipefurtad0 - When it's ready for me to take on the work, please let me know. If you think you should complete all, then no worries. I'll unassign myself in that case. Thanks 🙂
Hi @chahmedejaz , I've merged existing PRs that touch the products_v3 specs, so you may proceed with the rest of this issue now.
Update: PR is ready for review now :)
What we should change and why (this is tech debt)
As development of this new screen continues, the one big file is becoming unwieldy, so we would like to split it up. Suggested split:
products_v3/index_specs.rb
(sorting, pagination and search). Or "view" or "filtering" perhaps.products_v3/update_specs.rb
(updating, edit image)products_v3/actions_specs.rb
(edit, clone, delete). Note these are just testing any behaviour occurring on the bulk edit screenNote that the folder
products_v3
would be renamed to simplyproducts
after the old products screen is removed.Note that this doesn't include other products specs, like the New Product and Edit Product screens. They may also be re-organised.
spec/system/admin/products_spec.rb
tospec/system/admin/products/
. I'm not sure of a good name, but maybe we can split up intonew_specs
andedit_specs
Dependencies