diff --git a/test/automated/browser/tests/chat.js b/test/automated/browser/tests/chat.js index b5065b870..51208bdfa 100644 --- a/test/automated/browser/tests/chat.js +++ b/test/automated/browser/tests/chat.js @@ -16,35 +16,6 @@ async function interactiveChatTest( expect(isDisabled).not.toBe('true'); }); - it('should have the username label', async () => { - await page.waitForSelector('#username-display'); - }); - - it('should allow changing the username on ' + device, async () => { - await page.waitForSelector('#username-display'); - await page.evaluate(() => - document.querySelector('#username-display').click() - ); - await page.waitForSelector('#username-change-input'); - await page.evaluate(() => - document.querySelector('#username-change-input').click() - ); - await page.evaluate(() => - document.querySelector('#username-change-input').click() - ); - - await page.type('#username-change-input', newName); - - await page.waitForSelector('#button-update-username'); - - await page.evaluate(() => - document.querySelector('#button-update-username').click() - ); - - // page.keyboard.press('Enter'); - await page.waitForTimeout(3000); - }); - it('should allow typing a chat message', async () => { await page.waitForSelector('#message-input'); await page.evaluate(() => document.querySelector('#message-input').click()); diff --git a/webroot/js/app.js b/webroot/js/app.js index 70ce3ff44..992c5e478 100644 --- a/webroot/js/app.js +++ b/webroot/js/app.js @@ -9,8 +9,8 @@ import SocialIconsList from './components/platform-logos-list.js'; import UsernameForm from './components/chat/username.js'; import VideoPoster from './components/video-poster.js'; import Followers from './components/federation/followers.js'; - import Chat from './components/chat/chat.js'; +import { ChatMenu } from './components/chat/chat-menu.js' import Websocket, { CALLBACKS, SOCKET_MESSAGE_TYPES, @@ -941,36 +941,22 @@ export default class App extends Component { >${streamOnline && streamTitle ? streamTitle : name} -
- <${UsernameForm} - username=${username} - isModerator=${isModerator} - onUsernameChange=${this.handleUsernameChange} - onFocus=${this.handleFormFocus} - onBlur=${this.handleFormBlur} - /> - + > --> + <${ChatMenu} username=${username} isModerator=${false} onUsernameChange=${this.handleUsernameChange} onFocus=${this.handleFormFocus} onBlur=${this.handleFormBlur} chatDisabled=${chatDisabled} noVideoContent=${noVideoContent} handleChatPanelToggle=${this.handleChatPanelToggle}> + +