|
@@ -33,15 +33,19 @@ export function validateTableSearch(
|
|
value?: string,
|
|
value?: string,
|
|
options?: {btnTestId?: string},
|
|
options?: {btnTestId?: string},
|
|
) {
|
|
) {
|
|
- cy.getTestId(tableName).siblings('.ant-pagination').find('li[title="2"]').click();
|
|
|
|
|
|
+ cy.getTestId(tableName).siblings('.ant-pagination').find('li[title="2"]')
|
|
|
|
+ .click();
|
|
const {btnTestId} = options ?? {};
|
|
const {btnTestId} = options ?? {};
|
|
|
|
|
|
return function(text?: string) {
|
|
return function(text?: string) {
|
|
cy.getTestId(btnTestId ?? 'search_btn').click();
|
|
cy.getTestId(btnTestId ?? 'search_btn').click();
|
|
|
|
+ cy.getTestId(btnTestId ?? 'search_btn').should('have.class', 'ant-btn-loading');
|
|
|
|
|
|
cy.getTestId(tableName).find('table').find('.ant-table-tbody')
|
|
cy.getTestId(tableName).find('table').find('.ant-table-tbody')
|
|
.children('.ant-table-row').first().find('td').first()
|
|
.children('.ant-table-row').first().find('td').first()
|
|
.should('include.text', text ?? value);
|
|
.should('include.text', text ?? value);
|
|
|
|
+ cy.getTestId(btnTestId ?? 'search_btn')
|
|
|
|
+ .should('not.have.class', 'ant-btn-loading');
|
|
|
|
|
|
cy.getTestId(tableName).siblings('.ant-pagination').find('li[title="1"]')
|
|
cy.getTestId(tableName).siblings('.ant-pagination').find('li[title="1"]')
|
|
.should('have.class', 'ant-pagination-item-active');
|
|
.should('have.class', 'ant-pagination-item-active');
|