Skip to content

Commit

Permalink
merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
svonworl committed Jun 25, 2024
2 parents 22d0e05 + e221a20 commit 8354d78
Show file tree
Hide file tree
Showing 361 changed files with 3,573 additions and 2,359 deletions.
8 changes: 6 additions & 2 deletions cypress/e2e/group2/myworkflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,9 +545,13 @@ describe('Dockstore my workflows part 3', () => {
// Untouched form should not have errors but is disabled
cy.get('#submitButton').should('be.disabled');
notHaveAlert();
cy.get('#sourceCodeRepositoryInput').scrollIntoView().should('be.visible').clear().type('beef/stew');
cy.get('#sourceCodeRepositoryInput').scrollIntoView().should('be.visible');
cy.get('#sourceCodeRepositoryInput').clear();
cy.get('#sourceCodeRepositoryInput').type('beef/stew');
cy.get('#submitButton').should('be.disabled');
cy.get('#sourceCodeRepositoryWorkflowPathInput').scrollIntoView().should('be.visible').clear().type('/Dockstore.cwl');
cy.get('#sourceCodeRepositoryWorkflowPathInput').scrollIntoView().should('be.visible');
cy.get('#sourceCodeRepositoryWorkflowPathInput').clear();
cy.get('#sourceCodeRepositoryWorkflowPathInput').type('/Dockstore.cwl');
notHaveAlert();
// Apparently the actual radio button inside Angular material buttons is hidden, so doing it this way
cy.get('#descriptorTypeRadioButtons').contains(cwlDescriptorType).find('.mat-radio-container').click();
Expand Down
16 changes: 12 additions & 4 deletions cypress/e2e/group3/mytools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ describe('Dockstore my tools', () => {
cy.contains('Create tool with descriptor(s) on remote sites').should('be.visible').click();
cy.get('.modal-footer').contains('Next').first().click();

cy.get('#sourceCodeRepositoryInput').scrollIntoView().should('be.visible').click().type('testnamespace/testname');
cy.get('#sourceCodeRepositoryInput').scrollIntoView().should('be.visible');
cy.get('#sourceCodeRepositoryInput').click();
cy.get('#sourceCodeRepositoryInput').type('testnamespace/testname');

cy.get('[data-cy=imageRegistryProviderSelect]').click();
cy.contains('Amazon ECR').click();
Expand Down Expand Up @@ -342,7 +344,9 @@ describe('Dockstore my tools', () => {
cy.contains('Create tool with descriptor(s) on remote sites').should('be.visible').click();
cy.get('.modal-footer').contains('Next').first().click();

cy.get('#sourceCodeRepositoryInput').scrollIntoView().should('be.visible').click().type('testnamespace/testname');
cy.get('#sourceCodeRepositoryInput').scrollIntoView().should('be.visible');
cy.get('#sourceCodeRepositoryInput').click();
cy.get('#sourceCodeRepositoryInput').type('testnamespace/testname');

cy.get('[data-cy=imageRegistryProviderSelect]').click();
cy.contains('Amazon ECR').click();
Expand Down Expand Up @@ -448,7 +452,9 @@ describe('Dockstore my tools', () => {
cy.contains('Create tool with descriptor(s) on remote sites').should('be.visible').click();
cy.get('.modal-footer').contains('Next').first().click();

cy.get('#sourceCodeRepositoryInput').scrollIntoView().should('be.visible').click().type('testnamespace/testname');
cy.get('#sourceCodeRepositoryInput').scrollIntoView().should('be.visible');
cy.get('#sourceCodeRepositoryInput').click();
cy.get('#sourceCodeRepositoryInput').type('testnamespace/testname');

cy.get('[data-cy=imageRegistryProviderSelect]').click();
cy.contains('mat-option', 'Seven Bridges').click();
Expand All @@ -458,6 +464,7 @@ describe('Dockstore my tools', () => {

cy.get('#imageRegistryInput').type('testnamespace/testname');

cy.get('#submitButton').scrollIntoView().should('be.enabled');
cy.get('#submitButton').click();

// TODO: This is temporarily disabled
Expand Down Expand Up @@ -532,7 +539,8 @@ describe('Dockstore my tools', () => {
cy.visit('/containers/quay.io/A2/a');
goToTab('Versions');
cy.get('[data-cy=actionsButton]').should('be.visible').first().click();
cy.get('[data-cy=ok-dialog-close-button]').scrollIntoView().should('be.visible').click();
cy.get('[data-cy=ok-dialog-close-button]').scrollIntoView().should('be.visible');
cy.get('[data-cy=ok-dialog-close-button]').click();
});
});
});
Expand Down
8 changes: 6 additions & 2 deletions cypress/e2e/smokeTests/sharedTests/auth-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ function toggleHiddenToolVersion() {
}

function toggleHiddenWorkflowVersion() {
cy.get('[data-cy=versionRow]').last().scrollIntoView().contains('button', 'Actions').should('be.visible').click();
cy.get('[data-cy=versionRow]').last().scrollIntoView().contains('button', 'Actions').should('be.visible');
cy.get('[data-cy=versionRow]').last().contains('button', 'Actions').click();
cy.contains('button', 'Edit').scrollIntoView();
cy.contains('button', 'Edit').click();
// TODO: Use [data-cy=hiddenCheck] -- do after 1.14 deployed
cy.contains('div', 'Hidden:').within(() => {
Expand Down Expand Up @@ -266,7 +268,9 @@ function testWorkflow(registry: string, repo: string, name: string) {

goToTab('Info');
cy.contains('button', 'Restub').click();
cy.contains('button', 'Publish').should('be.disabled');
// This fails because DOI is auto issued when published, and restub fails.
// See https://ucsc-gi.slack.com/archives/C05EZH3RVNY/p1718128426265779
// cy.contains('button', 'Publish').should('be.disabled');

cy.get('[data-cy=refreshButton]').click();
goToTab('Versions');
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app/about/about.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ <h2>The Importance of Sharing</h2>
<h3>Building a Community</h3>
<p>
Several large projects and organizations in the Biosciences, specifically cancer sequencing projects such as
<a target="_blank" rel="noopener noreferrer" href="https://dcc.icgc.org/pcawg">PCAWG</a>,
<a target="_blank" rel="noopener noreferrer" href="https://docs.icgc-argo.org/docs/data-access/icgc-25k-data">PCAWG</a>,
<a target="_blank" rel="noopener noreferrer" href="https://precision.fda.gov/">PrecisionFDA</a>,
<a target="_blank" rel="noopener noreferrer" href="https://www.broadinstitute.org/">the Broad Institute</a>,
<a target="_blank" rel="noopener noreferrer" href="https://www.ucsc.edu/">the University of California Santa Cruz</a>, and
Expand Down
24 changes: 23 additions & 1 deletion src/app/about/about.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,34 @@ import { map } from 'rxjs/operators';
import { Funder, FundingComponent } from '../funding/funding.component';
import { Dockstore } from '../shared/dockstore.model';
import { Sponsor } from '../sponsors/sponsor.model';
import { RouterLink } from '@angular/router';
import { MatLegacyCardModule } from '@angular/material/legacy-card';
import { MatLegacyTabsModule } from '@angular/material/legacy-tabs';
import { ExtendedModule } from '@ngbracket/ngx-layout/extended';
import { NgStyle, NgFor, AsyncPipe, SlicePipe } from '@angular/common';
import { MatIconModule } from '@angular/material/icon';
import { MatLegacyButtonModule } from '@angular/material/legacy-button';
import { FlexModule } from '@ngbracket/ngx-layout/flex';

@Component({
selector: 'app-about',
templateUrl: './about.component.html',
styleUrls: ['./about.component.scss'],
providers: [FundingComponent],
standalone: true,
imports: [
FlexModule,
MatLegacyButtonModule,
MatIconModule,
NgStyle,
ExtendedModule,
MatLegacyTabsModule,
MatLegacyCardModule,
RouterLink,
NgFor,
AsyncPipe,
SlicePipe,
],
})
export class AboutComponent implements OnInit {
Dockstore = Dockstore;
Expand All @@ -36,7 +58,7 @@ export class AboutComponent implements OnInit {
new Sponsor('ucsc.png', new URL('https://ucscgenomics.soe.ucsc.edu/')),
new Sponsor('broad.svg', new URL('https://www.broadinstitute.org/')),
new Sponsor('ga4gh.svg', new URL('https://genomicsandhealth.org/')),
new Sponsor('pcawg.png', new URL('https://dcc.icgc.org/pcawg')),
new Sponsor('pcawg.png', new URL('https://docs.icgc-argo.org/docs/data-access/icgc-25k-data')),
new Sponsor('precision.png', new URL('https://precision.fda.gov/')),
new Sponsor('nf-core.png', new URL('https://nf-co.re/')),
];
Expand Down
7 changes: 7 additions & 0 deletions src/app/aliases/aliases.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ import { ActivatedRoute, Router } from '../test';
import { AliasesQuery } from './state/aliases.query';
import { AliasesService } from './state/aliases.service';
import { EntryTypeMetadataService } from '../entry/type-metadata/entry-type-metadata.service';
import { MatLegacyProgressBarModule } from '@angular/material/legacy-progress-bar';
import { MatIconModule } from '@angular/material/icon';
import { MatLegacyCardModule } from '@angular/material/legacy-card';
import { NgIf, AsyncPipe } from '@angular/common';
import { HeaderComponent } from '../header/header.component';

@Component({
selector: 'app-aliases',
templateUrl: './aliases.component.html',
styleUrls: ['./aliases.component.scss'],
standalone: true,
imports: [HeaderComponent, NgIf, MatLegacyCardModule, MatIconModule, MatLegacyProgressBarModule, AsyncPipe],
})
export class AliasesComponent extends Base implements OnInit {
loading$: Observable<boolean>;
Expand Down
16 changes: 0 additions & 16 deletions src/app/aliases/aliases.module.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/aliases/aliases.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { RouterModule, Routes } from '@angular/router';
import { Routes } from '@angular/router';
import { AliasesComponent } from './aliases.component';

const ALIASES_ROUTES: Routes = [
Expand All @@ -25,4 +25,4 @@ const ALIASES_ROUTES: Routes = [
},
];

export const AliasesRouting = RouterModule.forChild(ALIASES_ROUTES);
export const AliasesRouting = ALIASES_ROUTES;
99 changes: 85 additions & 14 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,47 +1,118 @@
import { TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { RouterLinkStubDirective, RouterOutletStubComponent } from './test/router-stubs';
import { HttpClientTestingModule } from '@angular/common/http/testing';

import { Component } from '@angular/core';
import { TestBed, waitForAsync } from '@angular/core/testing';
import { MatLegacyDialogModule } from '@angular/material/legacy-dialog';
import { MatLegacySnackBarModule as MatSnackBarModule } from '@angular/material/legacy-snack-bar';
import { RouterTestingModule } from '@angular/router/testing';
import { AuthService } from 'ng2-ui-auth';
import { AppComponent } from './app.component';
import { MytoolsService } from './mytools/mytools.service';
import { MyWorkflowsService } from './myworkflows/myworkflows.service';
import { ServiceInfoService } from './service-info/service-info.service';
import { ContainerService } from './shared/container.service';
import { DateService } from './shared/date.service';
import { DescriptorLanguageService } from './shared/entry/descriptor-language.service';
import { LogoutService } from './shared/logout.service';
import { Configuration, UsersService } from './shared/openapi';
import { PagenumberService } from './shared/pagenumber.service';
import { ProviderService } from './shared/provider.service';
import { MyEntriesStateService } from './shared/state/my-entries.service';
import { MyEntriesStore } from './shared/state/my-entries.store';
import { TrackLoginService } from './shared/track-login.service';
import { TosBannerStubService, TrackLoginStubService } from './test/service-stubs';
import { UrlResolverService } from './shared/url-resolver.service';
import { RouterLinkStubDirective, RouterOutletStubComponent } from './test/router-stubs';
import {
AuthStubService,
ConfigurationStub,
ContainerStubService,
DateStubService,
DescriptorLanguageStubService,
GA4GHV20StubService,
LogoutStubService,
ProviderStubService,
TosBannerStubService,
TrackLoginStubService,
UrlResolverStubService,
UsersStubService,
} from './test/service-stubs';
import { TosBannerService } from './tosBanner/state/tos-banner.service';

@Component({ selector: 'app-banner', template: '' })
@Component({
selector: 'app-banner',
template: '',
standalone: true,
imports: [RouterTestingModule, MatSnackBarModule],
})
class BannerStubComponent {}

@Component({ selector: 'app-navbar', template: '' })
@Component({
selector: 'app-navbar',
template: '',
standalone: true,
imports: [RouterTestingModule, MatSnackBarModule],
})
class NavbarStubComponent {}

@Component({ selector: 'app-footer', template: '' })
@Component({
selector: 'app-footer',
template: '',
standalone: true,
imports: [RouterTestingModule, MatSnackBarModule],
})
class FooterStubComponent {}

@Component({ selector: 'app-tos-banner', template: '' })
@Component({
selector: 'app-tos-banner',
template: '',
standalone: true,
imports: [RouterTestingModule, MatSnackBarModule],
})
class TosBannerStubComponent {}

@Component({ selector: 'app-sitewide-notifications', template: '' })
@Component({
selector: 'app-sitewide-notifications',
template: '',
standalone: true,
imports: [RouterTestingModule, MatSnackBarModule],
})
class NotificationStubComponent {}

describe('AppComponent', () => {
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent,
declarations: [RouterLinkStubDirective, RouterOutletStubComponent],
imports: [
RouterTestingModule,
MatLegacyDialogModule,
MatSnackBarModule,
HttpClientTestingModule,
NavbarStubComponent,
FooterStubComponent,
BannerStubComponent,
RouterLinkStubDirective,
RouterOutletStubComponent,
TosBannerStubComponent,
NotificationStubComponent,
AppComponent,
],
imports: [RouterTestingModule, MatSnackBarModule],
providers: [
{ provide: TrackLoginService, useClass: TrackLoginStubService },
{ provide: TosBannerService, useClass: TosBannerStubService },
{ provide: AuthService, useClass: AuthStubService },
{ provide: Configuration, useClass: ConfigurationStub },
{ provide: ContainerService, useClass: ContainerStubService },
{ provide: ServiceInfoService, useClass: GA4GHV20StubService },
{ provide: DateService, useClass: DateStubService },
{ provide: ProviderService, useClass: ProviderStubService },
{ provide: DescriptorLanguageService, useClass: DescriptorLanguageStubService },
{ provide: UrlResolverService, useClass: UrlResolverStubService },
{ provide: UsersService, useClass: UsersStubService },
{ provide: LogoutService, useClass: LogoutStubService },
MyEntriesStateService,
MyEntriesStore,
MytoolsService,
MyWorkflowsService,
PagenumberService,
],
}).compileComponents();
})
Expand Down
23 changes: 21 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,40 @@
import { AsyncPipe, NgIf } from '@angular/common';
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import { ActivatedRoute, NavigationEnd, Router, RouterOutlet } from '@angular/router';
import { Observable, Subject } from 'rxjs';
import { filter, map, mergeMap, takeUntil } from 'rxjs/operators';
import { BannerComponent } from './banner/banner.component';
import { ChangeUsernameBannerComponent } from './changeUsernameBanner/changeUsernameBanner.component';
import { FooterComponent } from './footer/footer.component';
import { NavbarComponent } from './navbar/navbar.component';
import { SitewideNotificationsComponent } from './notifications/sitewide-notifications.component';
import { AlertService } from './shared/alert/state/alert.service';
import { currentPrivacyPolicyVersion, currentTOSVersion } from './shared/constants';
import { Dockstore } from './shared/dockstore.model';
import { User } from './shared/openapi/model/user';
import { TrackLoginService } from './shared/track-login.service';
import { TosBannerQuery } from './tosBanner/state/tos-banner.query';
import { UserQuery } from './shared/user/user.query';
import { TosBannerQuery } from './tosBanner/state/tos-banner.query';
import { TosBannerService } from './tosBanner/state/tos-banner.service';
import { TosBannerComponent } from './tosBanner/tos-banner.component';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
standalone: true,
imports: [
NgIf,
TosBannerComponent,
ChangeUsernameBannerComponent,
SitewideNotificationsComponent,
BannerComponent,
NavbarComponent,
RouterOutlet,
FooterComponent,
AsyncPipe,
],
})
export class AppComponent implements OnInit, OnDestroy {
public isLoggedIn$: Observable<boolean>;
Expand Down
Loading

0 comments on commit 8354d78

Please sign in to comment.