Skip to content

Commit 48486dc

Browse files
committed
test: limit app to group
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
1 parent 7bd91a3 commit 48486dc

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

cypress/e2e/settings/apps.cy.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,32 @@ describe('Settings: App management', { testIsolation: true }, () => {
142142
cy.get('#app-sidebar-vue').contains(/Version \d+\.\d+\.\d+/).should('be.visible')
143143
})
144144

145+
it('Limit app usage to group', () => {
146+
// When I open the "Active apps" section
147+
cy.get('#app-category-enabled a')
148+
.should('contain', 'Active apps')
149+
.click({ force: true })
150+
// Then I see that the current section is "Active apps"
151+
cy.url().should('match', /settings\/apps\/enabled$/)
152+
cy.get('#app-category-enabled').find('.active').should('exist')
153+
// Then I select the app
154+
cy.get('#apps-list')
155+
.should('exist')
156+
.contains('tr', 'Dashboard', { timeout: 10000 })
157+
.click()
158+
// Then I enable "limit app to group"
159+
cy.get('[for="groups_enable_dashboard"]').click()
160+
// Then I select a group
161+
cy.get('#limitToGroups').click()
162+
cy.get('ul[role="listbox"]')
163+
.find('span')
164+
.contains('admin')
165+
.click()
166+
cy.get('span.name-parts__first')
167+
.contains('admin')
168+
.should('be.visible')
169+
})
170+
145171
/*
146172
* TODO: Improve testing with app store as external API
147173
* The following scenarios require the files_antivirus and calendar app

0 commit comments

Comments
 (0)