Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
35b29ff
#244 - Parse sparc:sites and display on graph viewer and sidebar
jrmartin May 20, 2025
5ee2742
#244 - fix
jrmartin May 20, 2025
03b178e
#244 - comment out filtering of published datasets only
jrmartin May 20, 2025
a2c1848
#248 - Update puppetteer to the latest version, to update its tar-fs …
jrmartin Jun 3, 2025
cdb4e55
Integrate upload dialog into dataset import
jrmartin Jun 10, 2025
0187ada
Add missing newline at end of app config
jrmartin Jun 10, 2025
10cdfd7
Fix upload dialog warnings and errors
jrmartin Jun 10, 2025
f02193e
Fix base URI references in Splinter
jrmartin Jun 10, 2025
0536ca1
fix dataset base uri
jrmartin Jun 10, 2025
cff166e
Apply base URI fix to dataset list splinter
jrmartin Jun 10, 2025
da23a93
Disable tests in CI
jrmartin Jun 10, 2025
7f4fdf7
Fix dataset link base URI for uploads
jrmartin Jun 10, 2025
f75c127
Hide URL upload tab
jrmartin Jun 10, 2025
e11d3e7
Make debug flag override upload config
jrmartin Jun 10, 2025
a932779
Remove leftover upload tabs
jrmartin Jun 10, 2025
ca4acb7
Merge pull request #250 from MetaCell/codex/integrate-uploaddialog-wi…
jrmartin Jun 10, 2025
46ad913
Update README.md
jrmartin Jun 10, 2025
4fd9d16
#247 - update jest puppeteer, increase allows upload size
jrmartin Jun 10, 2025
518cd91
Merge pull request #251 from MetaCell/codex/integrate-uploaddialog-wi…
jrmartin Jun 10, 2025
d042bd9
Load datasets if not debug mode in storage and it is in app setting
jrmartin Jun 11, 2025
0f19f05
Increase upload file size to 20mb
jrmartin Jun 11, 2025
83ba533
fix debug mode typo
jrmartin Jun 11, 2025
40a794d
Merge pull request #252 from MetaCell/codex/integrate-uploaddialog-wi…
jrmartin Jun 11, 2025
e6d8cb5
test fix
Jun 12, 2025
b0b4cad
fix versions in github actions
Jun 12, 2025
d5bd9ea
fix versions in github actions
Jun 12, 2025
d1c2485
fix in github actions
Jun 12, 2025
2009e41
Merge remote-tracking branch 'origin/development' into feature/SDS-248
jrmartin Jun 17, 2025
4ccde27
Update src/components/GraphViewer/GraphViewer.js
jrmartin Jun 17, 2025
7c49ba2
Update src/components/GraphViewer/GraphViewer.js
jrmartin Jun 17, 2025
2f8d472
Update src/components/DatasetsListViewer/DatasetsListSplinter.js
jrmartin Jun 17, 2025
fa1af18
Update src/utils/Splinter.js
jrmartin Jun 17, 2025
9182587
Update src/utils/Splinter.js
jrmartin Jun 17, 2025
ae3603c
Merge pull request #255 from MetaCell/feature/SDS-248
jrmartin Jun 17, 2025
17a287b
Update yarn.lock
SimaoBolota-MetaCell Jul 1, 2025
8f4d2ea
Update package.json
SimaoBolota-MetaCell Jul 1, 2025
342ca20
Update package.json
SimaoBolota-MetaCell Jul 1, 2025
bdddb38
Update yarn.lock
SimaoBolota-MetaCell Jul 1, 2025
23e0870
chore: update available datasets filename in app configuration
jrmartin Jul 1, 2025
f6b2d8e
chore: refactor dataset viewer components for improved performance
jrmartin Jul 8, 2025
dac192e
fixed versions to latest compatible with everything
SimaoBolota-MetaCell Jul 8, 2025
7514342
command fix
SimaoBolota-MetaCell Jul 8, 2025
df98f76
fix graph merge for duplicate folders
jrmartin Jul 8, 2025
c32a92b
fix dedup skip to attach folder children
jrmartin Jul 8, 2025
feba0ba
Handle existing graph nodes when linking children
jrmartin Jul 8, 2025
1e8ea85
Map tree nodes to RDF for deduped folders
jrmartin Jul 8, 2025
a9ba497
scale dendrogram positions by nodeSpace
jrmartin Jul 8, 2025
2123818
tweak dendrogram spacing for site folders
jrmartin Jul 8, 2025
3d9b4bd
tweak dendrogram node positioning calculations
jrmartin Jul 8, 2025
aba351d
Update actions.yml
SimaoBolota-MetaCell Jul 9, 2025
b840f16
Allow overriding DEV_URL via env
jrmartin Jul 9, 2025
386db93
chore: update jest and puppeteer dependencies to compatible versions
jrmartin Jul 9, 2025
2eef323
chore: remove optional build step from GitHub Actions workflow
jrmartin Jul 9, 2025
c9aff34
chore: change command to start development server in GitHub Actions w…
jrmartin Jul 9, 2025
29b67fd
chore: update dependencies to latest compatible versions
jrmartin Jul 9, 2025
8871bf9
Merge pull request #260 from MetaCell/feature/update-jest-deps-workflow
SimaoBolota-MetaCell Jul 10, 2025
6556e71
Merge pull request #254 from MetaCell/fix/e2e
jrmartin Jul 14, 2025
d529cd0
Merge pull request #257 from MetaCell/codex/fix-graph-node-handling-i…
jrmartin Jul 15, 2025
da90434
Merge pull request #261 from MetaCell/feature/test-f006
jrmartin Jul 15, 2025
703deb8
f006 dataset support
jrmartin Jul 21, 2025
67c5e6a
Add group chip menu, full vertical names, resizable sidebar
jrmartin Aug 16, 2025
187a75b
Copy full chip URL in context menu
jrmartin Aug 17, 2025
9ba346e
Handle chip links for subject and sample nodes
jrmartin Aug 17, 2025
7b23a9e
Convert subject/sample attribute values to link-aware objects
jrmartin Aug 17, 2025
b029b91
Check RDF type before linking attributes
jrmartin Aug 17, 2025
8e8bce4
Fix attribute link handling after group organization
jrmartin Aug 17, 2025
489e0be
Limit linkable attributes to subject and sample groups
jrmartin Aug 17, 2025
2134237
refactor: streamline attribute handling and improve group node organi…
jrmartin Aug 18, 2025
99f1d81
Linkify ontology and URL references
jrmartin Aug 18, 2025
be277b1
Fix chip links and object handling
jrmartin Aug 18, 2025
758989e
fix: normalize chip value handling and improve node attribute access
jrmartin Aug 20, 2025
29c0252
Fix sample hierarchy and restore subject/sample folder nodes
jrmartin Aug 21, 2025
60d3916
Fix sample parenting in graph
jrmartin Aug 21, 2025
0723307
Distinguish sample and subject derivations
jrmartin Aug 21, 2025
24fb837
Prefer sample derivation over subject
jrmartin Aug 21, 2025
4ed0db1
fix: increase max file size limit for uploads
jrmartin Aug 21, 2025
81da640
Reparent sample folders under subjects
jrmartin Aug 21, 2025
e18d623
Merge remote-tracking branch 'origin/codex/update-group-chip-behavior…
jrmartin Aug 21, 2025
0a0962d
Merge branch 'codex/analyze-hierarchy-issue-in-graph-viewer-ro8rr4' o…
jrmartin Aug 21, 2025
8608073
fix: normalize chip label handling for improved value access
jrmartin Aug 21, 2025
bde74f2
Place sample folders under samples
jrmartin Aug 21, 2025
9dac69b
Route primary and derivative folders through samples
jrmartin Aug 21, 2025
20a101e
Merge remote-tracking branch 'origin/codex/analyze-hierarchy-issue-in…
jrmartin Aug 21, 2025
92b0369
Merge remote-tracking branch 'origin/codex/analyze-hierarchy-issue-in…
jrmartin Aug 21, 2025
717bb38
Fix sample hierarchy edges
jrmartin Aug 21, 2025
c8218bd
Merge remote-tracking branch 'origin/codex/analyze-hierarchy-issue-in…
jrmartin Aug 21, 2025
d6b397a
Show full path for hasFolderAboutIt folders
jrmartin Aug 21, 2025
f7bb8eb
Merge remote-tracking branch 'origin/codex/analyze-hierarchy-issue-in…
jrmartin Aug 21, 2025
3da8bc2
Expand node hover width and improve node replacement
jrmartin Aug 21, 2025
531cfdb
Merge remote-tracking branch 'origin/codex/analyze-hierarchy-issue-in…
jrmartin Aug 21, 2025
9d6826a
refactor: simplify rendering of subject details in NodeDetailView
jrmartin Aug 21, 2025
2c46a25
refactor: enhance subject details rendering with link support
jrmartin Aug 21, 2025
f596cdd
Merge remote-tracking branch 'origin/feature/f006' into codex/analyze…
jrmartin Aug 21, 2025
c7cbd4a
refactor: remove redundant link information processing in Splinter ut…
jrmartin Aug 21, 2025
4551300
refactor: streamline folder handling and improve node linking in Spli…
jrmartin Aug 21, 2025
1b3cd45
feat: include missing metadata properties
jrmartin Aug 21, 2025
a4f1237
Merge pull request #271 from MetaCell/codex/update-initialmetadatamod…
jrmartin Aug 21, 2025
34e4a9c
feat: show primary and derivative folders
jrmartin Sep 2, 2025
f30152b
refactor: add optional chaining for safer property access in NodeDeta…
jrmartin Sep 2, 2025
efb852e
feat: show folder names without full path
jrmartin Sep 2, 2025
91b08e8
fix: retain folder paths for graph linkage
jrmartin Sep 2, 2025
4200f9d
fix: link folder nodes to their children
jrmartin Sep 3, 2025
d144907
fix: correct graph loading and node level assignment in Splinter utility
jrmartin Sep 3, 2025
ea8a7ea
fix: recompute node levels and streamline level assignment in Splinte…
jrmartin Sep 3, 2025
d05e070
fix: capitalize folder labels and improve metadata handling in initia…
jrmartin Sep 3, 2025
c00bc3a
Merge pull request #274 from MetaCell/codex/refactor-splinter-class-f…
jrmartin Sep 3, 2025
4d5477d
Merge pull request #272 from MetaCell/codex/fix-hierarchy-handling-in…
jrmartin Sep 3, 2025
f989f71
fix: simplify folder linking and improve node attribute handling in S…
jrmartin Sep 3, 2025
3c51f30
Merge pull request #275 from MetaCell/codex/refactor-splinter-class-f…
jrmartin Sep 3, 2025
4523067
Update src/utils/nodesFactory.js
jrmartin Sep 3, 2025
6aa06a5
fix: improve folder name handling for directory types in Splinter uti…
jrmartin Sep 3, 2025
a3ae2b3
style: enhance folder icon contrast
jrmartin Sep 4, 2025
5a2cbe0
style: tune folder icon greys
jrmartin Sep 4, 2025
2015e1c
fix: disable upload and debug flags in App component
jrmartin Sep 5, 2025
7880789
Merge pull request #279 from MetaCell/codex/change-folder-icons-to-gr…
jrmartin Sep 5, 2025
27afa71
Merge pull request #270 from MetaCell/feature/august-release
jrmartin Sep 5, 2025
757d68a
Initial plan
Copilot Oct 30, 2025
108584a
Initial plan for fixing graph viewer duplicate folder issue
Copilot Oct 30, 2025
a8ad8fa
Implement fix to prevent duplicate folder nodes for sparc: entities
Copilot Oct 30, 2025
70fcc5b
Improve findSparcNodeByPath to also check hasFolderAboutIt attribute
Copilot Oct 30, 2025
55f890b
Fix test assertions based on code review feedback
Copilot Oct 30, 2025
88853ad
Fix: Allow primary/derivative folders to show under sparc nodes
Copilot Nov 5, 2025
1903bce
fix: enhance null safety for tree reference access in Splinter utility
jrmartin Nov 5, 2025
1d0bbbd
Merge pull request #282 from MetaCell/copilot/fix-graph-viewer-issues
jrmartin Nov 5, 2025
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
48 changes: 26 additions & 22 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
name: SDS Viewer Workflow

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the specified branch
push:
branches:
- "master"
- "development"
- "master"
- "development"
pull_request:
branches:
- "master"
- "development"
- "master"
- "development"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
jobs:
sds_viewer_test:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container: lironavon/docker-puppeteer-container:14.16.0
env:
CI: true
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 16.X
- name: SDS Viewer elements snapshot test
run: |
#install dependencies
yarn
# run tests
npm run e2e_test
env:
- uses: actions/checkout@v4

- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x

- name: Install dependencies
run: yarn

- name: Start development server in background
run: |
yarn start &
npx wait-on http://localhost:3000
env:
CI: true

- name: Run E2E snapshot tests
run: npm run e2e_test
env:
CI: true
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,14 @@ The SPARC SDS Viewer uses SPARC Portal datasets.
### Error Handling
- In the case of encountering an error, take a screenshot and report it with us please by opening an [issue](https://github.com/MetaCell/sds-viewer/issues/new)-clicking the Bug icon will take you to this page. If you don't have a GitHub account, please feel free to use the [SPARC Contact form](https://sparc.science/contact-us?source_url=%2F) to provide your feedback.
- To go back , click on the 'x' to go back to the previous screen.

### Debug Mode

* Upload from Local Disk
1) Launch the SDS Viewer development version , https://sds-viewer.dev.metacell.us/, and click Import a new dataset in the sidebar footer.
2) In the dialog, select the Upload tab (visible only when enabled).
3) Drag and drop your dataset’s .ttl file and .json file into the drop zone. Only these file types are accepted, each up to about 5 MB.
4) After both files are uploaded, click Done to load the dataset. The viewer processes the files exactly as if you selected a repository dataset.

Using Debug Mode
- Open the SDS Viewer with ?debug=true in the URL to force the upload tab on and show all datasets regardless of status. This takes precedence over the enableUploadDialog value in app.json.
86 changes: 86 additions & 0 deletions __tests__/TestDuplicateFolderFix.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/**
* Test to verify that folders under primary/source/derivative
* that are already represented as sparc nodes (Sample, Site, etc.)
* do not appear as duplicate Collection nodes
*/
import Splinter from '../src/utils/Splinter';
const fs = require("fs");

