Shun Miyazawa 2 лет назад
Родитель
Сommit
537cdc9242

+ 2 - 4
apps/app/test/cypress/e2e/20-basic-features/20-basic-features--username-mention.cy.ts

@@ -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');