|
|
@@ -29,10 +29,9 @@ context('Mention username in comment', () => {
|
|
|
it('Successfully mention username in comment', () => {
|
|
|
const username = 'adm';
|
|
|
|
|
|
- cy.get('.comment').should('have.text', '');
|
|
|
-
|
|
|
cy.intercept('GET', `/_api/v3/users/usernames?q=${username}&limit=20`).as('searchUsername');
|
|
|
cy.get('.CodeMirror').type('@' + username);
|
|
|
+ cy.get('.comment').should('have.text', '@' + username);
|
|
|
cy.wait('@searchUsername');
|
|
|
cy.get('.CodeMirror-hints').should('be.visible');
|
|
|
|
|
|
@@ -45,10 +44,9 @@ context('Mention username in comment', () => {
|
|
|
it('Username not found when mention username in comment', () => {
|
|
|
const username = 'user';
|
|
|
|
|
|
- cy.get('.comment').should('have.text', '');
|
|
|
-
|
|
|
cy.intercept('GET', `/_api/v3/users/usernames?q=${username}&limit=20`).as('searchUsername');
|
|
|
cy.get('.CodeMirror').type('@' + username);
|
|
|
+ cy.get('.comment').should('have.text', '@' + username);
|
|
|
cy.wait('@searchUsername');
|
|
|
cy.get('.CodeMirror-hints').should('be.visible');
|
|
|
|