Skip to content

Commit

Permalink
Add missing demo use case queryNames (#2533)
Browse files Browse the repository at this point in the history
* I am convinced this is why tests are flaky

* Bump time limit

* Okay maybe it's just timeout

* CI parallelize

* Bump timeout again

* Bump workers

* Change some test params

* Update demo use case query names

---------

Co-authored-by: Rob Mitchell <[email protected]>
  • Loading branch information
bamader and robertandremitchell authored Sep 11, 2024
1 parent 37b19b0 commit 8926cf3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
7 changes: 3 additions & 4 deletions containers/tefca-viewer/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ export default defineConfig({
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
workers: process.env.CI ? 4 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: "html",
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
Expand Down Expand Up @@ -73,8 +72,8 @@ export default defineConfig({
webServer: {
command: "docker compose build --no-cache && docker compose up",
port: 3000,
timeout: 120 * 1000,
reuseExistingServer: true,
timeout: 300 * 1000,
reuseExistingServer: !process.env.CI,
},

/* Hook to ensure Docker is shut down after tests or on error */
Expand Down
10 changes: 5 additions & 5 deletions containers/tefca-viewer/src/app/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ export type USE_CASES = (typeof UseCases)[number];
export const UseCaseToQueryNameMap: {
[key in USE_CASES]: string;
} = {
"social-determinants": "",
"newborn-screening": "",
syphilis: "",
gonorrhea: "",
"social-determinants": "Social Determinants of Health",
"newborn-screening": "Newborn Screening",
syphilis: "Congenital syphilis (disorder)",
gonorrhea: "Gonorrhea (disorder)",
chlamydia: "Chlamydia trachomatis infection (disorder)",
cancer: "",
cancer: "Cancer (Leukemia)",
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,10 @@ const SearchForm: React.FC<SearchFormProps> = ({
<select
id="query"
name="query"
className="usa-select margin-top-1"
value={useCase}
className="usa-select margin-top-1"
defaultValue={useCase}
onChange={(event) => {
handleDemoQueryChange(event.target.value);
setUseCase(event.target.value as USE_CASES);
}}
>
{demoQueryOptions.map((option) => (
Expand Down Expand Up @@ -224,6 +223,7 @@ const SearchForm: React.FC<SearchFormProps> = ({
id="patient"
name="patient"
className="usa-select margin-top-1"
defaultValue=""
value={patientOption}
onChange={(event) => {
setPatientOption(event.target.value);
Expand Down

0 comments on commit 8926cf3

Please sign in to comment.