-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #731 from nextcloud-libraries/test/docker-commands
test cy.runCommand and cy.runOccCommand
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | ||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:') | ||
}) | ||
}) |