describe('Test Duplicate Folder Fix for f006 Dataset', () => {
let splinter;
let graph;

beforeAll(async() => {
const turtleStream = fs.createReadStream(__dirname + '/../resources/f006/curation-export.ttl');
const pathMetadataJSONFileParsed = require(__dirname + '/../resources/f006/path-metadata-f06.json');
splinter = new Splinter(JSON.stringify(pathMetadataJSONFileParsed), turtleStream);
graph = await splinter.getGraph();
});

it('Graph should not have duplicate sam-l-seg-c1 nodes', () => {
// Count how many nodes have "sam-l-seg-c1" in their name or id
const samLC1Nodes = graph.nodes.filter(node => {
const nameMatch = node.name && node.name.includes('sam-l-seg-c1');
return nameMatch;
});

// We expect only ONE sparc:Sample node for sam-l-seg-c1
// Not a duplicate Collection node under primary/sub-f006/sam-l/
expect(samLC1Nodes.length).toBeLessThanOrEqual(1);

// Verify it's a Sample type, not a Collection
if (samLC1Nodes.length > 0) {
expect(samLC1Nodes[0].type).toBe('Sample');
}
});

it('Primary folder should not contain Collection nodes that are already sparc nodes', () => {
// Find the "sam-l" sample node (should be a Sample, not Collection)
const samLNodes = graph.nodes.filter(node =>
node.name === 'sam-l' && node.type === 'Sample'
);

expect(samLNodes.length).toBeGreaterThan(0);

// Get all nodes that are children of sam-l
const samLNode = samLNodes[0];
const childNodes = graph.links
.filter(link => link.source === samLNode.id || link.source.id === samLNode.id)
.map(link => {
const targetId = typeof link.target === 'object' ? link.target.id : link.target;
return graph.nodes.find(n => n.id === targetId);
})
.filter(n => n !== undefined);

// Child nodes should be primarily Sample/Site nodes, not Collection nodes
// that duplicate the sample structure
const collectionChildren = childNodes.filter(n => n.type === 'Collection');
const sampleChildren = childNodes.filter(n => n.type === 'Sample');

// We expect more Sample children than Collection children
// because samples like sam-l-seg-c1 should be Sample nodes, not Collection nodes
// This is just informational, not a strict assertion
expect(sampleChildren.length).toBeGreaterThanOrEqual(0);
});

it('Source folder subfolders should not appear as Collection nodes if they are sparc nodes', () => {
// Find nodes with "source" in their path
const sourceRelatedNodes = graph.nodes.filter(node => {
const hasSourcePath = node.attributes?.relativePath?.includes('source/');
return hasSourcePath && node.type === 'Collection';
});

// Check if any of these Collection nodes under source/ have matching Sample nodes
const duplicates = sourceRelatedNodes.filter(collectionNode => {
const basename = collectionNode.name;
// Look for a Sample node with the same basename
const matchingSamples = graph.nodes.filter(node =>
node.name === basename && node.type === 'Sample'
);
return matchingSamples.length > 0;
});

// No duplicates should be found
expect(duplicates.length).toBe(0);
});
});
21 changes: 10 additions & 11 deletions __tests__/e2e.test.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
import * as puppeteer from "puppeteer";
import * as selectors from "./selectors";
import { ONE_SECOND, ONE_MINUTE, TWO_MINUTES, TEN_MINUTES } from "./time_constants";
import 'expect-puppeteer';
import 'puppeteer'
import { toMatchImageSnapshot } from 'jest-image-snapshot'
import { time } from "console";
expect.extend({ toMatchImageSnapshot })
const puppeteer = require("puppeteer");
const selectors = require("./selectors");
const { ONE_SECOND, ONE_MINUTE, TWO_MINUTES, TEN_MINUTES } = require("./time_constants");
require('expect-puppeteer');
require('puppeteer');
const { toMatchImageSnapshot } = require('jest-image-snapshot');
const { time } = require("console");
expect.extend({ toMatchImageSnapshot });
const axios = require('axios').default;
const fs = require('fs');
const path = require('path');
var scriptName = path.basename(__filename, '.js');


