-
Notifications
You must be signed in to change notification settings - Fork 33
feat: ingestor component for datasets #2040
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
Open
sofyalaski
wants to merge
281
commits into
SciCatProject:master
Choose a base branch
from
SwissOpenEM:psi-deployment-gamma-release
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 250 commits
Commits
Show all changes
281 commits
Select commit
Hold shift + click to select a range
66acf38
pass all forms to backend, need input for orcid
sofyalaski 212fea6
wip: send data to onedep api
sofyalaski d1baed8
add contour level propagates
sofyalaski 8bb84d8
add list of ORCID IDs, token not passed yet
sofyalaski 0692b18
wip: token and orcid entries working; need to refactor files
sofyalaski e4c96a9
wip: make calls to oneDepAPI from frontend
sofyalaski 81dff2e
functions well
sofyalaski 2986ab1
specify many add maps
sofyalaski 6b8f2e6
restruct sending requests
sofyalaski 2b9750c
communication with OneDep works
sofyalaski 18f5cf0
ORCID field of same size no matter window size
sofyalaski d2ed381
added comments to input file on hover
sofyalaski 272765a
working version
sofyalaski e8fd4c8
uploads all file categories
sofyalaski 985db56
add field for password
sofyalaski 8a8f5e3
onedep component can be turned off
sofyalaski 8a93987
option to download files
sofyalaski 2ce4ad1
add some improvements and reduce number of requests for proposal deta…
martin-trajanovski 151892a
fix: optimize condition editing logic in DatasetsFilterSettingsCompon…
Junjiequan c2548b8
BREAKING CHANGE: new sdk release (#1658)
nitrosx 2889aad
OneDep from dataset
sofyalaski a0682c0
OneDep component recieves dataset - turned off cleaning in dataset-de…
sofyalaski deb7666
prepared dields for OneDep export
sofyalaski 3e78908
connect to OneDep backend when going to onedep
sofyalaski 5010076
adding restrictions to deposition types
sofyalaski 32ab70d
add list of ORCID IDs, token not passed yet
sofyalaski 3260b87
onedep component can be turned off
sofyalaski c3d30af
Frontend updates to match the backend release-jobs branch
sbliven 5f372b0
just to be safe
sofyalaski 19b59bd
solving conflicts
despadam 5900467
cleanup messes after rebase
sofyalaski b94ba2e
create JobsServiceV4
despadam 0f989cd
Remove createdBy from POST /job
sbliven bd72c4d
frontend functional for alpha
sofyalaski 96609a5
new psi-deployment with openem changes rebased on master
sofyalaski babf265
Merge remote-tracking branch 'upstream/add-depositor-onedep' into psi…
sofyalaski 8c40aac
remove email
sofyalaski ec05d89
Merge branch 'remote-ingestor-2' into remote-ingestor-openem
ad4ec20
Update the “Remote-Ingestor-OpenEM” in the PSI Deployment OpenEM bran…
dwiessner-unibe 3a9f1b0
wip:adding effects
sofyalaski 665fb1e
add @jsonforms/angular and @jsonforms/angular-material dependencies
753ccd6
Added @jsonforms/angular and @jsonforms/angular-material in package-l…
ef50ac9
fix eslint complains
994851f
messages added on onedep deposition creation
sofyalaski a86748e
Further development of metadata editor
7189d05
deposition submission effects, improve to include more info
sofyalaski f4815a1
Update Changes and Bugfixes in psi-deployment-openem
52a45e6
reloading page works as intended
sofyalaski 6a220b1
alpha-release: quick fix for minimal scicat metadata
56d874a
alpha-release: quick fix for minimal scicat metadata
082910a
format html
sofyalaski 65219b2
orcid entry shows messages and can be corrected
sofyalaski 60644c2
refactor finished
sofyalaski 065bfa6
adding more add-maps fixed
sofyalaski e862637
add auth to the first dialog box for ingestion
consolethinks a368988
add withCredentials to all backend calls
consolethinks 16a3dc6
optional number of fsc and add-maps
sofyalaski 8a16885
add many files and clean entered file
sofyalaski 1ce871f
Merge pull request #1711 from consolethinks/feature/backend_auth
dwiessner-unibe 63fb9dc
Prepare optical improvements and adding control mechanisms
6fc8a31
wip: error messages on questionnaire
sofyalaski 5f51a5b
update function descriptions
sofyalaski 6d5182b
validators on required files working
sofyalaski 3496fec
wip add validators on contour level
sofyalaski ecfecda
wip: add validators to contour
sofyalaski b94d98f
validator on contour level works
sofyalaski 4f6cf4c
validation works
sofyalaski 4e2c0e4
add tick for 'have read the policy of wwPDB'
sofyalaski d8f2825
(still dev stage): support sse for metadata extraction
dwiessner-unibe e7a4403
minor change in effects
sofyalaski 86d0cf2
(still dev stage): fixed templates
dwiessner-unibe f0394c5
(still dev stage): implemented field checks
dwiessner-unibe 8f15eb4
(still dev stage): bugfixes
dwiessner-unibe f483aae
(still dev stage): improved error handling
dwiessner-unibe 84208da
Bug Fixes, auto generated models and support of user info
dwiessner-unibe 1c0a953
Support no_auth mode
dwiessner-unibe 8821fb0
Fix: payload not passed correctly in POST /dataset request
phwissmann c485a7b
Merge pull request #3 from SwissOpenEM/fix-post-dataset
dwiessner-unibe d6a3653
(dev-stage): Use scicat token for dataset request; started using pagi…
dwiessner-unibe 2ddf628
(dev-stage): support pagination
dwiessner-unibe d5f9a00
(dev-stage) force login to scicat
dwiessner-unibe 24209ce
(dev-stage) frontend displays metadata error
dwiessner-unibe 8baecfb
workshop version: show error message when trying to ingest
dwiessner-unibe 5d6a261
Prefill information from user info
dwiessner-unibe 1589d31
Show Progress in percent
dwiessner-unibe 39975b8
Fix (temp): loading the frontend config from local files
despadam 6a668b9
Merge remote-tracking branch 'openem/fix-config-fetching' into deposi…
sofyalaski c154bb5
workshop: enable discovery, next button, utf8
dwiessner-unibe 5668b44
Add UNIBA ingestor URL
sbliven cdf3dee
workaround for demo
dwiessner-unibe 99e79ed
fix delete transfer
dwiessner-unibe f4d9998
revert workshop workarounds
dwiessner-unibe d037ce0
detail view for transfer task
dwiessner-unibe 768e911
added documentation to generate api models
dwiessner-unibe 483c58f
bug fixes in renderer and prepare autodiscovery
dwiessner-unibe fc8af20
bug fix - only initialize one time
dwiessner-unibe 2ef48c1
check for valid base64
dwiessner-unibe d19bedd
Improved behvaiour
dwiessner-unibe 9924731
Fix Angstrom-Unit and remove old components
dwiessner-unibe 110786e
Improved error handling, bug fix when unchecking any-of
dwiessner-unibe 6649093
fix creation time
dwiessner-unibe 7bdd3f7
wip: add routes for many possible deposition options
sofyalaski 498f705
file-browser: alpha version with list view
dwiessner-unibe acf229e
file-browser: improvements
dwiessner-unibe 1c44a45
file-browser: typo
dwiessner-unibe 92ad717
file-browser: add pagination
dwiessner-unibe 89bd181
depositor frontend improements:
sofyalaski e02316c
renderer: support user choosing owner group
dwiessner-unibe d18a3a0
schema converter: use updated atob for conversion
dwiessner-unibe 92d751f
wip jsonForms
sofyalaski 635e980
template is ready but needs proper renderring
sofyalaski 75d52cb
add schema for citation
sofyalaski 21c7a98
wip renderring
sofyalaski a8e6fca
introduced custom renderers
sofyalaski 294e7c1
enum renderers finished
sofyalaski 5b7ec00
merge master
sofyalaski f896ed9
wip better renderring
sofyalaski 82dd24f
custom renderer author
sofyalaski ad5631c
renderring finshed
sofyalaski 7ca79b9
improved quantity value renderer
dwiessner-unibe 48212f6
rm log
dwiessner-unibe cc915fb
Implemented check for schema error
dwiessner-unibe 2acd8f0
Create JSON Mode
dwiessner-unibe c113a7c
bug fix - validate not working when selecting path
dwiessner-unibe 24dcc3c
redirect to deposition
sofyalaski 0dd64a6
Save latest store version
dwiessner-unibe 12b34f7
update to rxjs-store
dwiessner-unibe e732a35
further updates to ngrx-store
dwiessner-unibe c5c143b
further updates to ngrx-store
dwiessner-unibe ec035ec
start ingestion process using store
dwiessner-unibe 8b7512c
Move cancel transfer to store
dwiessner-unibe a878ead
fix subscription handling
dwiessner-unibe 8b571f7
improve transfer information
dwiessner-unibe c8aed17
bugfixes
dwiessner-unibe d67bd67
remove ingestor url
dwiessner-unibe ab1ba51
implemented reduced view (require only)
dwiessner-unibe c2c4c4b
fix ingestor #115 - application of templates does not work
dwiessner-unibe c501d87
spelling
dwiessner-unibe 9a56bb0
add scicat header schema by dto
dwiessner-unibe 9e8b20d
Update visual data when changing renderView
dwiessner-unibe 09b2999
bugfix
dwiessner-unibe 827e16a
unify rerender strategy
dwiessner-unibe 27593ab
bug fix #110 - keep values in object renderer
dwiessner-unibe ba6e0b0
show error location (instance path)
dwiessner-unibe 7fbd8ad
Improve error notification
dwiessner-unibe 528c98a
update models, cancel request and add autoarchive option
dwiessner-unibe 40625cd
fix quantity value
dwiessner-unibe 7c8d8d4
merge object group and quantity value renderer
dwiessner-unibe 0713727
Merge branch 'remote-ingestor-openem-beta-release' into remote-ingest…
dwiessner-unibe cece001
Merge pull request #9 from SwissOpenEM/remote-ingestor-openem-beta-merge
dwiessner-unibe 0704b98
upgrade imports
dwiessner-unibe d1b9f38
make frontend starting again
dwiessner-unibe 6e5419d
jsonforms-fixes
dwiessner-unibe 0ddb667
Remove principialInvestigators from Schema
dwiessner-unibe fb0178a
Remove principalInvestigators from schema
dwiessner-unibe fa8ad24
merged master
sofyalaski 3e409b0
for testing in user menu bar
dwiessner-unibe 3b266e6
merged with master and ingestor
sofyalaski 4bb0359
Finalize autodiscovery feature
dwiessner-unibe f9c6125
add depositor support
sofyalaski 897f250
update disconnect
dwiessner-unibe 3d5347a
show onedep and empiar cards as part of the depositor view
sofyalaski 5995219
fix initaial state before connecting to backend
sofyalaski 59a8cea
refactor
sofyalaski 0cb33f0
remote invetigator
dwiessner-unibe 395ef35
bugfix establish connection
dwiessner-unibe c9d09bd
improved timing when reset facility backend
dwiessner-unibe ff9b929
store last used backends in local storage
dwiessner-unibe aea0d6b
improve styling
dwiessner-unibe 7168962
commit config with ingestor settings
dwiessner-unibe bcf749f
Improve detail view of transfers
dwiessner-unibe 4fc08bd
always show source folder
dwiessner-unibe b054aac
Improve error handling when loosing auth
dwiessner-unibe 8fdb073
add latest changes from ingestor
sofyalaski 54081f8
wip: add ingestor interface to depositor
sofyalaski 9ee0d1e
user can change metadata prior to deposing
sofyalaski c8b5265
change access to depositor to ownerUsedrs only
sofyalaski 8ac21ce
update comment
sofyalaski 689d975
merged with latest master
sofyalaski 3995d53
Merge branch 'psi-deployment-beta-release' into empiar-support
sofyalaski d4a6b52
use v3 dataset dto
dwiessner-unibe f3fa03d
Bugfix: Extractor loading page was not updated
dwiessner-unibe 75c1418
remove console log
dwiessner-unibe 31bfc35
Fix error action when connecting
dwiessner-unibe 087476d
bugfix when changing backend
dwiessner-unibe 515df19
added components for creation mode (without external ingestor)
dwiessner-unibe 05426a5
many network requests (self) - fix
dwiessner-unibe 02cbcd7
avoid object object as error
dwiessner-unibe dfabdcd
Separated api information
dwiessner-unibe dd90f3d
Remove free mode, since its not ready
dwiessner-unibe ec39818
properly reset ingestion object when creating new transfer
dwiessner-unibe ff2d523
Merge remote-tracking branch 'openem/remote-ingestor-openem-ag19' int…
sofyalaski 3af33bf
Merge remote-tracking branch 'openem/empiar-support' into psi-deploym…
sofyalaski 71578c7
Merge branch 'master' into psi-deployment-beta-release
sofyalaski c30be79
fix config after merge
sofyalaski c3592b9
in creation mode, dataset info is added prior to choosing schema
sofyalaski 99f9885
minor changes, continue at step 2 for creation mode
sofyalaski 06dd5d9
minor ux changes
sofyalaski c7d03b0
add some style changes
sofyalaski 422a258
add updates to match onedep api field for coordinates
sofyalaski 50d34b8
Merge remote-tracking branch 'origin/master' into rewireCreationMode
sofyalaski 07c5dc0
Merge remote-tracking branch 'origin/master' into rewireCreationMode
sofyalaski 7d918fc
Merge branch 'master' into psi-deployment-beta-release
sbliven 7035f04
include latest master, ingestor and depositor
sofyalaski 6f28715
Merge pull request #12 from SwissOpenEM/includeDepositor
sofyalaski 13cd875
Merge pull request #13 from SwissOpenEM/rewireCreationMode
sofyalaski 5c7e3fc
Fix minor error during job-details initialization
sbliven ecb5fef
Fix job DTO in the frontend
sbliven d339353
Fix some error in tests
sbliven 7ec0627
Merge pull request #14 from sbliven/fix1948
sbliven e0d3e44
merge master
sofyalaski 8bb3b6f
Ingestor: fix logout button
phwissmann 2ae1371
Merge pull request #15 from SwissOpenEM/fix-ingestor-logout
phwissmann 5731f77
Merge remote-tracking branch 'origin/master' into psi-deployment-beta…
sofyalaski ee18ca8
another try
sofyalaski 61371f6
try fix the branch
sofyalaski c5e71d8
starts up, but menu is missing
sofyalaski c09188c
fix config to return hamburger menu
sofyalaski b24f655
renamed components
sofyalaski 3b5c45c
fix failing tests
sofyalaski 8e55c8e
Merge remote-tracking branch 'origin/master' into another-attempt
sofyalaski be174f0
fix: #ingestor-142 validation error in reqOnly mode
sofyalaski d31fef6
fix: ingestor #193, hide SI fields from the user
sofyalaski e139e8d
Revert "fix: ingestor #193, hide SI fields from the user"
sofyalaski 27fcbdd
fix: ingestor 193
sofyalaski 75026c2
improve autodiscovery to match university domain
sofyalaski 24e2ed8
Merge remote-tracking branch 'origin/master' into another-attempt; ad…
sofyalaski 30c63c6
tests for effects and trying to fix an issue with no schema passed in…
sofyalaski 6cb7f3e
fix the stepper with no schema in create mode
sofyalaski 7abafaf
run prettier
sofyalaski 7c79fcd
Merge remote-tracking branch 'origin/master' into another-attempt
sofyalaski f2dbd20
disable ingestor
sofyalaski f79d8d6
remove redundant config variable
sofyalaski 36316e8
add creationLocaltion based on facility description from autodiscover…
sofyalaski ab68ba9
Merge branch 'master' into psi-deployment-gamma-release
sofyalaski 0dadf63
dependencies
sofyalaski 4e7517c
fix tests
sofyalaski 59ffd34
minimal changes
sofyalaski 0095921
ingestor component is turned off per default
sofyalaski 2547559
Merge branch 'master' into psi-deployment-gamma-release
sofyalaski a8c6efa
dependencies
sofyalaski 05f462d
fix lint
sofyalaski e694280
remove old file; after merge is redundant
sofyalaski cd522d9
Merge branch 'master' into psi-deployment-gamma-release
sofyalaski 5444879
fix packages
sofyalaski 0061d8a
review changes
sofyalaski 8cfa162
Merge remote-tracking branch 'origin/master' into psi-deployment-gamm…
sofyalaski a07c567
fix lint
sofyalaski 66bf8c5
Merge remote-tracking branch 'origin/master' into psi-deployment-gamm…
sofyalaski 5ecada4
wip: address some of reviewer comments
sofyalaski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| import { Injectable } from "@angular/core"; | ||
| import { | ||
| ActivatedRouteSnapshot, | ||
| CanActivate, | ||
| Router, | ||
| RouterStateSnapshot, | ||
| } from "@angular/router"; | ||
| import { AppConfigService } from "app-config.service"; | ||
|
|
||
| @Injectable({ | ||
| providedIn: "root", | ||
| }) | ||
| export class IngestorGuard implements CanActivate { | ||
| appConfig = this.appConfigService.getConfig(); | ||
|
|
||
| constructor( | ||
| private appConfigService: AppConfigService, | ||
| private router: Router, | ||
| ) {} | ||
|
|
||
| canActivate( | ||
| route: ActivatedRouteSnapshot, | ||
| state: RouterStateSnapshot, | ||
| ): boolean { | ||
| if (this.appConfig.ingestorComponent?.ingestorEnabled) { | ||
| return true; | ||
| } else { | ||
| this.router.navigate(["/404"], { | ||
| skipLocationChange: true, | ||
| queryParams: { | ||
| url: state.url, | ||
| }, | ||
| }); | ||
| return false; | ||
| } | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
src/app/app-routing/lazy/ingestor-routing/ingestor.feature.module.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import { NgModule } from "@angular/core"; | ||
| import { IngestorRoutingModule } from "./ingestor.routing.module"; | ||
| import { IngestorModule } from "ingestor/ingestor.module"; | ||
|
|
||
| @NgModule({ | ||
| imports: [IngestorModule, IngestorRoutingModule], | ||
| }) | ||
| export class IngestorFeatureModule {} |
15 changes: 15 additions & 0 deletions
15
src/app/app-routing/lazy/ingestor-routing/ingestor.routing.module.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { NgModule } from "@angular/core"; | ||
| import { RouterModule, Routes } from "@angular/router"; | ||
| import { IngestorWrapperComponent } from "ingestor/ingestor-page/ingestor-wrapper.component"; | ||
|
|
||
| const routes: Routes = [ | ||
| { | ||
| path: "", | ||
| component: IngestorWrapperComponent, | ||
| }, | ||
| ]; | ||
| @NgModule({ | ||
| imports: [RouterModule.forChild(routes)], | ||
| exports: [RouterModule], | ||
| }) | ||
| export class IngestorRoutingModule {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
|
|
||
|
|
||
| mat-sidenav-container { | ||
| mat-sidenav-content { | ||
| padding: 0.5rem; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ import { | |
| } from "state-management/actions/datasets.actions"; | ||
| import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; | ||
| import { provideMockStore } from "@ngrx/store/testing"; | ||
| import { resetIngestionObject } from "state-management/actions/ingestor.actions"; | ||
| import { selectSelectedDatasets } from "state-management/selectors/datasets.selectors"; | ||
| import { | ||
| selectColumns, | ||
|
|
@@ -33,6 +34,7 @@ import { MatCardModule } from "@angular/material/card"; | |
| import { MatIconModule } from "@angular/material/icon"; | ||
| import { AppConfigService } from "app-config.service"; | ||
| import { PageChangeEvent } from "shared/modules/table/table.component"; | ||
| import { IngestionRequestInformation } from "ingestor/ingestor-page/helper/ingestor.component-helper"; | ||
| import { | ||
| DatasetsControllerCreateV3Request, | ||
| ReturnedUserDto, | ||
|
|
@@ -135,61 +137,20 @@ describe("DashboardComponent", () => { | |
| }); | ||
|
|
||
| describe("#openDialog()", () => { | ||
| it("should dispatch an addDatasetAction when dialog returns a value", () => { | ||
| jasmine.clock().install(); | ||
| jasmine.clock().mockDate(new Date(2019, 12, 17, 12, 0, 0)); | ||
|
|
||
| dispatchSpy = spyOn(store, "dispatch"); | ||
|
|
||
| const currentUser = createMock<ReturnedUserDto>({ | ||
| id: "testId", | ||
| username: "ldap.Test User", | ||
| email: "[email protected]", | ||
| realm: "test", | ||
| emailVerified: true, | ||
| authStrategy: "local", | ||
| }); | ||
|
|
||
| const dataset: DatasetsControllerCreateV3Request = { | ||
| accessGroups: [], | ||
| contactEmail: currentUser.email, | ||
| creationTime: new Date().toISOString(), | ||
| datasetName: "Test Name", | ||
| description: "Test description", | ||
| isPublished: false, | ||
| keywords: [], | ||
| owner: currentUser.username.replace("ldap.", ""), | ||
| ownerEmail: currentUser.email, | ||
| ownerGroup: "test", | ||
| packedSize: 0, | ||
| size: 0, | ||
| sourceFolder: "/nfs/test", | ||
| type: "derived", | ||
| inputDatasets: [], | ||
| investigator: currentUser.email, | ||
| scientificMetadata: {}, | ||
| usedSoftware: ["test software"], | ||
| numberOfFilesArchived: 0, | ||
| creationLocation: undefined, | ||
| principalInvestigator: undefined, | ||
| }; | ||
|
|
||
| component.currentUser = currentUser; | ||
| component.userGroups = ["test"]; | ||
| it("should call Ingestor method", () => { | ||
| const mockIngestor = jasmine.createSpyObj("IngestorCreationComponent", [ | ||
| "onClickAddIngestion", | ||
| ]); | ||
|
|
||
| component.ingestor = mockIngestor; | ||
| component.openDialog(); | ||
|
|
||
| expect(dispatchSpy).toHaveBeenCalledTimes(1); | ||
| expect(dispatchSpy).toHaveBeenCalledWith( | ||
| addDatasetAction({ | ||
| dataset: dataset, | ||
| }), | ||
| ); | ||
| expect(mockIngestor.onClickAddIngestion).toHaveBeenCalledTimes(1); | ||
| }); | ||
| }); | ||
|
|
||
| describe("#onPageChange()", () => { | ||
| it("should dispatch a changePangeAction", () => { | ||
| it("should dispatch a changePageAction", () => { | ||
| dispatchSpy = spyOn(store, "dispatch"); | ||
|
|
||
| const event: PageChangeEvent = { | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we using a react package?