mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 17:31:36 -06:00
Merge pull request #2058 from NguyenTranHoangSym/SDA-4440
SDA-4440: Restore size for non line break words
This commit is contained in:
commit
881f596778
@ -53,7 +53,7 @@ exports[`about app should render correctly 1`] = `
|
|||||||
title="Close"
|
title="Close"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="AboutApp-button-save-restart-text"
|
className=""
|
||||||
>
|
>
|
||||||
Close
|
Close
|
||||||
</span>
|
</span>
|
||||||
|
@ -156,4 +156,32 @@ describe('about app', () => {
|
|||||||
podInput.simulate('mousedown');
|
podInput.simulate('mousedown');
|
||||||
expect(wrapper.find(`[data-testid="POD_INFO"]`).exists()).toEqual(true);
|
expect(wrapper.find(`[data-testid="POD_INFO"]`).exists()).toEqual(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should shrink text if its save and close', () => {
|
||||||
|
const cloneAboutDataMock = {
|
||||||
|
...aboutDataMockState,
|
||||||
|
finalConfig: { url: 'bcd.symphony.com' },
|
||||||
|
};
|
||||||
|
|
||||||
|
cloneAboutDataMock.globalConfig = { isPodUrlEditable: true };
|
||||||
|
cloneAboutDataMock.userConfig = { isPodUrlEditable: false };
|
||||||
|
|
||||||
|
const wrapper = shallow(React.createElement(AboutApp));
|
||||||
|
ipcRenderer.send('about-app-data', cloneAboutDataMock);
|
||||||
|
const pod = wrapper.find(`[data-testid="POD_INFO"]`);
|
||||||
|
pod.simulate('click', { detail: 1 });
|
||||||
|
pod.simulate('click', { detail: 2 });
|
||||||
|
pod.simulate('click', { detail: 3 });
|
||||||
|
|
||||||
|
const inputPod = wrapper.find(`[data-testid="POD_INFO_INPUT"]`);
|
||||||
|
inputPod.simulate('keydown', {
|
||||||
|
target: { value: 'pod.symphony.com' },
|
||||||
|
keyCode: 13,
|
||||||
|
});
|
||||||
|
expect(
|
||||||
|
wrapper
|
||||||
|
.find(`[data-testid="CLOSE_BUTTON"] span`)
|
||||||
|
.hasClass('AboutApp-button-save-restart-text'),
|
||||||
|
).toBe(true);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -220,7 +220,11 @@ export default class AboutApp extends React.Component<{}, IState> {
|
|||||||
ref={this.closeButtonRef}
|
ref={this.closeButtonRef}
|
||||||
disabled={!isValidHostname}
|
disabled={!isValidHostname}
|
||||||
>
|
>
|
||||||
<span className='AboutApp-button-save-restart-text'>
|
<span
|
||||||
|
className={classNames({
|
||||||
|
'AboutApp-button-save-restart-text': isHostNamechanged,
|
||||||
|
})}
|
||||||
|
>
|
||||||
{closeButtonText}
|
{closeButtonText}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
@ -410,6 +414,7 @@ export default class AboutApp extends React.Component<{}, IState> {
|
|||||||
<strong className={'AboutApp-pod'}>{item.key}</strong>
|
<strong className={'AboutApp-pod'}>{item.key}</strong>
|
||||||
{isPodEditing ? (
|
{isPodEditing ? (
|
||||||
<input
|
<input
|
||||||
|
data-testid={'POD_INFO_INPUT'}
|
||||||
className={'AboutApp-pod-input'}
|
className={'AboutApp-pod-input'}
|
||||||
type='text'
|
type='text'
|
||||||
value={updatedHostname}
|
value={updatedHostname}
|
||||||
|
Loading…
Reference in New Issue
Block a user