Skip to content

Commit

Permalink
unit + integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
absternator committed Jan 16, 2025
1 parent 5090d19 commit 858cc09
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/playwrightCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
playwright-tests:
timeout-minutes: 60
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
env:
STORAGE_PATH: ${{ github.workspace }}/storage/dbs
strategy:
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
if: ${{ !cancelled() }}
needs: [playwright-tests]

runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
1 change: 0 additions & 1 deletion app/client-v2/src/__tests__/App.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { createTestingPinia } from "@pinia/testing";
import { render, screen } from "@testing-library/vue";
import { defineComponent } from "vue";
import { createRouter, createWebHistory } from "vue-router";
import PrimeVue from "primevue/config";

const mockedThemeValues = {
setInitialTheme: vitest.fn(),
Expand Down
28 changes: 27 additions & 1 deletion app/client-v2/src/__tests__/stores/projectStore.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,33 @@ describe("projectStore", () => {
[MOCK_PROJECT_SAMPLES[0].hash]: MOCK_PROJECT_SAMPLES[0].sketch,
[MOCK_PROJECT_SAMPLES[1].hash]: MOCK_PROJECT_SAMPLES[1].sketch,
[MOCK_PROJECT_SAMPLES[2].hash]: MOCK_PROJECT_SAMPLES[2].sketch
}
},
amrForMetadataCsv: [
{
"Chloramphenicol Resistance": "Probably",
"Cotrim Resistance": "Probably not",
"Erythromycin Resistance": "Probably not",
ID: "sample1-test-hash",
"Penicillin Resistance": "Unlikely",
"Tetracycline Resistance": "Highly unlikely"
},
{
"Chloramphenicol Resistance": "Probably",
"Cotrim Resistance": "Almost certainly",
"Erythromycin Resistance": "Almost certainly",
ID: "sample2-test-hash",
"Penicillin Resistance": "Highly unlikely",
"Tetracycline Resistance": "Highly unlikely"
},
{
"Chloramphenicol Resistance": "Probably",
"Cotrim Resistance": "Unlikely",
"Erythromycin Resistance": "Probably not",
ID: "sample3-test-hash",
"Penicillin Resistance": "Probably",
"Tetracycline Resistance": "Highly unlikely"
}
]
});
});
it("should get download url & download when downloadZip is called", async () => {
Expand Down
10 changes: 5 additions & 5 deletions app/client-v2/src/__tests__/utils/projectCsvUtils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ describe("projectCsvUtils", () => {
const result = convertAmrForCsv(amr);

expect(result).toEqual({
Penicillin: "word",
Chloramphenicol: "word",
Erythromycin: "word",
Tetracycline: "word",
Cotrim: "word"
"Penicillin Resistance": "word",
"Chloramphenicol Resistance": "word",
"Erythromycin Resistance": "word",
"Tetracycline Resistance": "word",
"Cotrim Resistance": "word"
});
});
});
Expand Down
10 changes: 10 additions & 0 deletions app/server/tests/integration/testSample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13135,4 +13135,14 @@ export const testSample = (
},
},
names: { fd38a3bc7197390fd3734240a67fb515: "7622_5#78.fa" },
amrForMetadataCsv: [
{
ID: "fd38a3bc7197390fd3734240a67fb515",
"Penicillin Resistance": "Highly unlikely",
"Chloramphenicol Resistance": "Unsure",
"Erythromycin Resistance": "Highly unlikely",
"Tetracycline Resistance": "Almost certainly",
"Cotrim Resistance": "Highly likely",
},
],
});

0 comments on commit 858cc09

Please sign in to comment.