const DEV_URL = 'https://metacell.github.io/sds-viewer/'
const DEV_URL = process.env.DEV_URL || 'http://localhost:3000/'
const DATASET_ID = '0a5a2827-2b39-4085-87ea-2b7fbbe27cc8'

//SNAPSHOT
const SNAPSHOT_OPTIONS = {
customSnapshotsDir: './__tests__/snapshots',
comparisonMethod: 'ssim',
failureThresholdType: 'percent',
failureThreshold: 0.25
failureThreshold: 0.3
};




jest.setTimeout(TEN_MINUTES);


Expand Down
7 changes: 7 additions & 0 deletions __tests__/resources/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
"jsonFile" : "/../resources/dataset3/path-metadata.json",
"expectedNodes" : 19,
"expectedLinks" : 18
},
"Dataset_f006" : {
"name" : "dataset_2a3d01c0-39d3-464a-8746-54c9d67ebe0f",
"turtleFile" : "/../resources/f006/curation-export.ttl",
"jsonFile" : "/../resources/f006/path-metadata-f06.json",
"expectedNodes" : null,
"expectedLinks" : null
}
},
"externalDatasets" : {
Expand Down
63 changes: 43 additions & 20 deletions __tests__/selectors.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,46 @@
//Selectors:

export const EMPTY_DATASET_VIEWER_SELECTOR = '.MuiBox-empty';
export const EMPTY_DATASET_LIST_SELECTOR = '.no-instance';
export const LOAD_BUTTONS_SELECTOR = 'button[class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-disableElevation MuiButton-fullWidth"]';
export const DATASET_LIST_SELECTOR = '.datasets_list';
export const DATASET_ITEM_SELECTOR = '.dataset_item';
export const DONE_BUTTON_SELECTOR = 'button[class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-disableElevation Mui-disabled MuiButton-fullWidth Mui-disabled"]';
export const DATASET_COUNT_NUMBER_SELECTOR = 'p[class="MuiTypography-root MuiTypography-body1"]';
export const SPARC_DATASET_LIST_SELECTOR = 'li[class="MuiListItem-root dataset_item MuiListItem-gutters"]';
export const ENABLED_DONE_BUTTON_SELECTOR = 'button[class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-disableElevation MuiButton-fullWidth"]';
export const LOADED_DATASET_SELECTOR = 'p[class="MuiTypography-root labelText MuiTypography-body2"]';
export const GRAPH_SELECTOR = '.graph-view';
export const OPEN_FOLDER_BUTTON_SELECTOR = 'span[class="MuiTypography-root labelCaption MuiTypography-caption MuiTypography-colorInherit"]';
export const SUBFOLDERS_SELECTOR = 'ul[class="MuiCollapse-root MuiTreeItem-group MuiCollapse-entered"]'
export const FELINE_DATASET_IMG_SELECTOR = 'img[alt="Feline brainstem neuron extracellular potential recordings"]';
export const DATA_ID_SELECTOR = 'h6[class="MuiTypography-root breadcrumb_selected MuiTypography-subtitle2"]';
export const URL_UPLOADER_SELECTOR = '#url-uploader';
export const LOAD_DATA_POPUP_SELECTOR = 'div[class="MuiTabs-root rounded"]';
export const LOAD_THROUGH_URL_TAB_SELECTOR = '#simple-tab-1';
export const LOCAL_UPLOAD_TAB_SELECTOR = '#simple-tab-0';
export const LOCAL_SYSTEM_UPLOAD_BUTTON_SELECTOR = '#simple-tabpanel-0';
const EMPTY_DATASET_VIEWER_SELECTOR = '.MuiBox-empty';
const EMPTY_DATASET_LIST_SELECTOR = '.no-instance';
const LOAD_BUTTONS_SELECTOR = 'button[class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-disableElevation MuiButton-fullWidth"]';
const DATASET_LIST_SELECTOR = '.datasets_list';
const DATASET_ITEM_SELECTOR = '.dataset_item';
const DONE_BUTTON_SELECTOR = 'button[class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-disableElevation Mui-disabled MuiButton-fullWidth Mui-disabled"]';
const DATASET_COUNT_NUMBER_SELECTOR = 'p[class="MuiTypography-root MuiTypography-body1"]';
const SPARC_DATASET_LIST_SELECTOR = 'li[class="MuiListItem-root dataset_item MuiListItem-gutters"]';
const ENABLED_DONE_BUTTON_SELECTOR = 'button[class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-disableElevation MuiButton-fullWidth"]';
const LOADED_DATASET_SELECTOR = 'p[class="MuiTypography-root labelText MuiTypography-body2"]';
const GRAPH_SELECTOR = '.graph-view';
const OPEN_FOLDER_BUTTON_SELECTOR = 'span[class="MuiTypography-root labelCaption MuiTypography-caption MuiTypography-colorInherit"]';
const SUBFOLDERS_SELECTOR = 'ul[class="MuiCollapse-root MuiTreeItem-group MuiCollapse-entered"]'
const FELINE_DATASET_IMG_SELECTOR = 'img[alt="Feline brainstem neuron extracellular potential recordings"]';
const DATA_ID_SELECTOR = 'h6[class="MuiTypography-root breadcrumb_selected MuiTypography-subtitle2"]';
const URL_UPLOADER_SELECTOR = '#url-uploader';
const LOAD_DATA_POPUP_SELECTOR = 'div[class="MuiTabs-root rounded"]';
const LOAD_THROUGH_URL_TAB_SELECTOR = '#simple-tab-1';
const LOCAL_UPLOAD_TAB_SELECTOR = '#simple-tab-0';
const LOCAL_SYSTEM_UPLOAD_BUTTON_SELECTOR = '#simple-tabpanel-0';

module.exports = {
EMPTY_DATASET_VIEWER_SELECTOR,
EMPTY_DATASET_LIST_SELECTOR,
LOAD_BUTTONS_SELECTOR,
DATASET_LIST_SELECTOR,
DATASET_ITEM_SELECTOR,
DONE_BUTTON_SELECTOR,
DATASET_COUNT_NUMBER_SELECTOR,
SPARC_DATASET_LIST_SELECTOR,
ENABLED_DONE_BUTTON_SELECTOR,
LOADED_DATASET_SELECTOR,
GRAPH_SELECTOR,
OPEN_FOLDER_BUTTON_SELECTOR,
SUBFOLDERS_SELECTOR,
FELINE_DATASET_IMG_SELECTOR,
DATA_ID_SELECTOR,
URL_UPLOADER_SELECTOR,
LOAD_DATA_POPUP_SELECTOR,
LOAD_THROUGH_URL_TAB_SELECTOR,
LOCAL_UPLOAD_TAB_SELECTOR,
LOCAL_SYSTEM_UPLOAD_BUTTON_SELECTOR
};

15 changes: 11 additions & 4 deletions __tests__/time_constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
export const TWO_MINUTES = 60000 * 2;
export const ONE_SECOND = 1000
export const ONE_MINUTE = 60000;
export const TEN_MINUTES = 600000
const TWO_MINUTES = 60000 * 2;
const ONE_SECOND = 1000;
const ONE_MINUTE = 60000;
const TEN_MINUTES = 600000;

module.exports = {
TWO_MINUTES,
ONE_SECOND,
ONE_MINUTE,
TEN_MINUTES
};
19 changes: 10 additions & 9 deletions jest-puppeteer.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
module.exports = {
launch: {
headless: true,
// slowMo:20,
defaultViewport: {
width: 1000,
height: 800
},
timeout: 120000
launch: {
headless: 'new',
// slowMo:20,
defaultViewport: {
width: 1000,
height: 800
},
}
timeout: 120000
},
testEnvironmentOptions: {}
}
6 changes: 4 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
module.exports = {
rootDir: "__tests__",
verbose: true,
bail : false,
bail: false,
preset: "jest-puppeteer",
testEnvironment: "jest-environment-puppeteer",
testEnvironmentOptions: {},
globals: {
"ts-jest": {
tsConfig: {
Expand All @@ -11,4 +13,4 @@ module.exports = {
},
},
}
};
};
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,31 @@
"axios": "^0.21.1",
"fs": "^0.0.1-security",
"gh-pages": "^3.2.3",
"jest": "26.6.0",
"jest-image-snapshot": "4.5.1",
"jest-puppeteer": "6.1.0",
"jest": "^29.7.0",
"jest-image-snapshot": "6.5.1",
"jest-puppeteer": "^7.0.0",
"material-ui-dropzone": "^3.5.0",
"n3": "^1.13.0",
"puppeteer": "13.5.1",
"puppeteer": "^19.11.1",
"react": "^17.0.2",
"react-beautiful-dnd": "^13.1.1",
"react-dom": "^17.0.2",
"react-hot-loader": "^4.13.0",
"react-redux": "^7.2.4",
"react-scripts": "^5.0.1",
"three": "^0.171.0",
"ts-jest": "^26.4.4",
"ts-jest": "^29.1.0",
"typescript": "^4.2.4",
"uuid": "^8.3.2"
"uuid": "^8.3.2",
"expect-puppeteer": "^6.0.0"
},
"scripts": {
"start": "craco start",
"predeploy": "yarn build",
"deploy": "gh-pages -d build",
"build": "craco build",
"test": "jest",
"e2e_test": "./node_modules/.bin/jest e2e.test.js --no-sandbox"
"e2e_test": "jest e2e --no-sandbox"
},
"eslintConfig": {
"extends": "react-app"
Expand Down
Loading