-
Notifications
You must be signed in to change notification settings - Fork 174
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
MWPW-125482 Overriding text flow direction via metatag #777
Changes from all commits
3c4ec90
f569487
05b7963
0c185d4
afabef2
0071210
846c014
90b4bf2
8c58acb
df6b1dc
62c62a1
f1b7279
04f292f
7599435
6edbc06
9fc5f72
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 |
---|---|---|
|
@@ -229,8 +229,8 @@ describe('Utils', () => { | |
config.locales = { | ||
'': { ietf: 'en-US', tk: 'hah7vzn.css' }, | ||
africa: { ietf: 'en', tk: 'pps7abe.css' }, | ||
il_he: { ietf: 'he', tk: 'nwq1mna.css' }, | ||
mena_ar: { ietf: 'ar', tk: 'dis2dpj.css' }, | ||
il_he: { ietf: 'he', tk: 'nwq1mna.css', dir: 'rtl' }, | ||
mena_ar: { ietf: 'ar', tk: 'dis2dpj.css', dir: 'rtl' }, | ||
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. make sure your tests cover both 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.
@narcis-radu Yes.. 'ltr' tests are already added in the Unit test scripts and are executing successfully. 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. Let's add tests for 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. still need rtl test 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. @chrischrischris The rtl and ltr test are already there in the Unit tests.. we have added the dir property for the same in that config . 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. You are correct! But I think one existing test would fail, maybe you can check - https://github.com/adobecom/milo/blob/main/test/utils/utils.test.js#L258 setConfigWithPath('/ua/solutions');
expect(document.documentElement.getAttribute('dir')).null; Based on what you set - 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. @narcis-radu The test was completing successfully because it was only checking that, if the dir attribute setting fails, it should not throw error and the value should be null. |
||
ua: { tk: 'aaz7dvd.css' }, | ||
}; | ||
}); | ||
|
@@ -255,7 +255,7 @@ describe('Utils', () => { | |
|
||
it('Gracefully dies when locale ietf is missing and dir is not set.', () => { | ||
setConfigWithPath('/ua/solutions'); | ||
expect(document.documentElement.getAttribute('dir')).null; | ||
expect(document.documentElement.getAttribute('dir')).to.equal('ltr'); | ||
}); | ||
}); | ||
|
||
|
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.
Consumers will have to be notified about this change, they need to implement the
dir
property in their configThere 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.
@narcis-radu Yes.. We will share a notification with the teams on milo-community slack channel before merge.
Please suggest if we need to share the communication on some additional channels.