Skip to content

Commit

Permalink
test(cy): cy.runCommand and cy.runOccCommand
Browse files Browse the repository at this point in the history
Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud committed Jan 8, 2025
1 parent 96ddd91 commit fed018f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cypress/e2e/docker.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

describe('Run command', function() {

it('yields the output as stdout', function() {
cy.runCommand('ls')
.its('stdout')
.should('contain', 'data')
})

it('hands on the env', function() {
cy.runCommand('env', { env: { DATA: 'Hello' } })
.its('stdout')
.should('contain', 'DATA')
.should('contain', 'Hello')
})

})
14 changes: 14 additions & 0 deletions cypress/e2e/occ.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

describe('Run occ command', function() {
it('yields the output as stdout', function() {
cy.runOccCommand('app:list')
.its('stdout')
.should('contain', 'Enabled:')
.should('contain', 'files:')
.should('contain', 'settings:')
})
})

0 comments on commit fed018f

Please sign in to comment.