Skip to content

Commit 9724a72

Browse files
committed
fixes for updating column mappings for compressed files, getting cypress tests working again
1 parent eaa6c20 commit 9724a72

File tree

6 files changed

+16
-8
lines changed

6 files changed

+16
-8
lines changed

backend/scripts/test_data.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ set @delete_dataset_id = LAST_INSERT_ID();
2727
insert into role_permissions(permission_id, role_id) values (@approve_upload_id, @reviewer_role_id);
2828
insert into role_permissions(permission_id, role_id) values (@add_user_id, @reviewer_role_id);
2929
insert into role_permissions(permission_id, role_id) values (@delete_dataset_id, @reviewer_role_id);
30-
test_
30+
31+
3132
insert into user_roles(user_id, role_id) values (@uploader1_id, @uploader_role_id);
3233
insert into user_roles(user_id, role_id) values (@uploader2_id, @uploader_role_id);
3334
insert into user_roles(user_id, role_id) values (@reviewer_user_id, @reviewer_role_id);

cypress/e2e/hermes/hermes-upload-cases.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('Hermes Upload', {retries: 0}, () => {
3838
cy.get('#maf').type('1');
3939
cy.get('#otherFilters').type('My Filters');
4040

41-
cy.get('input[type="file"]').attachFile('sample-gwas-expanded.csv');
41+
cy.get('input[type="file"]').attachFile({ filePath: 'sample-gwas-expanded.csv.gz', encoding: 'binary'});
4242
cy.get('[data-cy="column-dropdown"]').eq(1).type('chromosome').type('{enter}');
4343
cy.get('[data-cy="column-dropdown"]').eq(2).type('position').type('{enter}');
4444
cy.get('[data-cy="column-dropdown"]').eq(3).type('alt').type('{enter}');

cypress/e2e/hermes/hermes-upload.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('Hermes Upload', {retries: 0}, () => {
3737
cy.get('#maf').type('1');
3838
cy.get('#otherFilters').type('My Filters');
3939

40-
cy.get('input[type="file"]').attachFile('sample-gwas-expanded.csv');
40+
cy.get('input[type="file"]').attachFile({ filePath: 'sample-gwas-expanded.csv.gz', encoding: 'binary'});
4141
cy.get('[data-cy="column-dropdown"]').eq(1).type('chromosome').type('{enter}');
4242
cy.get('[data-cy="column-dropdown"]').eq(2).type('position').type('{enter}');
4343
cy.get('[data-cy="column-dropdown"]').eq(3).type('alt').type('{enter}');

cypress/fixtures/sample-gwas-expanded.csv

Lines changed: 0 additions & 3 deletions
This file was deleted.
279 Bytes
Binary file not shown.

pages/hermes/index.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,14 @@ const getIcon = (status) => {
8282
}
8383
};
8484
85-
// flat array of possible phenotypes
8685
const uniquePhenotypes = computed(() => {
8786
return [...new Set(fileUploads.value.map(f => f.phenotype))];
8887
});
8988
89+
const uniqueAncestry = computed(() => {
90+
return [...new Set(fileUploads.value.map(f => f.ancestry))];
91+
});
92+
9093
// flat array of possible statuses
9194
const uniqueQCstatuses = computed(() => {
9295
return [...new Set(fileUploads.value.map(f => f.qc_status))];
@@ -101,6 +104,13 @@ const columns = ref([
101104
options: uniquePhenotypes,
102105
sortable: true
103106
},
107+
{
108+
header: "Ancestry",
109+
field: "ancestry",
110+
filterType: "multiSelect",
111+
options: uniqueAncestry,
112+
sortable: true
113+
},
104114
{
105115
header: "Dataset",
106116
field: "dataset_name",
@@ -235,7 +245,7 @@ const filters = ref(
235245
<DataTable v-model:filters="filters"
236246
filterDisplay="row"
237247
:value="fileUploads"
238-
tableStyle="min-width: 50rem"
248+
class="w-full"
239249
paginator
240250
:rows="20"
241251
:loading="tableLoading"

0 commit comments

Comments
 (0)