Merge pull request #15448 from influxdata/zs-pagerduty-#15104
(test) Client URL optional PagerDutypull/15443/head^2
commit
a478e2c6f6
|
@ -57,29 +57,6 @@ describe('Notification Endpoints', () => {
|
|||
cy.contains('Slack')
|
||||
})
|
||||
|
||||
cy.getByTestID('endpoint--dropdown-item pagerduty').click()
|
||||
|
||||
cy.getByTestID('endpoint--dropdown--button').within(() => {
|
||||
cy.contains('Pagerduty')
|
||||
})
|
||||
})
|
||||
|
||||
cy.getByTestID('pagerduty-url')
|
||||
.clear()
|
||||
.type('many-faced-god.gov')
|
||||
.should('have.value', 'many-faced-god.gov')
|
||||
|
||||
cy.getByTestID('pagerduty-routing-key')
|
||||
.type('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9')
|
||||
.should('have.value', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9')
|
||||
|
||||
cy.getByTestID('endpoint-change--dropdown')
|
||||
.click()
|
||||
.within(() => {
|
||||
cy.getByTestID('endpoint--dropdown--button').within(() => {
|
||||
cy.contains('Pagerduty')
|
||||
})
|
||||
|
||||
cy.getByTestID('endpoint--dropdown-item http').click()
|
||||
|
||||
cy.getByTestID('endpoint--dropdown--button').within(() => {
|
||||
|
@ -117,6 +94,81 @@ describe('Notification Endpoints', () => {
|
|||
cy.getByTestID('endpoint--overlay').should('not.be.visible')
|
||||
})
|
||||
|
||||
it('can create a notification endpoint pager duty with client url', () => {
|
||||
const name = 'Pagerduty example'
|
||||
|
||||
cy.getByTestID('create-endpoint').click()
|
||||
|
||||
cy.getByTestID('endpoint-name--input')
|
||||
.clear()
|
||||
.type(name)
|
||||
.should('have.value', name)
|
||||
|
||||
cy.getByTestID('endpoint-change--dropdown')
|
||||
.click()
|
||||
.within(() => {
|
||||
cy.getByTestID('endpoint--dropdown--button').within(() => {
|
||||
cy.contains('Slack')
|
||||
})
|
||||
|
||||
cy.getByTestID('endpoint--dropdown-item pagerduty').click()
|
||||
|
||||
cy.getByTestID('endpoint--dropdown--button').within(() => {
|
||||
cy.contains('Pagerduty')
|
||||
})
|
||||
})
|
||||
|
||||
cy.getByTestID('pagerduty-url')
|
||||
.clear()
|
||||
.type('many-faced-god.gov')
|
||||
.should('have.value', 'many-faced-god.gov')
|
||||
|
||||
cy.getByTestID('pagerduty-routing-key')
|
||||
.type('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9')
|
||||
.should('have.value', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9')
|
||||
|
||||
cy.getByTestID('endpoint-save--button').click()
|
||||
|
||||
cy.getByTestID(`endpoint-card ${name}`).should('exist')
|
||||
cy.getByTestID('endpoint--overlay').should('not.be.visible')
|
||||
})
|
||||
|
||||
it('can create a notification endpoint pager duty without client url', () => {
|
||||
const name = 'Pagerduty url none'
|
||||
|
||||
cy.getByTestID('create-endpoint').click()
|
||||
|
||||
cy.getByTestID('endpoint-name--input')
|
||||
.clear()
|
||||
.type(name)
|
||||
.should('have.value', name)
|
||||
|
||||
cy.getByTestID('endpoint-change--dropdown')
|
||||
.click()
|
||||
.within(() => {
|
||||
cy.getByTestID('endpoint--dropdown--button').within(() => {
|
||||
cy.contains('Slack')
|
||||
})
|
||||
|
||||
cy.getByTestID('endpoint--dropdown-item pagerduty').click()
|
||||
|
||||
cy.getByTestID('endpoint--dropdown--button').within(() => {
|
||||
cy.contains('Pagerduty')
|
||||
})
|
||||
})
|
||||
|
||||
cy.getByTestID('pagerduty-url').clear()
|
||||
|
||||
cy.getByTestID('pagerduty-routing-key')
|
||||
.type('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9')
|
||||
.should('have.value', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9')
|
||||
|
||||
cy.getByTestID('endpoint-save--button').click()
|
||||
|
||||
cy.getByTestID(`endpoint-card ${name}`).should('exist')
|
||||
cy.getByTestID('endpoint--overlay').should('not.be.visible')
|
||||
})
|
||||
|
||||
it('can edit a notification endpoint', () => {
|
||||
cy.get<SlackNotificationEndpoint>('@endpoint').then(endpoint => {
|
||||
const {name, description, url} = endpoint
|
||||
|
|
Loading…
Reference in New Issue