Fixed some E2E tests that broke on v5.2 (#2453)
* Fixing some E2E tests * Fixed a couple flaky ones * Fixed some issues on Windows
This commit is contained in:
@@ -77,12 +77,14 @@ type TabViewStatus = {
|
||||
}
|
||||
|
||||
class MainPage extends React.PureComponent<Props, State> {
|
||||
threeDotMenu: React.RefObject<HTMLButtonElement>;
|
||||
topBar: React.RefObject<HTMLDivElement>;
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
|
||||
this.topBar = React.createRef();
|
||||
this.threeDotMenu = React.createRef();
|
||||
|
||||
const firstServer = this.props.teams.find((team) => team.order === this.props.lastActiveTeam) || this.props.teams.find((team) => team.order === 0);
|
||||
let firstTab = firstServer?.tabs.find((tab) => tab.order === firstServer.lastActiveTab) || firstServer?.tabs.find((tab) => tab.order === 0);
|
||||
@@ -355,12 +357,14 @@ class MainPage extends React.PureComponent<Props, State> {
|
||||
}
|
||||
|
||||
focusThreeDotsButton = () => {
|
||||
this.threeDotMenu.current?.focus();
|
||||
this.setState({
|
||||
threeDotsIsFocused: true,
|
||||
});
|
||||
}
|
||||
|
||||
unFocusThreeDotsButton = () => {
|
||||
this.threeDotMenu.current?.blur();
|
||||
this.setState({
|
||||
threeDotsIsFocused: false,
|
||||
});
|
||||
@@ -487,6 +491,7 @@ class MainPage extends React.PureComponent<Props, State> {
|
||||
</div>
|
||||
)}
|
||||
<button
|
||||
ref={this.threeDotMenu}
|
||||
className='three-dot-menu'
|
||||
onClick={this.openMenu}
|
||||
onMouseOver={this.focusThreeDotsButton}
|
||||
|
Reference in New Issue
Block a user