From bc75b69b974ff7f525f9ae52f76e49442404a4f7 Mon Sep 17 00:00:00 2001 From: Charles Overbeck Date: Fri, 20 Dec 2024 17:08:50 -0800 Subject: [PATCH] More test fixings. --- cypress/e2e/group2/notebooks.ts | 8 ++++---- cypress/e2e/immutableDatabaseTests/notebooks.ts | 6 +++--- cypress/e2e/immutableDatabaseTests/workflowDetails.ts | 4 ++-- cypress/support/commands.ts | 4 ++-- src/app/container/container.component.html | 9 +-------- 5 files changed, 12 insertions(+), 19 deletions(-) diff --git a/cypress/e2e/group2/notebooks.ts b/cypress/e2e/group2/notebooks.ts index 7792823c52..230ed5349d 100644 --- a/cypress/e2e/group2/notebooks.ts +++ b/cypress/e2e/group2/notebooks.ts @@ -26,10 +26,10 @@ describe('Dockstore notebooks', () => { it('should have /notebooks/ page for single notebook', () => { cy.visit('/notebooks/' + name); // Check the labels on the tabs. - cy.get('.mat-tab-list').contains('Info'); - cy.get('.mat-tab-list').contains('Preview'); - cy.get('.mat-tab-list').contains('Versions'); - cy.get('.mat-tab-list').contains('Files'); + cy.get('.mat-mdc-tab-list').contains('Info'); + cy.get('.mat-mdc-tab-list').contains('Preview'); + cy.get('.mat-mdc-tab-list').contains('Versions'); + cy.get('.mat-mdc-tab-list').contains('Files'); // Should initially display the Info tab. // Check for some key information. cy.contains(name); diff --git a/cypress/e2e/immutableDatabaseTests/notebooks.ts b/cypress/e2e/immutableDatabaseTests/notebooks.ts index b95bdd9214..f3a75cc45a 100644 --- a/cypress/e2e/immutableDatabaseTests/notebooks.ts +++ b/cypress/e2e/immutableDatabaseTests/notebooks.ts @@ -22,7 +22,7 @@ describe('Notebooks Pages', () => { cy.visit('/notebooks'); cy.url().should('contain', 'notebooks'); cy.get('[data-cy=header]').contains('h3', 'Notebooks'); - cy.contains('Search notebooks'); + cy.get('input[placeholder="Search notebooks"]'); cy.contains('Format'); cy.contains('Language'); }); @@ -43,12 +43,12 @@ describe('Notebooks Pages', () => { describe('Notebooks should be visible', () => { it('should be included in search', () => { cy.visit('/search?entryType=notebooks&searchMode=files¬ebooks'); - cy.contains('.mat-tab-label', 'Notebooks'); + cy.contains('.mat-mdc-tab', 'Notebooks'); }); it('should exist on starred page', () => { cy.visit('/starred?tab=notebooks'); - cy.contains('.mat-tab-label', 'Notebooks'); + cy.contains('.mat-mdc-tab', 'Notebooks'); }); it('should exist on dashboard', () => { diff --git a/cypress/e2e/immutableDatabaseTests/workflowDetails.ts b/cypress/e2e/immutableDatabaseTests/workflowDetails.ts index 903792c482..0c6b2420e2 100644 --- a/cypress/e2e/immutableDatabaseTests/workflowDetails.ts +++ b/cypress/e2e/immutableDatabaseTests/workflowDetails.ts @@ -99,7 +99,7 @@ describe('Dockstore Workflow Details', () => { describe('Change tab to Executions', () => { it('Should see No Metrics banner', () => { cy.visit('/workflows/github.com/A/l'); - cy.get('.mat-tab-label').should('have.length', 7); + cy.get('.mat-mdc-tab').should('have.length', 7); goToTab('Metrics'); cy.url().should('eq', Cypress.config().baseUrl + '/workflows/github.com/A/l:master?tab=metrics'); cy.get('[data-cy=no-metrics-banner]').should('be.visible'); @@ -143,7 +143,7 @@ describe('Test bble', () => { goToTab('Files'); cy.get('[data-cy=primary-descriptor-bubble]').should('be.visible'); cy.get('mat-form-field').click(); - cy.contains('.mat-option-text', 'arguments.cwl').click(); + cy.contains('mat-option', 'arguments.cwl').click(); cy.get('[data-cy=primary-descriptor-bubble]').should('not.exist'); cy.get('[data-cy=go-to-primary-icon]').should('be.visible').click(); cy.get('[data-cy=primary-descriptor-bubble]').should('be.visible'); diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 43ec16dc01..0c1c4dd8f3 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -25,7 +25,7 @@ export function goToTab(tabName: string): void { } export function assertVisibleTab(tabName: string): void { - cy.get('.mat-tab-labels').should('be.visible').contains('div', tabName).should('be.visible'); + cy.get('.mdc-tab').should('be.visible').contains('div', tabName).should('be.visible'); } /** @@ -49,7 +49,7 @@ export function clickFirstActionsButtonPrivate(): void { } export function isActiveTab(tabName: string): void { - cy.contains('.mat-tab-label', tabName).should('have.class', 'mat-tab-label-active'); + cy.contains('.mat-mdc-tab', tabName).should('have.class', 'mat-mdc-focus-indicator'); } export function assertNoTab(tabName: string): any { diff --git a/src/app/container/container.component.html b/src/app/container/container.component.html index 89dba903bb..51ff565e76 100644 --- a/src/app/container/container.component.html +++ b/src/app/container/container.component.html @@ -340,14 +340,7 @@

Docker Pull Command
- +