Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enterprises into system #8340

Merged

Conversation

filipefurtad0
Copy link
Contributor

What? Why?

Relates to #8103

Updates and moves features/admin/enterprises files into system/admin/enterprises

What should we test?

Green build.

Release notes

Updates and moves features/admin/enterprises files into system/admin/enterprises

Changelog Category: Technical changes

@filipefurtad0 filipefurtad0 force-pushed the enterprises_into_system branch 2 times, most recently from 3a34b37 to 9b600f5 Compare October 13, 2021 10:28
@filipefurtad0
Copy link
Contributor Author

filipefurtad0 commented Oct 13, 2021

No idea what's happening here :-/ all these specs pass locally, after these these changes 🤯

@mkllnk
Copy link
Member

mkllnk commented Oct 18, 2021

Seems order dependent. I'm currently running this:

rspec --seed 0 --bisect spec/system/admin/customers_spec.rb spec/system/admin/enterprises/business_address_form_spec.rb spec/system/admin/enterprises/index_spec.rb

@mkllnk
Copy link
Member

mkllnk commented Oct 19, 2021

Bisect didn't really help much but I found a minimal failing combination manually:

rspec \
./spec/system/admin/customers_spec.rb[1:1:1:1] \
./spec/system/admin/enterprises/business_address_form_spec.rb[1:1:1:1] \
./spec/system/admin/enterprises/index_spec.rb[1:1:1]

They are all needed. And then we get this:
failures_r_spec_example_groups_enterprises_index_as_an_admin_user_listing_enterprises_683

Somehow the user session may not be reset properly? I'm trying to figure that out.

@mkllnk
Copy link
Member

mkllnk commented Oct 19, 2021

I found it! business_address_form_spec still required the spec_helper instead of the system_helper. So if you first loaded a spec with the system helper, then the spec_helper, then specs after that would fail.

@filipefurtad0
Copy link
Contributor Author

filipefurtad0 commented Oct 19, 2021

Thank you for your work on this @mkllnk, I seem to have missed that file.

I ran the bisect command you've posted but got no results whatsoever (it just ran endlessly). This was probably caused by loading the wrong helpers as well.

@filipefurtad0 filipefurtad0 requested a review from jibees October 19, 2021 11:07
@filipefurtad0 filipefurtad0 force-pushed the enterprises_into_system branch from d3c83ec to 6639ce4 Compare October 19, 2021 14:35
@filipefurtad0
Copy link
Contributor Author

Ohh f..! 💥

I seem to have removed @mkllnk 's commit accidentally... Sorry, about that Maikel... Learning in progress... I guess that's what git reset --hard does 🤣 I've re-set now the correct helper on business_address_form_spec.rb
Again, sorry 🙌

Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@jibees jibees merged commit 8852fe1 into openfoodfoundation:master Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants