fix tslint issues with spectron includes

pull/1287/head
Audric Ackermann 5 years ago
parent e2612147b6
commit 592c31dfc0
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -423,7 +423,7 @@ export class ConversationHeader extends React.Component<Props> {
public highlightMessageSearch() {
// This is a temporary fix. In future we want to search
// messages in the current conversation
$('.session-search-input input').focus();
($('.session-search-input input') as any).focus();
}
// tslint:disable-next-line: cyclomatic-complexity

@ -39,7 +39,7 @@ export class SessionSeedModal extends React.Component<Props, State> {
}
public componentDidMount() {
setTimeout(() => $('#seed-input-password').focus(), 100);
setTimeout(() => ($('#seed-input-password') as any).focus(), 100);
}
public render() {
@ -145,7 +145,7 @@ export class SessionSeedModal extends React.Component<Props, State> {
private confirmPassword() {
const passwordHash = this.state.passwordHash;
const passwordValue = $('#seed-input-password').val();
const passwordValue = ($('#seed-input-password') as any).val();
const isPasswordValid = window.passwordUtil.matchesHash(
passwordValue,
passwordHash

@ -80,7 +80,7 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
}
public componentDidMount() {
setTimeout(() => $('#password-lock-input').focus(), 100);
setTimeout(() => ($('#password-lock-input') as any).focus(), 100);
window.Whisper.events.on('refreshLinkedDeviceList', async () => {
setTimeout(() => {
@ -198,7 +198,7 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
}
public async validatePasswordLock() {
const enteredPassword = String($('#password-lock-input').val());
const enteredPassword = String(($('#password-lock-input') as any).val());
if (!enteredPassword) {
this.setState({
@ -264,7 +264,7 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
}
public setOptionsSetting(settingID: string) {
const selectedValue = $(`#${settingID} .session-radio input:checked`).val();
const selectedValue = ($(`#${settingID} .session-radio input:checked`) as any).val();
window.setSettingValue(settingID, selectedValue);
}
@ -668,7 +668,7 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
}
private async onKeyUp(event: any) {
const lockPasswordFocussed = $('#password-lock-input').is(':focus');
const lockPasswordFocussed = ($('#password-lock-input') as any).is(':focus');
if (event.key === 'Enter' && lockPasswordFocussed) {
await this.validatePasswordLock();

@ -30,7 +30,7 @@ export class SettingsHeader extends React.Component<Props, any> {
}
public focusSearch() {
$('.left-pane-setting-section .session-search-input input').focus();
($('.left-pane-setting-section .session-search-input input') as any).focus();
}
public showAddLinkedDeviceModal() {

Loading…
Cancel
Save