Skip to content

Commit

Permalink
Merge branch 'develop' into feature/DEVSU-834-add-email-when-user-ass…
Browse files Browse the repository at this point in the history
…igned
  • Loading branch information
Nithriel authored Aug 25, 2023
2 parents 2773d52 + 62850e2 commit caf02a6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/models/reports/probeResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ module.exports = (sequelize, Sq) => {
comments: {
type: Sq.TEXT,
},
displayName: {
name: 'displayName',
field: 'display_name',
type: Sq.TEXT,
},
}, {
...DEFAULT_REPORT_OPTIONS,
tableName: 'reports_probe_results',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const TABLE = 'reports_probe_results';

module.exports = {
up: async (queryInterface, Sq) => {
return queryInterface.sequelize.transaction(async (transaction) => {
await queryInterface.addColumn(
TABLE,
'display_name',
{type: Sq.TEXT,
defaultValue: null},
{transaction},
);
});
},

down: async () => {
throw new Error('Not Implemented!');
},
};
5 changes: 4 additions & 1 deletion test/routes/report/probeResults.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ const PROBE_RESULT_DATA = {
variant: 'TEST VARIANT',
sample: 'TEST SAMPLE',
comments: 'TEST COMMENTS',
displayName: 'TEST DISPLAY NAME',
};

const PROBE_RESULT_UPDATE_DATA = {
variant: 'UPDATED VARIANT',
sample: 'UPDATED SAMPLE',
comments: 'UPDATED COMMENTS',
displayName: 'NEW DISPLAY NAME',
};

const probeResultProperties = [
'ident', 'createdAt', 'variant', 'sample', 'comments', 'gene',
'ident', 'createdAt', 'variant', 'sample', 'comments', 'gene', 'displayName',
];

const checkProbeResult = (probeResultObject) => {
Expand All @@ -37,6 +39,7 @@ const checkProbeResult = (probeResultObject) => {
geneId: expect.any(Number),
updatedBy: expect.any(Number),
deletedAt: expect.any(String),
displayName: expect.any(String),
}));
};

Expand Down

0 comments on commit caf02a6

Please sign in to comment.