forked from verdnatura/salix-front
test: fix VnSearchbar
This commit is contained in:
parent
54962fbb56
commit
924d921b70
|
@ -1,7 +1,6 @@
|
|||
/// <reference types="cypress" />
|
||||
describe('VnSearchBar', () => {
|
||||
const employeeId = ' #1';
|
||||
const salesPersonId = ' #18';
|
||||
const idGap = '.q-item > .q-item__label';
|
||||
const vnTableRow = '.q-virtual-scroll__content';
|
||||
beforeEach(() => {
|
||||
|
@ -12,11 +11,10 @@ describe('VnSearchBar', () => {
|
|||
|
||||
it('should redirect to account summary page', () => {
|
||||
searchAndCheck('1', employeeId);
|
||||
searchAndCheck('salesPerson', salesPersonId);
|
||||
searchAndCheck('employee', employeeId);
|
||||
});
|
||||
|
||||
it('should stay on the list page if there are several results or none', () => {
|
||||
cy.typeSearchbar('salesA{enter}');
|
||||
cy.typeSearchbar('salesA{enter}');
|
||||
checkTableLength(2);
|
||||
|
||||
|
@ -29,7 +27,6 @@ describe('VnSearchBar', () => {
|
|||
const searchAndCheck = (searchTerm, expectedText) => {
|
||||
cy.clearSearchbar();
|
||||
cy.typeSearchbar(`${searchTerm}{enter}`);
|
||||
cy.typeSearchbar(`${searchTerm}{enter}`);
|
||||
cy.get(idGap).should('have.text', expectedText);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue