cy.createCollection(adminUser.token, {
name: colName,
owner_uuid: activeUser.user.uuid,
cy.createCollection(adminUser.token, {
name: colName,
owner_uuid: activeUser.user.uuid,
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"})
.as('originalVersion').then(function() {
// Change the file name to create a new version.
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"})
.as('originalVersion').then(function() {
// Change the file name to create a new version.
// Search for only collection's current version
cy.visit(`/search-results?q=${encodeURIComponent(searchQuery)}`);
cy.get('[data-cy=search-results]').should('contain', 'head version');
// Search for only collection's current version
cy.visit(`/search-results?q=${encodeURIComponent(searchQuery)}`);
cy.get('[data-cy=search-results]').should('contain', 'head version');
// ...and then, include old versions.
cy.visit(`/search-results?q=${encodeURIComponent(searchQuery + ' is:pastVersion')}`);
cy.get('[data-cy=search-results]').should('contain', 'head version');
// ...and then, include old versions.
cy.visit(`/search-results?q=${encodeURIComponent(searchQuery + ' is:pastVersion')}`);
cy.get('[data-cy=search-results]').should('contain', 'head version');