Skip to content

Commit

Permalink
10007: try waitUntilSettled when searching
Browse files Browse the repository at this point in the history
  • Loading branch information
TomElliottFlexion committed Jan 24, 2024
1 parent ab0eef3 commit 166d1a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ export const navigateTo = () => {
cy.visit('/');
};

export const clickOnSearchTab = tabName => {
export const clickOnSearchTab = (tabName: string) => {
cy.get(`button#tab-${tabName}`).click();
};

export const searchForCaseByDocketNumber = docketNumber => {
export const searchForCaseByDocketNumber = (docketNumber: string) => {
cy.get('input#docket-number').type(docketNumber);
cy.get('button#docket-search-button').click();
};
Expand All @@ -22,23 +22,23 @@ export const getPetitionerNameInput = () => {
return cy.get('[data-testid="petitioner-name"]');
};

export const enterCaseTitleOrPetitionerName = name => {
export const enterCaseTitleOrPetitionerName = (name: string) => {
cy.get('input#title-or-name').type(name);
};

export const getCaseTitleOrPetitionerNameInput = () => {
return cy.get('input#title-or-name');
};

export const enterDocumentKeywordForAdvancedSearch = keyword => {
export const enterDocumentKeywordForAdvancedSearch = (keyword: string) => {
cy.get('input#keyword-search').type(keyword);
};

export const getKeywordInput = () => {
return cy.get('input#keyword-search');
};

export const enterDocumentDocketNumber = docketNumber => {
export const enterDocumentDocketNumber = (docketNumber: string) => {
cy.waitUntilSettled();
cy.get('input#docket-number').type(docketNumber);
};
Expand Down Expand Up @@ -81,7 +81,7 @@ export const docketRecordTable = () => {
return cy.get('table#docket-record-table');
};

export const searchForOrderByJudge = judge => {
export const searchForOrderByJudge = (judge: string) => {
return cy.get('#order-judge').select(judge);
};

Expand Down
1 change: 1 addition & 0 deletions cypress/helpers/search-by-docket-number-in-header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ export function searchByDocketNumberInHeader(docketNumber: string) {
cy.get('[data-testid="docket-number-search-input"]').clear();
cy.get('[data-testid="docket-number-search-input"]').type(docketNumber);
cy.get('[data-testid="search-docket-number"]').click();
cy.waitUntilSettled();
cy.get('[data-testid="case-detail-menu-button"]').should('exist');
}

0 comments on commit 166d1a3

Please sign in to comment.