Skip to content

Commit

Permalink
fix(DateInput): remove unnecessary focus half-border (#3221)
Browse files Browse the repository at this point in the history
  • Loading branch information
HelenaIsh committed Jul 26, 2023
1 parent 0f8417d commit 4613c66
Show file tree
Hide file tree
Showing 27 changed files with 49 additions and 17 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ WithNoValue.parameters = {
},
};

export const WithError = () => (
export const WithError: Story = () => (
<Gapped vertical>
<Gapped>
<DateInput value="01.01.2020" error /> Error
Expand All @@ -445,6 +445,23 @@ export const WithError = () => (
</Gapped>
);

WithError.parameters = {
creevey: {
tests: {
async focused() {
const plain = await this.takeScreenshot();
const DateInputPlaceholder = this.browser.findElement({ css: '[data-tid~="DateFragmentsView__placeholder"]' });

await this.browser.actions({ bridge: true }).click(DateInputPlaceholder).perform();
await delay(1000);
const focused = await this.takeScreenshot();

await this.expect([plain, focused]).to.matchImages();
},
},
},
};

export const ShouldSetFocusOnPlaceholderClick: Story = () => {
return <DateInput />;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/react-ui/components/Input/Input.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const styles = memoizeStyle({
focus(t: Theme) {
return css`
background-color: ${t.inputFocusedBg};
border-color: ${t.inputBorderColorFocus} !important;
border-color: ${t.inputBorderColorFocus};
box-shadow: ${t.inputFocusShadow};
outline: none;
z-index: 2;
Expand Down

0 comments on commit 4613c66

Please sign in to comment.