Skip to content

Commit

Permalink
adding e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
cstns committed Aug 28, 2024
1 parent 7f981c0 commit d9283e4
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions test/e2e/frontend/cypress/tests/applications/overview.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,65 @@ describe('FlowForge - Applications', () => {
})
})

it('doesn\'t display the instance kebab menu for non-owner users', () => {
cy.intercept(
'GET',
'/api/*/teams/*/user',
{ role: 30 }
).as('getTeamRole')
cy.intercept(
'GET',
'/api/*/teams/*/applications/status*',
{ count: 1, applications: [{ id: 'some-id', instances: [], devices: [] }] }
).as('getAppStatuses')
cy.intercept('get', '/api/*/applications/*/devices*', {
meta: {},
count: 0,
devices: []
}).as('getDevices')
cy.intercept(
'GET',
'/api/*/teams/*/applications*',
req => req.reply(res => {
res.send({
count: 1,
applications: [
{
id: 'some-id',
name: 'My app',
description: 'My empty app description',
instancesSummary: {
instances: [
{
id: 1,
name: 'instance-1',
meta: {
versions: {
launcher: '2.3.1'
},
state: 'running'
},
url: 'https://www.google.com:123/search?q=rick+astley'
}
]
},
devicesSummary: {
devices: [
]
}
}
]
})
})
).as('getApplication')

cy.visit('/')
cy.wait('@getTeamRole')
cy.wait('@getDevices')

cy.get('[data-el="kebab-menu"]').should('not.exist')
})

describe('can search through', () => {
it('applications', () => {
cy.intercept(
Expand Down

0 comments on commit d9283e4

Please sign in to comment.