diff --git a/ui/cypress/e2e/collectors.test.ts b/ui/cypress/e2e/collectors.test.ts index b55daf8bf1..75dd612b40 100644 --- a/ui/cypress/e2e/collectors.test.ts +++ b/ui/cypress/e2e/collectors.test.ts @@ -80,7 +80,7 @@ describe('Collectors', () => { cy.getByTestID('collector-card--name').should('contain', newConfigName) }) - it.skip('can delete a telegraf config', () => { + it('can delete a telegraf config', () => { const telegrafConfigName = 'New Config' const description = 'Config Description' @@ -89,13 +89,38 @@ describe('Collectors', () => { cy.createTelegraf(telegrafConfigName, description, id) }) - cy.getByTestID('table-row').should('have.length', 2) + cy.getByTestID('resource-card').should('have.length', 2) - cy.getByTestID('confirmation-button') + cy.getByTestID('context-menu') .last() .click({force: true}) - cy.getByTestID('table-row').should('have.length', 1) + cy.getByTestID('context-menu-item') + .last() + .click({force: true}) + + cy.getByTestID('resource-card').should('have.length', 1) + }) + + it('can view setup instructions for a config', () => { + const telegrafConfigName = 'New Config' + const description = 'Config Description' + + cy.get('@org').then(({id}) => { + cy.createTelegraf(telegrafConfigName, description, id) + }) + + cy.getByTestID('resource-card').should('have.length', 1) + + cy.getByTestID('setup-instructions-link').click() + + cy.getByTestID('setup-instructions').should('exist') + + cy.getByTestID('overlay--header') + .find('button') + .click() + + cy.getByTestID('setup-instructions').should('not.exist') }) }) }) diff --git a/ui/src/dataLoaders/components/verifyStep/TelegrafInstructions.tsx b/ui/src/dataLoaders/components/verifyStep/TelegrafInstructions.tsx index 3342f4b7aa..71e071afb6 100644 --- a/ui/src/dataLoaders/components/verifyStep/TelegrafInstructions.tsx +++ b/ui/src/dataLoaders/components/verifyStep/TelegrafInstructions.tsx @@ -22,7 +22,7 @@ class TelegrafInstructions extends PureComponent { this.origin }/api/v2/telegrafs/${configID || ''}` return ( -
+
1. Install the Latest Telegraf

You can install the latest Telegraf by visiting the{' '} diff --git a/ui/src/dataLoaders/components/verifyStep/__snapshots__/TelegrafInstructions.test.tsx.snap b/ui/src/dataLoaders/components/verifyStep/__snapshots__/TelegrafInstructions.test.tsx.snap index 6d8a599999..37cf1c7c19 100644 --- a/ui/src/dataLoaders/components/verifyStep/__snapshots__/TelegrafInstructions.test.tsx.snap +++ b/ui/src/dataLoaders/components/verifyStep/__snapshots__/TelegrafInstructions.test.tsx.snap @@ -3,6 +3,7 @@ exports[`TelegrafInstructions matches snapshot 1`] = `

1. Install the Latest Telegraf diff --git a/ui/src/telegrafs/components/CollectorCard.tsx b/ui/src/telegrafs/components/CollectorCard.tsx index 8a337f9906..f84edc961c 100644 --- a/ui/src/telegrafs/components/CollectorCard.tsx +++ b/ui/src/telegrafs/components/CollectorCard.tsx @@ -77,7 +77,12 @@ class CollectorRow extends PureComponent { metaData={[ <>Bucket: {bucket}, <> - + Setup Instructions , diff --git a/ui/src/telegrafs/components/TelegrafInstructionsOverlay.tsx b/ui/src/telegrafs/components/TelegrafInstructionsOverlay.tsx index 4015972411..40aa2b4c94 100644 --- a/ui/src/telegrafs/components/TelegrafInstructionsOverlay.tsx +++ b/ui/src/telegrafs/components/TelegrafInstructionsOverlay.tsx @@ -83,7 +83,7 @@ export class TelegrafInstructionsOverlay extends PureComponent< collectorID: null, }) - router.push(`/orgs/${orgID}/telegrafs/`) + router.push(`/orgs/${orgID}/load-data/telegrafs/`) } }