aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/src/components/Rule.vue
Commit message (Expand)AuthorAgeFilesLines
* refactor(styles): Adjust code style in SCSS sources to match our stylelint co...Ferdinand Thiessen2024-11-191-0/+3
* fix: Adjust more places for logical positionFerdinand Thiessen2024-08-291-4/+4
* feat: Add bidi support in core directoryMostafa Ahangarha2024-08-291-6/+6
* chore: Enable ESLint for apps and fix all errorsFerdinand Thiessen2024-07-091-1/+1
* chore: Add SPDX headerAndy Scherzinger2024-05-311-0/+4
* fix(workflowengine): Fix multiple UI issues in workflow engine admin settingsJoas Schilling2023-05-101-3/+7
* chore(eslint): fix missing import extensionsJohn Molakvoæ2023-03-231-7/+7
* Add Nc prefix to Nc vue component namesVincent Petry2022-08-251-10/+18
* Bump @nextcloud/vue to 6.0.0-beta.3 and relatedVincent Petry2022-08-251-8/+8
* add vue button component in workflow rule.vueVanessa Pertsch2022-05-121-42/+27
* Fix eslint and update bundlesJohn Molakvoæ (skjnldsv)2021-07-221-1/+7
* fix event icon sizes and text alignmentArthur Schiwon2020-08-211-3/+4
* Fix workflow UIJoas Schilling2020-04-231-3/+3
* Migrate to @nextcloud/vue 1.x.xJohn Molakvoæ (skjnldsv)2020-01-221-3/+3
* Fallback to proper default valuesJulius Härtl2020-01-091-1/+1
* Refactor validity propagationJulius Härtl2020-01-021-15/+10
* Fix spacing between text and iconJulius Härtl2019-12-271-2/+4
* Autofocus new filter and display proper error messagesJulius Härtl2019-12-271-3/+10
* Bump eslint-config-nextcloud from 0.0.6 to 0.1.0dependabot-preview[bot]2019-12-191-9/+9
* Add cancel button to restore previously saved ruleJulius Härtl2019-11-261-4/+15
* Small fixes for workflow frontendJulius Härtl2019-11-261-2/+5
* Design fixesJulius Härtl2019-10-291-0/+1
* Move delete/cancel button to the bottomJulius Härtl2019-10-291-24/+23
* Fix issue with unavailable operationsJulius Härtl2019-10-291-1/+1
* Properly validate individual checksJulius Härtl2019-10-291-1/+1
* Comply to eslintJohn Molakvoæ (skjnldsv)2019-10-011-5/+14
* Implement custom check components and fix lintingJulius Härtl2019-09-101-5/+5
* Frontend polishingJulius Härtl2019-09-101-4/+6
* Move over checker pluginsJulius Härtl2019-09-101-1/+3
* Load checks from the backendJulius Härtl2019-09-101-1/+1
* Fix removing checksJulius Härtl2019-09-101-3/+4
* Make rule listing more compactJulius Härtl2019-09-101-2/+2
* Allow placeholder and validation without custom vue componentJulius Härtl2019-09-101-2/+2
* Handle operator registration properlyJulius Härtl2019-09-101-9/+30
* Migrate plugins to vuex storeJulius Härtl2019-09-101-3/+5
* Move to vuex storeJulius Härtl2019-09-101-107/+109
* Adjust to new backend URLsJulius Härtl2019-09-101-16/+22
* Styling fixesJulius Härtl2019-09-101-1/+1
* Use entity/event definitions from backendJulius Härtl2019-09-101-2/+6
* Unified workflow managementJulius Härtl2019-09-101-0/+209
lass="p">; class SignAppTest extends TestCase { /** @var Checker|\PHPUnit_Framework_MockObject_MockObject */ private $checker; /** @var SignApp */ private $signApp; /** @var FileAccessHelper|\PHPUnit_Framework_MockObject_MockObject */ private $fileAccessHelper; /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ private $urlGenerator; public function setUp() { parent::setUp(); $this->checker = $this->createMock(Checker::class); $this->fileAccessHelper = $this->createMock(FileAccessHelper::class); $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->signApp = new SignApp( $this->checker, $this->fileAccessHelper, $this->urlGenerator ); } public function testExecuteWithMissingPath() { $inputInterface = $this->createMock(InputInterface::class); $outputInterface = $this->createMock(OutputInterface::class); $inputInterface ->expects($this->at(0)) ->method('getOption') ->with('path') ->will($this->returnValue(null)); $inputInterface ->expects($this->at(1)) ->method('getOption') ->with('privateKey') ->will($this->returnValue('PrivateKey')); $inputInterface ->expects($this->at(2)) ->method('getOption') ->with('certificate') ->will($this->returnValue('Certificate')); $outputInterface ->expects($this->at(0)) ->method('writeln') ->with('This command requires the --path, --privateKey and --certificate.'); $this->assertNull(self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithMissingPrivateKey() { $inputInterface = $this->createMock(InputInterface::class); $outputInterface = $this->createMock(OutputInterface::class); $inputInterface ->expects($this->at(0)) ->method('getOption') ->with('path') ->will($this->returnValue('AppId')); $inputInterface ->expects($this->at(1)) ->method('getOption') ->with('privateKey') ->will($this->returnValue(null)); $inputInterface ->expects($this->at(2)) ->method('getOption') ->with('certificate') ->will($this->returnValue('Certificate')); $outputInterface ->expects($this->at(0)) ->method('writeln') ->with('This command requires the --path, --privateKey and --certificate.'); $this->assertNull(self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithMissingCertificate() { $inputInterface = $this->createMock(InputInterface::class); $outputInterface = $this->createMock(OutputInterface::class); $inputInterface ->expects($this->at(0)) ->method('getOption') ->with('path') ->will($this->returnValue('AppId')); $inputInterface ->expects($this->at(1)) ->method('getOption') ->with('privateKey') ->will($this->returnValue('privateKey')); $inputInterface ->expects($this->at(2)) ->method('getOption') ->with('certificate') ->will($this->returnValue(null)); $outputInterface ->expects($this->at(0)) ->method('writeln') ->with('This command requires the --path, --privateKey and --certificate.'); $this->assertNull(self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithNotExistingPrivateKey() { $inputInterface = $this->createMock(InputInterface::class); $outputInterface = $this->createMock(OutputInterface::class); $inputInterface ->expects($this->at(0)) ->method('getOption') ->with('path') ->will($this->returnValue('AppId')); $inputInterface ->expects($this->at(1)) ->method('getOption') ->with('privateKey') ->will($this->returnValue('privateKey')); $inputInterface ->expects($this->at(2)) ->method('getOption') ->with('certificate') ->will($this->returnValue('certificate')); $this->fileAccessHelper ->expects($this->at(0)) ->method('file_get_contents') ->with('privateKey') ->will($this->returnValue(false)); $outputInterface ->expects($this->at(0)) ->method('writeln') ->with('Private key "privateKey" does not exists.'); $this->assertNull(self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithNotExistingCertificate() { $inputInterface = $this->createMock(InputInterface::class); $outputInterface = $this->createMock(OutputInterface::class); $inputInterface ->expects($this->at(0)) ->method('getOption') ->with('path') ->will($this->returnValue('AppId')); $inputInterface ->expects($this->at(1)) ->method('getOption') ->with('privateKey') ->will($this->returnValue('privateKey')); $inputInterface ->expects($this->at(2)) ->method('getOption') ->with('certificate') ->will($this->returnValue('certificate')); $this->fileAccessHelper ->expects($this->at(0)) ->method('file_get_contents') ->with('privateKey') ->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/core.key')); $this->fileAccessHelper ->expects($this->at(1)) ->method('file_get_contents') ->with('certificate') ->will($this->returnValue(false)); $outputInterface ->expects($this->at(0)) ->method('writeln') ->with('Certificate "certificate" does not exists.'); $this->assertNull(self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); } public function testExecuteWithException() { $inputInterface = $this->createMock(InputInterface::class); $outputInterface = $this->createMock(OutputInterface::class); $inputInterface ->expects($this->at(0)) ->method('getOption') ->with('path') ->will($this->returnValue('AppId')); $inputInterface ->expects($this->at(1)) ->method('getOption') ->with('privateKey') ->will($this->returnValue('privateKey')); $inputInterface ->expects($this->at(2)) ->method('getOption') ->with('certificate') ->will($this->returnValue('certificate')); $this->fileAccessHelper ->expects($this->at(0)) ->method('file_get_contents') ->with('privateKey') ->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/core.key')); $this->fileAccessHelper ->expects($this->at(1)) ->method('file_get_contents') ->with('certificate') ->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/core.crt')); $this->checker ->expects($this->once()) ->method('writeAppSignature') ->willThrowException(new \Exception('My error message')); $outputInterface ->expects($this->at(0)) ->method('writeln') ->with('Error: My error message'); $this->assertSame(1, self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); } public function testExecute() { $inputInterface = $this->createMock(InputInterface::class); $outputInterface = $this->createMock(OutputInterface::class); $inputInterface ->expects($this->at(0)) ->method('getOption') ->with('path') ->will($this->returnValue('AppId')); $inputInterface ->expects($this->at(1)) ->method('getOption') ->with('privateKey') ->will($this->returnValue('privateKey')); $inputInterface ->expects($this->at(2)) ->method('getOption') ->with('certificate') ->will($this->returnValue('certificate')); $this->fileAccessHelper ->expects($this->at(0)) ->method('file_get_contents') ->with('privateKey') ->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/core.key')); $this->fileAccessHelper ->expects($this->at(1)) ->method('file_get_contents') ->with('certificate') ->will($this->returnValue(\OC::$SERVERROOT . '/tests/data/integritycheck/core.crt')); $this->checker ->expects($this->once()) ->method('writeAppSignature'); $outputInterface ->expects($this->at(0)) ->method('writeln') ->with('Successfully signed "AppId"'); $this->assertSame(0, self::invokePrivate($this->signApp, 'execute', [$inputInterface, $outputInterface])); } }