Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DCJ-702] Switch to datasetId everywhere #2690

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ const dar = {
'status': 'Open',
'createDate': 1669062648000,
'referenceId': 'dars-id-123',
'dataSetId': 13,
'datasetId': 13,
'votes': {
'8675': {
'voteId': 8675,
Expand Down Expand Up @@ -396,7 +396,7 @@ const dar = {
'status': 'Open',
'createDate': 1669062648000,
'referenceId': 'dars-id-123',
'dataSetId': 13,
'datasetId': 13,
'votes': {
'8688': {
'voteId': 8688,
Expand Down Expand Up @@ -456,7 +456,7 @@ const dar = {
},
'datasets': [
{
'dataSetId': 13,
'datasetId': 13,
'objectId': null,
'name': 'Sleep Apnea',
'datasetName': 'Sleep Apnea',
Expand All @@ -483,7 +483,7 @@ const dar = {
'properties': [
{
'propertyId': null,
'dataSetId': 13,
'datasetId': 13,
'propertyKey': null,
'propertyName': '# of participants',
'propertyValue': 17,
Expand All @@ -495,7 +495,7 @@ const dar = {
},
{
'propertyId': null,
'dataSetId': 13,
'datasetId': 13,
'propertyKey': null,
'propertyName': 'Dataset Name',
'propertyValue': 'Sleep Apnea',
Expand All @@ -507,7 +507,7 @@ const dar = {
},
{
'propertyId': null,
'dataSetId': 13,
'datasetId': 13,
'propertyKey': null,
'propertyName': 'Description',
'propertyValue': 'Single cell RNA-sequence',
Expand All @@ -519,7 +519,7 @@ const dar = {
},
{
'propertyId': null,
'dataSetId': 13,
'datasetId': 13,
'propertyKey': null,
'propertyName': 'Data Type',
'propertyValue': 'RNA-seq',
Expand All @@ -531,7 +531,7 @@ const dar = {
},
{
'propertyId': null,
'dataSetId': 13,
'datasetId': 13,
'propertyKey': null,
'propertyName': 'Data Depositor',
'propertyValue': '[email protected]',
Expand All @@ -543,7 +543,7 @@ const dar = {
},
{
'propertyId': null,
'dataSetId': 13,
'datasetId': 13,
'propertyKey': null,
'propertyName': 'Species',
'propertyValue': 'Human',
Expand All @@ -555,7 +555,7 @@ const dar = {
},
{
'propertyId': null,
'dataSetId': 13,
'datasetId': 13,
'propertyKey': null,
'propertyName': 'Phenotype/Indication',
'propertyValue': 'sleep apnea',
Expand All @@ -567,7 +567,7 @@ const dar = {
},
{
'propertyId': null,
'dataSetId': 13,
'datasetId': 13,
'propertyKey': null,
'propertyName': 'url',
'propertyValue': 'https://...',
Expand Down Expand Up @@ -658,7 +658,7 @@ const matchResponse = [
const dacDatasets = [{
'datasetName': null,
'dacId': 3,
'dataSetId': 13,
'datasetId': 13,
'consentId': 'B177D3C2-CDD8-4153-9CBF-AE4F0C34609A',
'translatedDataUse': '',
'deletable': null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const userNoLibraryCard = {

const datasets = [
{
dataSetId: 123456,
datasetId: 123456,
datasetIdentifier: `DUOS-123456`,
name: 'Some Dataset',
dataUse: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ import SelectableDatasets from '../../../src/pages/dar_application/SelectableDat

const datasets = [
{
dataSetId: 123456,
datasetId: 123456,
datasetIdentifier: `DUOS-123456`,
datasetName: 'Some Dataset 1'
},
{
dataSetId: 234567,
datasetId: 234567,
datasetIdentifier: `DUOS-234567`,
datasetName: 'Some Dataset 2'
},
{
dataSetId: 345678,
datasetId: 345678,
datasetIdentifier: `DUOS-345678`,
datasetName: 'Some Dataset 3'
},
{
dataSetId: 456789,
datasetId: 456789,
datasetIdentifier: `DUOS-456789`,
datasetName: 'Some Dataset 4'
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import DatasetsRequestedPanel from '../../../src/components/collection_voting_sl

const dataset = (id) => {
return {
dataSetId: id,
datasetId: id,
datasetIdentifier: `DUOS-${id}`,
name: `Dataset ${id}`
};
Expand Down Expand Up @@ -182,7 +182,7 @@ describe('DatasetsRequestedPanel - Tests', function () {
<DatasetsRequestedPanel
bucketDatasets={[
{
dataSetId: 1,
datasetId: 1,
name: 'Dataset 1'
}
]}
Expand All @@ -199,7 +199,7 @@ describe('DatasetsRequestedPanel - Tests', function () {
<DatasetsRequestedPanel
bucketDatasets={[
{
dataSetId: 1,
datasetId: 1,
datasetIdentifier: 'DUOS-1'
}
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { Votes } from '../../../src/libs/ajax/Votes';
import {votingColors} from '../../../src/pages/dar_collection_review/MultiDatasetVotingTab';
import {ControlledAccessType} from '../../../src/libs/dataUseTranslation';

const openElection1 = {dataSetId: 10, electionId: 101, status: 'Open', electionType: 'DataAccess'};
const openElection1 = {datasetId: 10, electionId: 101, status: 'Open', electionType: 'DataAccess'};

const openElection2 = {dataSetId: 20, electionId: 102, status: 'Open', electionType: 'DataAccess'};
const openElection2 = {datasetId: 20, electionId: 102, status: 'Open', electionType: 'DataAccess'};

const closedElection = {dataSetId: 30, electionId: 103, status: 'Closed', electionType: 'DataAccess'};
const closedElection = {datasetId: 30, electionId: 103, status: 'Closed', electionType: 'DataAccess'};

const votesForOpenElection1 = {
dataAccess: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const bucket1 = {
key: 'bucket1',
elections: [
[
{dataSetId: 300, electionId: 101, status: 'Open', electionType: 'DataAccess'},
{datasetId: 300, electionId: 101, status: 'Open', electionType: 'DataAccess'},
{electionId: 100, electionType: 'RP Vote'}
],
],
Expand Down Expand Up @@ -58,7 +58,7 @@ const bucket2 = {
key: 'bucket2',
elections: [
[
{dataSetId: 400, electionId: 101, status: 'Open', electionType: 'DataAccess'},
{datasetId: 400, electionId: 101, status: 'Open', electionType: 'DataAccess'},
{electionId: 100, electionType: 'RP Vote'}
],
],
Expand Down Expand Up @@ -97,8 +97,8 @@ const bucket2 = {

const collection = {
datasets: [
{dataSetId: 300},
{dataSetId: 400}
{datasetId: 300},
{datasetId: 400}
],
createUser: {
libraryCards: [{id: 1}]
Expand All @@ -107,7 +107,7 @@ const collection = {

const collectionMissingLibraryCard = {
datasets: [
{dataSetId: 300}
{datasetId: 300}
],
createUser: {
libraryCards: []
Expand All @@ -116,7 +116,7 @@ const collectionMissingLibraryCard = {

beforeEach(() => {
cy.stub(Storage, 'getCurrentUser').returns({userId: 200});
cy.stub(User, 'getUserRelevantDatasets').returns([{dataSetId: 300}, {dataSetId: 400}]);
cy.stub(User, 'getUserRelevantDatasets').returns([{datasetId: 300}, {datasetId: 400}]);
});

describe('MultiDatasetVoteTab - Tests', function() {
Expand Down
Loading
Loading