mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-26 08:51:22 -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"
|
||||
>
|
||||
<span
|
||||
className="AboutApp-button-save-restart-text"
|
||||
className=""
|
||||
>
|
||||
Close
|
||||
</span>
|
||||
|
@ -156,4 +156,32 @@ describe('about app', () => {
|
||||
podInput.simulate('mousedown');
|
||||
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}
|
||||
disabled={!isValidHostname}
|
||||
>
|
||||
<span className='AboutApp-button-save-restart-text'>
|
||||
<span
|
||||
className={classNames({
|
||||
'AboutApp-button-save-restart-text': isHostNamechanged,
|
||||
})}
|
||||
>
|
||||
{closeButtonText}
|
||||
</span>
|
||||
</button>
|
||||
@ -410,6 +414,7 @@ export default class AboutApp extends React.Component<{}, IState> {
|
||||
<strong className={'AboutApp-pod'}>{item.key}</strong>
|
||||
{isPodEditing ? (
|
||||
<input
|
||||
data-testid={'POD_INFO_INPUT'}
|
||||
className={'AboutApp-pod-input'}
|
||||
type='text'
|
||||
value={updatedHostname}
|
||||
|
Loading…
Reference in New Issue
Block a user