Skip to content

Commit

Permalink
Fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSCorey committed Aug 26, 2024
1 parent b69871a commit db6d8bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
15 changes: 3 additions & 12 deletions cypress/e2e/hub/collections-detail.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ describe('Collections Details', () => {
`/collections/validated/${namespace.name}/${collectionName}/details?version=1.0.0`
);
cy.selectDetailsPageKebabAction('delete-version-from-system');
cy.clickButton(/^Close$/);
//Verify the version has been deleted
cy.navigateTo('hub', Collections.url);
cy.getByDataCy('table-view').click();
cy.filterTableBySingleText(collectionName, true);
cy.clickLink(collectionName);
Expand Down Expand Up @@ -227,30 +225,24 @@ describe('Collections Details', () => {
cy.clickButton(/^Close$/);
cy.getModal().should('not.exist');
// Verify collection has been deprecated
cy.contains('span', 'Deprecated');
cy.contains('span', 'Deprecated').should('exist');
// Undeprecate collection
cy.selectDetailsPageKebabAction('undeprecate-collection');
cy.clickButton(/^Close$/);
cy.getModal().should('not.exist');
// Verify collection has been undeprecated
cy.contains('span', 'Deprecated').should('not.exist');

// deprecate collection again
cy.selectDetailsPageKebabAction('deprecate-collection');
cy.clickButton(/^Close$/);
cy.getModal().should('not.exist');
// Verify collection has been deprecated
cy.contains('span', 'Deprecated');

cy.contains('a', namespace.name).click();
cy.contains(`[role="tab"]`, 'Collections').click();
cy.filterTableBySingleText(collectionName, true);
cy.get(`[aria-label="Simple table"]`).within(() => {
cy.contains('td', collectionName).click();
cy.contains('span', 'Deprecated');
});

cy.getByDataCy('table-view').click();
cy.selectTableRowByCheckbox('name', collectionName, true);

cy.get(`[aria-label="Simple table"]`).within(() => {
cy.getByDataCy('actions-dropdown').click();
});
Expand All @@ -265,7 +257,6 @@ describe('Collections Details', () => {
cy.getModal().should('not.exist');

cy.get(`[aria-label="Simple table"]`).within(() => {
cy.contains('td', collectionName).click();
cy.contains('span', 'Deprecated').should('not.exist');
});
cy.deleteHubCollectionByName(collectionName);
Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/hub/collections-list.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,10 @@ describe('Collections List', () => {
cy.get('[data-ouia-component-id="Permanently delete collections versions"]').within(() => {
cy.get('[data-ouia-component-id="confirm"]').click();
cy.get('[data-ouia-component-id="submit"]').click();
cy.clickButton(/^Close$/);
});
cy.deleteHubCollectionByName(collectionName);
}
);
cy.deleteHubCollectionByName(collectionName);
});

it('can copy a version to repository and then delete it from repository', () => {
Expand Down

0 comments on commit db6d8bf

Please sign in to comment.