Skip to content

Commit

Permalink
dep update - attempt to make smoke tests less flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Fu committed Jul 24, 2023
1 parent 23d7115 commit 40304f6
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions cypress/cypress-smoketests/support/pages/advanced-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,43 @@ export const goToOpinionSearch = () => {
};

export const searchByPetitionerName = petitionerName => {
cy.get('input#petitioner-name').clear().type(petitionerName);
cy.get('input#petitioner-name').clear();
cy.get('input#petitioner-name').type(petitionerName);
cy.get('button#advanced-search-button').click();
cy.get('table.search-results').should('exist');
};

export const searchByDocketNumber = docketNumber => {
cy.get('input#docket-number').clear().type(docketNumber);
cy.get('input#docket-number').clear();
cy.get('input#docket-number').type(docketNumber);
cy.get('button#docket-search-button').click();
cy.url().should('contain', docketNumber);
};

export const searchByPractitionerName = () => {
cy.get('input#practitioner-name').clear().type('test');
cy.get('input#practitioner-name').clear();
cy.get('input#practitioner-name').type('test');
cy.get('button#practitioner-search-by-name-button').click();
cy.get('table.search-results').should('exist');
};

export const searchByPractitionerbarNumber = barNumber => {
cy.get('input#bar-number').clear().type(barNumber);
cy.get('input#bar-number').clear();
cy.get('input#bar-number').type(barNumber);
cy.get('button.advanced-search__button').eq(1).click();
cy.url().should('contain', barNumber);
};

export const searchOrderByKeyword = keyword => {
cy.get('input#keyword-search').clear().type(keyword);
cy.get('input#keyword-search').clear();
cy.get('input#keyword-search').type(keyword);
cy.get('button#advanced-search-button').click();
cy.get('table.search-results').should('exist');
};

export const searchOpinionByKeyword = keyword => {
cy.get('input#keyword-search').clear().type(keyword);
cy.get('input#keyword-search').clear();
cy.get('input#keyword-search').type(keyword);
cy.get('button#advanced-search-button').click();
cy.get('table.search-results').should('exist');
};
Expand All @@ -62,7 +68,8 @@ export const createOpinion = () => {
cy.get('#menu-button-upload-pdf').click();
cy.get('#upload-description').type('A Smoketest Opinion');
cy.get('input#primary-document-file').attachFile('../fixtures/w3-dummy.pdf');
cy.get('#save-uploaded-pdf-button').scrollIntoView().click();
cy.get('#save-uploaded-pdf-button').scrollIntoView();
cy.get('#save-uploaded-pdf-button').click();
};

export const addDocketEntryAndServeOpinion = testData => {
Expand All @@ -74,7 +81,8 @@ export const addDocketEntryAndServeOpinion = testData => {
cy.get('#judge').select('Foley');

testData.documentDescription = faker.company.catchPhrase();
cy.get('#free-text').clear().type(testData.documentDescription);
cy.get('#free-text').clear();
cy.get('#free-text').type(testData.documentDescription);

cy.get('#serve-to-parties-btn').click();
cy.get('#modal-button-confirm').click();
Expand Down

0 comments on commit 40304f6

Please sign in to comment.