From 20146bdcefd7f06d3bfc6583467585e7f37042b1 Mon Sep 17 00:00:00 2001 From: Kuno Vercammen Date: Thu, 2 May 2024 11:47:12 +0200 Subject: [PATCH] 114599: Updated the e2e tests so they succeed --- cypress/e2e/collection-create.cy.ts | 4 ++-- cypress/e2e/community-create.cy.ts | 2 +- .../create-collection-page.component.ts | 7 ++++--- .../create-community-page.component.ts | 2 -- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/cypress/e2e/collection-create.cy.ts b/cypress/e2e/collection-create.cy.ts index bd0aa7c64e..29f7dd5cac 100644 --- a/cypress/e2e/collection-create.cy.ts +++ b/cypress/e2e/collection-create.cy.ts @@ -1,5 +1,5 @@ beforeEach(() => { - cy.visit('/collections/create'); + cy.visit('/collections/create?parent='.concat(Cypress.env('DSPACE_TEST_COMMUNITY'))); cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); }); @@ -9,5 +9,5 @@ it('should show loading component while saving', () => { cy.get('button[type="submit"]').click(); - cy.get('ds-themed-loading').should('be.visible'); + cy.get('ds-loading').should('be.visible'); }); diff --git a/cypress/e2e/community-create.cy.ts b/cypress/e2e/community-create.cy.ts index e727a67be5..96bc003ba2 100644 --- a/cypress/e2e/community-create.cy.ts +++ b/cypress/e2e/community-create.cy.ts @@ -9,5 +9,5 @@ it('should show loading component while saving', () => { cy.get('button[type="submit"]').click(); - cy.get('ds-themed-loading').should('be.visible'); + cy.get('ds-loading').should('be.visible'); }); diff --git a/src/app/collection-page/create-collection-page/create-collection-page.component.ts b/src/app/collection-page/create-collection-page/create-collection-page.component.ts index 8017cb0245..a26bc9d6f8 100644 --- a/src/app/collection-page/create-collection-page/create-collection-page.component.ts +++ b/src/app/collection-page/create-collection-page/create-collection-page.component.ts @@ -1,4 +1,7 @@ -import { AsyncPipe, NgIf } from '@angular/common'; +import { + AsyncPipe, + NgIf, +} from '@angular/common'; import { Component } from '@angular/core'; import { Router } from '@angular/router'; import { @@ -16,7 +19,6 @@ import { CreateComColPageComponent } from '../../shared/comcol/comcol-forms/crea import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { CollectionFormComponent } from '../collection-form/collection-form.component'; -import { LoadingComponent } from '../../../themes/custom/app/shared/loading/loading.component'; /** * Component that represents the page where a user can create a new Collection @@ -30,7 +32,6 @@ import { LoadingComponent } from '../../../themes/custom/app/shared/loading/load TranslateModule, AsyncPipe, ThemedLoadingComponent, - LoadingComponent, NgIf, ], standalone: true, diff --git a/src/app/community-page/create-community-page/create-community-page.component.ts b/src/app/community-page/create-community-page/create-community-page.component.ts index da24af1ea1..082f6c4f0b 100644 --- a/src/app/community-page/create-community-page/create-community-page.component.ts +++ b/src/app/community-page/create-community-page/create-community-page.component.ts @@ -19,7 +19,6 @@ import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.comp import { NotificationsService } from '../../shared/notifications/notifications.service'; import { VarDirective } from '../../shared/utils/var.directive'; import { CommunityFormComponent } from '../community-form/community-form.component'; -import { LoadingComponent } from '../../../themes/custom/app/shared/loading/loading.component'; /** * Component that represents the page where a user can create a new Community @@ -35,7 +34,6 @@ import { LoadingComponent } from '../../../themes/custom/app/shared/loading/load NgIf, AsyncPipe, ThemedLoadingComponent, - LoadingComponent, ], standalone: true, })