Add chat embed automated browser tests. Closes #2743
This commit is contained in:
parent
1f99b0bf22
commit
5b8bacb83f
@ -5,4 +5,12 @@ describe(`Offline readwrite chat embed`, () => {
|
|||||||
it('Can visit the page', () => {
|
it('Can visit the page', () => {
|
||||||
cy.visit('http://localhost:8080/embed/chat/readwrite');
|
cy.visit('http://localhost:8080/embed/chat/readwrite');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Header should be visible', () => {
|
||||||
|
cy.get('header').should('be.visible');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Chat should be visible', () => {
|
||||||
|
cy.get('#chat-container').should('be.visible');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -3,10 +3,10 @@ setup();
|
|||||||
|
|
||||||
describe(`Offline read-only chat embed`, () => {
|
describe(`Offline read-only chat embed`, () => {
|
||||||
it('Can visit the page', () => {
|
it('Can visit the page', () => {
|
||||||
cy.visit('http://localhost:8080/embed/chat/readwrite');
|
cy.visit('http://localhost:8080/embed/chat/readonly');
|
||||||
});
|
});
|
||||||
|
|
||||||
// it('Chat should be visible', () => {
|
it('Chat should be visible', () => {
|
||||||
// cy.get('#chat-container').should('be.visible');
|
cy.get('#chat-container').should('be.visible');
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
|
@ -6,27 +6,27 @@ describe(`Online readwrite chat embed`, () => {
|
|||||||
cy.visit('http://localhost:8080/embed/chat/readwrite');
|
cy.visit('http://localhost:8080/embed/chat/readwrite');
|
||||||
});
|
});
|
||||||
|
|
||||||
// it('Chat should be visible', () => {
|
it('Header should be visible', () => {
|
||||||
// cy.get('#chat-container').should('be.visible');
|
cy.get('header').should('be.visible');
|
||||||
// });
|
});
|
||||||
|
|
||||||
// it('User menu should be visible', () => {
|
it('User menu should be visible', () => {
|
||||||
// cy.get('#user-menu').should('be.visible');
|
cy.get('#user-menu').should('be.visible');
|
||||||
// });
|
});
|
||||||
|
|
||||||
// it('Chat join message should exist', () => {
|
it('Chat join message should exist', () => {
|
||||||
// cy.contains('joined the chat').should('be.visible');
|
cy.contains('joined the chat').should('be.visible');
|
||||||
// });
|
});
|
||||||
|
|
||||||
// it('User menu should be visible', () => {
|
it('Click on user menu', () => {
|
||||||
// cy.get('#user-menu').should('be.visible');
|
cy.get('#user-menu').click();
|
||||||
// });
|
});
|
||||||
|
|
||||||
// it('Click on user menu', () => {
|
it('Show change name modal', () => {
|
||||||
// cy.get('#user-menu').click();
|
cy.contains('Change name').click();
|
||||||
// });
|
});
|
||||||
|
|
||||||
// it('Show change name modal', () => {
|
it('Close name change modal', () => {
|
||||||
// cy.contains('Change name').click();
|
cy.get('.ant-modal-close-x').click();
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
|
@ -3,10 +3,10 @@ setup();
|
|||||||
|
|
||||||
describe(`Online read-only chat embed`, () => {
|
describe(`Online read-only chat embed`, () => {
|
||||||
it('Can visit the page', () => {
|
it('Can visit the page', () => {
|
||||||
cy.visit('http://localhost:8080/embed/chat/readwrite');
|
cy.visit('http://localhost:8080/embed/chat/readonly');
|
||||||
});
|
});
|
||||||
|
|
||||||
// it('Chat should be visible', () => {
|
it('Chat should be visible', () => {
|
||||||
// cy.get('#chat-container').should('be.visible');
|
cy.get('#chat-container').should('be.visible');
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
|
@ -33,14 +33,16 @@ export default function ReadWriteChatEmbed() {
|
|||||||
<ClientConfigStore />
|
<ClientConfigStore />
|
||||||
<Header name={headerText} chatAvailable chatDisabled={chatDisabled} online={videoAvailable} />
|
<Header name={headerText} chatAvailable chatDisabled={chatDisabled} online={videoAvailable} />
|
||||||
{currentUser && (
|
{currentUser && (
|
||||||
<ChatContainer
|
<div id="chat-container">
|
||||||
messages={messages}
|
<ChatContainer
|
||||||
usernameToHighlight={currentUser.displayName}
|
messages={messages}
|
||||||
chatUserId={currentUser.id}
|
usernameToHighlight={currentUser.displayName}
|
||||||
isModerator={currentUser.isModerator}
|
chatUserId={currentUser.id}
|
||||||
showInput
|
isModerator={currentUser.isModerator}
|
||||||
height="80vh"
|
showInput
|
||||||
/>
|
height="80vh"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user