-
Notifications
You must be signed in to change notification settings - Fork 17
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
Use formatted name for worldwide organisations #3029
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,8 @@ class WorldwideCorporateInformationPageTest < ActionDispatch::IntegrationTest | |
setup_and_visit_content_item("worldwide_corporate_information_page") | ||
|
||
assert_has_component_organisation_logo | ||
assert page.has_link? "British Embassy Manila", href: "/world/organisations/british-embassy-manila" | ||
assert_has_component_title("British Embassy\nManila") | ||
assert page.has_link? "British EmbassyManila", href: "/world/organisations/british-embassy-manila" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shame this doesn't also work with the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed. There seems to be some inconsistency in the way these matchers work. |
||
end | ||
|
||
test "includes the world locations and sponsoring organisations" do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ def schema_name | |
|
||
presented = create_presenter(WorldwideCorporateInformationPagePresenter, content_item: with_non_default_crest) | ||
|
||
expected = { name: "British Embassy Manila", url: "/world/organisations/british-embassy-manila", crest: "dbt", brand: "foreign-commonwealth-development-office" } | ||
expected = { name: "British Embassy<br/>Manila", url: "/world/organisations/british-embassy-manila", crest: "dbt", brand: "foreign-commonwealth-development-office" } | ||
assert_equal expected, presented.organisation_logo | ||
end | ||
|
||
|
@@ -32,7 +32,7 @@ def schema_name | |
|
||
presented = create_presenter(WorldwideCorporateInformationPagePresenter, content_item: with_empty_logo) | ||
|
||
expected = { name: "British Embassy Manila", url: "/world/organisations/british-embassy-manila", crest: "single-identity", brand: "single-identity" } | ||
expected = { name: "British Embassy<br/>Manila", url: "/world/organisations/british-embassy-manila", crest: "single-identity", brand: "single-identity" } | ||
assert_equal expected, presented.organisation_logo | ||
end | ||
|
||
|
@@ -42,7 +42,7 @@ def schema_name | |
|
||
presented = create_presenter(WorldwideCorporateInformationPagePresenter, content_item: without_sponsoring_organisations) | ||
|
||
expected = { name: "British Embassy Manila", url: "/world/organisations/british-embassy-manila", crest: "single-identity", brand: "single-identity" } | ||
expected = { name: "British Embassy<br/>Manila", url: "/world/organisations/british-embassy-manila", crest: "single-identity", brand: "single-identity" } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand where this <br/> is coming from. I can see the title in the schema example... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It comes from the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh different field! OK gottit! |
||
assert_equal expected, presented.organisation_logo | ||
end | ||
|
||
|
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.
I don't understand why this works with a
\n
and not a<br>
😕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.
I think that's because we're matching on
text
here, rather than the raw HTML, so the line break has already been parsed.