Skip to content

Commit 6936a94

Browse files
committed
update: Enhance types
1 parent af3ccb8 commit 6936a94

160 files changed

Lines changed: 215 additions & 206 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cypress/e2e/Auth.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ROUTES } from 'shared/constants';
2-
import { Module, SubModule } from 'shared/models';
2+
import { Module, SubModule } from 'shared/types';
33
import { getTestSelectorByModule } from 'support/helpers';
44
import {
55
interceptFetchClientFailedRequest,

cypress/e2e/Branch/BranchCatalog.cy.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ROUTES } from 'shared/constants';
2-
import { Module, SubModule } from 'shared/models';
2+
import { Module, SubModule } from 'shared/types';
33
import {
44
clearInputField,
55
clickActionButton,
@@ -183,27 +183,28 @@ describe('Branch Catalog Tests', () => {
183183
getTestSelectorByModule(Module.branchManagement, SubModule.branchCatalog, 'table-body-row', true).should('have.length', 1);
184184

185185
interceptFetchBranchesRequest(
186-
{ pageNumber: 1, pageSize: 10, search: 'Old' },
186+
{ pageNumber: 1, pageSize: 10, search: 'Neww' },
187187
{ alias: 'fetchSearchedNoBranchesRequest', fixture: 'branch/branches-empty' }
188188
);
189189

190-
search(Module.branchManagement, SubModule.branchCatalog, 'search-branches', 'Old');
190+
search(Module.branchManagement, SubModule.branchCatalog, 'search-branches', 'w');
191191

192192
getLinearLoader(Module.branchManagement, SubModule.branchCatalog, 'table').should('exist');
193-
cy.wait('@fetchSearchedNoBranchesRequest').its('request.url').should('include', 'Branches?pageNumber=1&pageSize=10&search=Old');
193+
cy.wait('@fetchSearchedNoBranchesRequest').its('request.url').should('include', 'Branches?pageNumber=1&pageSize=10&search=Neww');
194194
getTestSelectorByModule(Module.branchManagement, SubModule.branchCatalog, 'table-body-row', true).should('have.length', 0);
195195
getTestSelectorByModule(Module.branchManagement, SubModule.branchCatalog, 'page-subtitle')
196196
.should('exist')
197197
.and('have.text', 'No Branches Found');
198198

199199
interceptFetchBranchesRequest(
200200
{ pageNumber: 1, pageSize: 10, search: '' },
201-
{ alias: 'fetchMultipleBranchesRequest', fixture: 'branch/branches-multiple' }
201+
{ alias: 'fetchMultipleBranchesClearedRequest', fixture: 'branch/branches-multiple' }
202202
);
203203

204204
clearInputField(Module.branchManagement, SubModule.branchCatalog, 'search-branches');
205205

206-
cy.wait('@fetchMultipleBranchesRequest').its('request.url').should('include', 'Branches?pageNumber=1&pageSize=10');
206+
getLinearLoader(Module.branchManagement, SubModule.branchCatalog, 'table').should('exist');
207+
cy.wait('@fetchMultipleBranchesClearedRequest').its('request.url').should('include', 'Branches?pageNumber=1&pageSize=10');
207208
getTestSelectorByModule(Module.branchManagement, SubModule.branchCatalog, 'table-body-row', true).should('have.length', 2);
208209
});
209210

cypress/e2e/Branch/BranchManagement.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ROUTES } from 'shared/constants';
2-
import { Module, SubModule } from 'shared/models';
2+
import { Module, SubModule } from 'shared/types';
33
import {
44
clearBranchDetailsForm,
55
fillBranchDetailsForm,

cypress/e2e/Branch/BranchView.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ROUTES } from 'shared/constants';
2-
import { Module, SubModule } from 'shared/models';
2+
import { Module, SubModule } from 'shared/types';
33
import { getLinearLoader, getTestSelectorByModule, selectAction, verifyInputFields, verifyTextFields } from 'support/helpers';
44
import {
55
interceptEditBranchRequest,

cypress/e2e/Company/CompanyManagement.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ROUTES } from 'shared/constants';
2-
import { Module, SubModule } from 'shared/models';
2+
import { Module, SubModule } from 'shared/types';
33
import {
44
clearInputField,
55
clickActionButton,

cypress/e2e/Company/CompanySettings.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { COMPANY_SETTINGS_KEY, ROUTES } from 'shared/constants';
2-
import { Module, SubModule } from 'shared/models';
2+
import { Module, SubModule } from 'shared/types';
33
import {
44
clickActionButton,
55
clickFlowsIcon,

cypress/e2e/Department/DepartmentCatalog.cy.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ROUTES } from 'shared/constants';
2-
import { Module, SubModule } from 'shared/models';
2+
import { Module, SubModule } from 'shared/types';
33
import {
44
clearInputField,
55
clickActionButton,
@@ -242,16 +242,16 @@ describe('Department Catalog Tests', () => {
242242
);
243243

244244
interceptFetchDepartmentsRequest(
245-
{ pageNumber: 1, pageSize: 10, search: 'Sound' },
245+
{ pageNumber: 1, pageSize: 10, search: 'Productions' },
246246
{ alias: 'fetchSearchedNoDepartmentsRequest', fixture: 'department/departments-empty' }
247247
);
248248

249-
search(Module.departmentManagement, SubModule.departmentCatalog, 'search-departments', 'Sound');
249+
search(Module.departmentManagement, SubModule.departmentCatalog, 'search-departments', 's');
250250

251251
getLinearLoader(Module.departmentManagement, SubModule.departmentCatalog, 'table').should('exist');
252252
cy.wait('@fetchSearchedNoDepartmentsRequest')
253253
.its('request.url')
254-
.should('include', 'Departments?pageNumber=1&pageSize=10&search=Sound');
254+
.should('include', 'Departments?pageNumber=1&pageSize=10&search=Productions');
255255
getTestSelectorByModule(Module.departmentManagement, SubModule.departmentCatalog, 'table-body-row', true).should(
256256
'have.length',
257257
0
@@ -262,12 +262,13 @@ describe('Department Catalog Tests', () => {
262262

263263
interceptFetchDepartmentsRequest(
264264
{ pageNumber: 1, pageSize: 10, search: '' },
265-
{ alias: 'fetchMultipleDepartmentsRequest', fixture: 'department/departments' }
265+
{ alias: 'fetchMultipleDepartmentsClearedRequest', fixture: 'department/departments' }
266266
);
267267

268268
clearInputField(Module.departmentManagement, SubModule.departmentCatalog, 'search-departments');
269269

270-
cy.wait('@fetchMultipleDepartmentsRequest').its('request.url').should('include', 'Departments?pageNumber=1&pageSize=10');
270+
getLinearLoader(Module.departmentManagement, SubModule.departmentCatalog, 'table').should('exist');
271+
cy.wait('@fetchMultipleDepartmentsClearedRequest').its('request.url').should('include', 'Departments?pageNumber=1&pageSize=10');
271272
getTestSelectorByModule(Module.departmentManagement, SubModule.departmentCatalog, 'table-body-row', true).should(
272273
'have.length',
273274
4

cypress/e2e/Department/DepartmentManagement.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ROUTES } from 'shared/constants';
2-
import { Module, SubModule } from 'shared/models';
2+
import { Module, SubModule } from 'shared/types';
33
import {
44
getLinearLoader,
55
getLoadingButtonLoadingIcon,

cypress/e2e/Department/DepartmentView.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ROUTES } from 'shared/constants';
2-
import { Module, SubModule } from 'shared/models';
2+
import { Module, SubModule } from 'shared/types';
33
import { getLinearLoader, getTestSelectorByModule, selectAction, verifyInputFields, verifyTextFields } from 'support/helpers';
44
import {
55
interceptFetchBranchesRequest,

cypress/e2e/Employee/EmployeeCatalog.cy.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ROUTES } from 'shared/constants';
2-
import { Module, SubModule } from 'shared/models';
2+
import { Module, SubModule } from 'shared/types';
33
import {
44
clearInputField,
55
getLinearLoader,
@@ -229,28 +229,31 @@ describe('Employee Catalog Tests', () => {
229229
getTestSelectorByModule(Module.employeeManagement, SubModule.employeeCatalog, 'table-body-row', true).should('have.length', 1);
230230

231231
interceptFetchEmployeesRequest(
232-
{ pageNumber: 1, pageSize: 10, search: 'Joe' },
232+
{ pageNumber: 1, pageSize: 10, search: 'Anthonyy' },
233233
{ alias: 'fetchSearchedNoEmployeesRequest', fixture: 'employee/employees-empty' }
234234
);
235235

236-
search(Module.employeeManagement, SubModule.employeeCatalog, 'search-employees', 'Joe');
236+
search(Module.employeeManagement, SubModule.employeeCatalog, 'search-employees', 'y');
237237

238238
getLinearLoader(Module.employeeManagement, SubModule.employeeCatalog, 'table').should('exist');
239239

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');
241243
getTestSelectorByModule(Module.employeeManagement, SubModule.employeeCatalog, 'table-body-row', true).should('have.length', 0);
242244
getTestSelectorByModule(Module.employeeManagement, SubModule.employeeCatalog, 'page-subtitle')
243245
.should('exist')
244246
.and('have.text', 'No Employees Found');
245247

246248
interceptFetchEmployeesRequest(
247249
{ pageNumber: 1, pageSize: 10, search: '' },
248-
{ alias: 'fetchMultipleEmployeesRequest', fixture: 'employee/employees-multiple' }
250+
{ alias: 'fetchMultipleEmployeesClearedRequest', fixture: 'employee/employees-multiple' }
249251
);
250252

251253
clearInputField(Module.employeeManagement, SubModule.employeeCatalog, 'search-employees');
252254

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');
254257
getTestSelectorByModule(Module.employeeManagement, SubModule.employeeCatalog, 'table-body-row', true).should('have.length', 3);
255258
});
256259

0 commit comments

Comments
 (0)