-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
Add an OFN UID column to the Users & Enterprises report #11041
Add an OFN UID column to the Users & Enterprises report #11041
Conversation
09964a9
to
3412786
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you!
describe "Users & Enterprises reports" do | ||
include AuthenticationHelper | ||
|
||
let!(:enterprise) { create(:supplier_enterprise) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are assuming that all future specs will use an enterprise. But maybe we also want to test what happens when the database is empty. I would have created this later in the it
block. But your version is good for now, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 fixed by a579333
end | ||
|
||
it "displays the report" do | ||
find("[type='submit']").click |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is brittle and will fail if we ever add any other form to the page. Other specs use click_button "Go"
. It also looks more like what the user does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, fixed by 41dead8
a579333
to
8ab077b
Compare
Hi @cillian, After staging your PR
Great work, thank you! 🎉 This one is ready to go! Merging! 🚀 |
What? Why?
export-ofn-uid-column.mp4
Here is what the extra column looks like in the .pdf version of the report....
Note,
SELECT enterprises.id AS ofn_uid, ...
is used instead of justSELECT enterprises.id, ...
. This is because if you do the latter, then the translation key inconfig/locales/en.yml
isreport_header_id
which is vague and not as clear asreport_header_ofn_uid
.What should we test?
See testing steps in #10545.
Release notes
Changelog Category: User facing changes