diff --git a/ui/cypress/e2e/collectors.test.ts b/ui/cypress/e2e/collectors.test.ts index 730c2557756..e4f25d97ae2 100644 --- a/ui/cypress/e2e/collectors.test.ts +++ b/ui/cypress/e2e/collectors.test.ts @@ -48,7 +48,7 @@ describe('Collectors', () => { .click() }) - cy.getByTestID('table-row') + cy.getByTestID('resource-card') .should('have.length', 1) .and('contain', newConfig) }) @@ -63,10 +63,19 @@ describe('Collectors', () => { cy.createTelegraf(telegrafConfigName, description, id) }) - cy.getByTestID('table-cell').within(() => { - cy.getByTestID('editable-name').click() - cy.getByTestID('input-field').type(`${newConfigName}{enter}`) - }) + cy.getByTestID('collector-card--name') + .first() + .trigger('mouseover') + + cy.getByTestID('collector-card--name-button') + .first() + .click() + + cy.getByTestID('collector-card--input') + .type(newConfigName) + .type('{enter}') + + cy.getByTestID('collector-card--name').should('contain', newConfigName) }) it.skip('can delete a telegraf config', () => { diff --git a/ui/src/telegrafs/components/CollectorRow.tsx b/ui/src/telegrafs/components/CollectorCard.tsx similarity index 63% rename from ui/src/telegrafs/components/CollectorRow.tsx rename to ui/src/telegrafs/components/CollectorCard.tsx index 44c795b80ae..d6ed1ee029b 100644 --- a/ui/src/telegrafs/components/CollectorRow.tsx +++ b/ui/src/telegrafs/components/CollectorCard.tsx @@ -4,19 +4,9 @@ import {connect} from 'react-redux' import {withRouter, WithRouterProps} from 'react-router' // Components -import {IndexList, Alignment, ConfirmationButton} from 'src/clockface' -import { - ComponentSize, - Button, - ComponentColor, - ComponentSpacer, - FlexDirection, - JustifyContent, - AlignItems, -} from '@influxdata/clockface' +import {ResourceList, Context, IconFont} from 'src/clockface' +import {ComponentColor} from '@influxdata/clockface' import {ITelegraf as Telegraf, Organization} from '@influxdata/influx' -import EditableName from 'src/shared/components/EditableName' -import EditableDescription from 'src/shared/components/editable_description/EditableDescription' import InlineLabels from 'src/shared/components/inlineLabels/InlineLabels' // Actions @@ -63,52 +53,46 @@ class CollectorRow extends PureComponent { const {collector, bucket} = this.props return ( - <> - - - - - - {this.labels} - - - {bucket} - - -