[MM-58326] Remove aria-disabled for disabled tooltip in calls button following WithTooltip integration (#27094)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f4a3a2ec07
Коммит
f0601b67e8
@@ -223,12 +223,5 @@
|
|||||||
row-gap: 4px;
|
row-gap: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
button#startCallButton {
|
|
||||||
&.icon-btn-disabled {
|
|
||||||
cursor: not-allowed;
|
|
||||||
opacity: 0.65;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ describe('components/ProfilePopover', () => {
|
|||||||
|
|
||||||
renderWithPluginReducers(<ProfilePopover {...props}/>, initialState);
|
renderWithPluginReducers(<ProfilePopover {...props}/>, initialState);
|
||||||
const button = (await screen.findByLabelText('Call with user is ongoing')).closest('button');
|
const button = (await screen.findByLabelText('Call with user is ongoing')).closest('button');
|
||||||
expect(button?.getAttribute('aria-disabled')).toBe('true');
|
expect(button).toBeDisabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should not show the start call button when callsChannelState.enabled is false', async () => {
|
test('should not show the start call button when callsChannelState.enabled is false', async () => {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
import classNames from 'classnames';
|
|
||||||
import React, {useCallback, useEffect, useState} from 'react';
|
import React, {useCallback, useEffect, useState} from 'react';
|
||||||
import {useIntl} from 'react-intl';
|
import {useIntl} from 'react-intl';
|
||||||
import {useSelector} from 'react-redux';
|
import {useSelector} from 'react-redux';
|
||||||
@@ -95,7 +94,6 @@ const CallButton = ({
|
|||||||
id: 'webapp.mattermost.feature.start_call',
|
id: 'webapp.mattermost.feature.start_call',
|
||||||
defaultMessage: 'Start Call',
|
defaultMessage: 'Start Call',
|
||||||
});
|
});
|
||||||
const iconButtonClassName = classNames('btn btn-icon btn-sm style--none', {'icon-btn-disabled': disabled});
|
|
||||||
const callButton = (
|
const callButton = (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='startCallTooltip'
|
id='startCallTooltip'
|
||||||
@@ -105,8 +103,8 @@ const CallButton = ({
|
|||||||
<button
|
<button
|
||||||
id='startCallButton'
|
id='startCallButton'
|
||||||
type='button'
|
type='button'
|
||||||
aria-disabled={disabled}
|
disabled={disabled}
|
||||||
className={iconButtonClassName}
|
className='btn btn-icon btn-sm style--none'
|
||||||
aria-label={startCallMessage}
|
aria-label={startCallMessage}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user