Skip to content

Commit

Permalink
Merge branch 'master' into fix-input-clear
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Tassinari <olivier.tassinari@gmail.com>
  • Loading branch information
oliviertassinari committed Aug 16, 2024
2 parents 2ca5729 + 0cb2044 commit acdd710
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/data/date-pickers/localization/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"languageTag": "zh-HK",
"importName": "zhHK",
"localeName": "Chinese (Hong Kong)",
"missingKeysCount": 1,
"missingKeysCount": 0,
"totalKeysCount": 50,
"githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-date-pickers/src/locales/zhHK.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/src/locales/zhHK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const zhHKPickers: Partial<PickersLocaleText<any>> = {
value !== null && utils.isValid(value)
? `選擇時間,已選擇${utils.format(value, 'fullTime')}`
: '選擇時間',
// fieldClearLabel: 'Clear',
fieldClearLabel: '清除',

// Table labels
timeTableLabel: '選擇時間',
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ async function initializeEnvironment(

const monthSection = page.getByRole('spinbutton', { name: 'Month' });
await monthSection.press('2');
await page.getByRole('button', { name: 'Clear value' }).click();
await page.getByRole('button', { name: 'Clear' }).click();

expect(await page.evaluate(() => document.activeElement?.textContent)).to.equal('MM');
});
Expand All @@ -720,7 +720,7 @@ async function initializeEnvironment(
// locator.fill('2') does not work reliably for this case in all browsers
await textbox.focus();
await textbox.press('2');
await page.getByRole('button', { name: 'Clear value' }).click();
await page.getByRole('button', { name: 'Clear' }).click();

// firefox does not support document.getSelection().toString() on input elements
if (browserType.name() === 'firefox') {
Expand Down

0 comments on commit acdd710

Please sign in to comment.