94060: hopefully fix cypress tests

This commit is contained in:
lotte
2022-09-30 13:38:30 +02:00
parent 9f1749e1ee
commit 7a52b69573
4 changed files with 7 additions and 7 deletions

View File

@@ -107,7 +107,7 @@ describe('My DSpace page', () => {
cy.get('[data-dismiss="alert"]').click({multiple: true}); cy.get('[data-dismiss="alert"]').click({multiple: true});
// This is the GET command that will actually run the search // This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results'); cy.intercept('GET', '/server/api/discover/search/objects**').as('search-results');
// On MyDSpace, find the submission we just created via its ID // On MyDSpace, find the submission we just created via its ID
cy.get('[data-test="search-box"]').type(id); cy.get('[data-test="search-box"]').type(id);
cy.get('[data-test="search-button"]').click(); cy.get('[data-test="search-button"]').click();

View File

@@ -22,7 +22,7 @@ describe('Search from Navigation Bar', () => {
it('should go to search page with correct query if submitted (from home)', () => { it('should go to search page with correct query if submitted (from home)', () => {
cy.visit('/'); cy.visit('/');
// This is the GET command that will actually run the search // This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results'); cy.intercept('GET', '/server/api/discover/search/objects**').as('search-results');
// Run the search // Run the search
page.fillOutQueryInNavBar(query); page.fillOutQueryInNavBar(query);
page.submitQueryByPressingEnter(); page.submitQueryByPressingEnter();
@@ -37,7 +37,7 @@ describe('Search from Navigation Bar', () => {
it('should go to search page with correct query if submitted (from search)', () => { it('should go to search page with correct query if submitted (from search)', () => {
cy.visit('/search'); cy.visit('/search');
// This is the GET command that will actually run the search // This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results'); cy.intercept('GET', '/server/api/discover/search/objects**').as('search-results');
// Run the search // Run the search
page.fillOutQueryInNavBar(query); page.fillOutQueryInNavBar(query);
page.submitQueryByPressingEnter(); page.submitQueryByPressingEnter();
@@ -52,7 +52,7 @@ describe('Search from Navigation Bar', () => {
it('should allow user to also submit query by clicking icon', () => { it('should allow user to also submit query by clicking icon', () => {
cy.visit('/'); cy.visit('/');
// This is the GET command that will actually run the search // This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results'); cy.intercept('GET', '/server/api/discover/search/objects**').as('search-results');
// Run the search // Run the search
page.fillOutQueryInNavBar(query); page.fillOutQueryInNavBar(query);
page.submitQueryByPressingIcon(); page.submitQueryByPressingIcon();

View File

@@ -77,7 +77,7 @@ describe('New Submission page', () => {
cy.get('[data-dismiss="alert"]').click({multiple: true}); cy.get('[data-dismiss="alert"]').click({multiple: true});
// This is the GET command that will actually run the search // This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results'); cy.intercept('GET', '/server/api/discover/search/objects**').as('search-results');
// On MyDSpace, find the submission we just saved via its ID // On MyDSpace, find the submission we just saved via its ID
cy.get('[data-test="search-box"]').type(id); cy.get('[data-test="search-box"]').type(id);
cy.get('[data-test="search-button"]').click(); cy.get('[data-test="search-button"]').click();

View File

@@ -8,13 +8,13 @@
[placeholder]="'thumbnail.person.placeholder'"> [placeholder]="'thumbnail.person.placeholder'">
</ds-thumbnail> </ds-thumbnail>
</a> </a>
<div *ngIf="linkType == linkTypes.None" class="dont-break-out"> <span *ngIf="linkType == linkTypes.None" class="dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" <ds-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/person-placeholder.svg'" [defaultImage]="'assets/images/person-placeholder.svg'"
[alt]="'thumbnail.person.alt'" [alt]="'thumbnail.person.alt'"
[placeholder]="'thumbnail.person.placeholder'"> [placeholder]="'thumbnail.person.placeholder'">
</ds-thumbnail> </ds-thumbnail>
</div> </span>
</div> </div>
<div [ngClass]="showThumbnails ? 'col-9' : 'col-md-12'"> <div [ngClass]="showThumbnails ? 'col-9' : 'col-md-12'">
<div class="d-flex"> <div class="d-flex">