|
1 | 1 | import { ROUTES } from 'shared/constants'; |
2 | | -import { Module, SubModule } from 'shared/models'; |
| 2 | +import { Module, SubModule } from 'shared/types'; |
3 | 3 | import { |
4 | 4 | clearInputField, |
5 | 5 | getLinearLoader, |
@@ -229,28 +229,31 @@ describe('Employee Catalog Tests', () => { |
229 | 229 | getTestSelectorByModule(Module.employeeManagement, SubModule.employeeCatalog, 'table-body-row', true).should('have.length', 1); |
230 | 230 |
|
231 | 231 | interceptFetchEmployeesRequest( |
232 | | - { pageNumber: 1, pageSize: 10, search: 'Joe' }, |
| 232 | + { pageNumber: 1, pageSize: 10, search: 'Anthonyy' }, |
233 | 233 | { alias: 'fetchSearchedNoEmployeesRequest', fixture: 'employee/employees-empty' } |
234 | 234 | ); |
235 | 235 |
|
236 | | - search(Module.employeeManagement, SubModule.employeeCatalog, 'search-employees', 'Joe'); |
| 236 | + search(Module.employeeManagement, SubModule.employeeCatalog, 'search-employees', 'y'); |
237 | 237 |
|
238 | 238 | getLinearLoader(Module.employeeManagement, SubModule.employeeCatalog, 'table').should('exist'); |
239 | 239 |
|
240 | | - cy.wait('@fetchSearchedNoEmployeesRequest').its('request.url').should('include', 'Employees?pageNumber=1&pageSize=10&search=Joe'); |
| 240 | + cy.wait('@fetchSearchedNoEmployeesRequest') |
| 241 | + .its('request.url') |
| 242 | + .should('include', 'Employees?pageNumber=1&pageSize=10&search=Anthonyy'); |
241 | 243 | getTestSelectorByModule(Module.employeeManagement, SubModule.employeeCatalog, 'table-body-row', true).should('have.length', 0); |
242 | 244 | getTestSelectorByModule(Module.employeeManagement, SubModule.employeeCatalog, 'page-subtitle') |
243 | 245 | .should('exist') |
244 | 246 | .and('have.text', 'No Employees Found'); |
245 | 247 |
|
246 | 248 | interceptFetchEmployeesRequest( |
247 | 249 | { pageNumber: 1, pageSize: 10, search: '' }, |
248 | | - { alias: 'fetchMultipleEmployeesRequest', fixture: 'employee/employees-multiple' } |
| 250 | + { alias: 'fetchMultipleEmployeesClearedRequest', fixture: 'employee/employees-multiple' } |
249 | 251 | ); |
250 | 252 |
|
251 | 253 | clearInputField(Module.employeeManagement, SubModule.employeeCatalog, 'search-employees'); |
252 | 254 |
|
253 | | - cy.wait('@fetchMultipleEmployeesRequest').its('request.url').should('include', 'Employees?pageNumber=1&pageSize=10'); |
| 255 | + getLinearLoader(Module.employeeManagement, SubModule.employeeCatalog, 'table').should('exist'); |
| 256 | + cy.wait('@fetchMultipleEmployeesClearedRequest').its('request.url').should('include', 'Employees?pageNumber=1&pageSize=10'); |
254 | 257 | getTestSelectorByModule(Module.employeeManagement, SubModule.employeeCatalog, 'table-body-row', true).should('have.length', 3); |
255 | 258 | }); |
256 | 259 |
|
|
0 commit comments