@@ -314,6 +314,15 @@ public static function passwordProtectByTalkCheckbox() {
314314 describedAs ("Password protect by Talk checkbox in the details view in Files app " );
315315 }
316316
317+ /**
318+ * @return Locator
319+ */
320+ public static function passwordProtectByTalkCheckboxInput () {
321+ return Locator::forThe ()->checkbox ("Password protect by Talk " )->
322+ descendantOf (self ::shareLinkMenu ())->
323+ describedAs ("Password protect by Talk checkbox input in the details view in Files app " );
324+ }
325+
317326 /**
318327 * @Given I close the details view
319328 */
@@ -418,6 +427,28 @@ public function iProtectTheSharedLinkWithThePassword($password) {
418427 $ this ->actor ->find (self ::passwordProtectField (), 2 )->setValue ($ password . "\r" );
419428 }
420429
430+ /**
431+ * @When I set the password of the shared link as protected by Talk
432+ */
433+ public function iSetThePasswordOfTheSharedLinkAsProtectedByTalk () {
434+ $ this ->showShareLinkMenuIfNeeded ();
435+
436+ $ this ->iSeeThatThePasswordOfTheLinkShareIsNotProtectedByTalk ();
437+
438+ $ this ->actor ->find (self ::passwordProtectByTalkCheckbox (), 2 )->click ();
439+ }
440+
441+ /**
442+ * @When I set the password of the shared link as not protected by Talk
443+ */
444+ public function iSetThePasswordOfTheSharedLinkAsNotProtectedByTalk () {
445+ $ this ->showShareLinkMenuIfNeeded ();
446+
447+ $ this ->iSeeThatThePasswordOfTheLinkShareIsProtectedByTalk ();
448+
449+ $ this ->actor ->find (self ::passwordProtectByTalkCheckbox (), 2 )->click ();
450+ }
451+
421452 /**
422453 * @Then I see that the current page is the Files app
423454 */
@@ -571,6 +602,24 @@ public function iSeeThatTheLinkShareIsPasswordProtected() {
571602 PHPUnit_Framework_Assert::assertTrue ($ this ->actor ->find (self ::passwordProtectField (), 10 )->isVisible (), "Password protect field is visible " );
572603 }
573604
605+ /**
606+ * @Then I see that the password of the link share is protected by Talk
607+ */
608+ public function iSeeThatThePasswordOfTheLinkShareIsProtectedByTalk () {
609+ $ this ->showShareLinkMenuIfNeeded ();
610+
611+ PHPUnit_Framework_Assert::assertTrue ($ this ->actor ->find (self ::passwordProtectByTalkCheckboxInput (), 10 )->isChecked ());
612+ }
613+
614+ /**
615+ * @Then I see that the password of the link share is not protected by Talk
616+ */
617+ public function iSeeThatThePasswordOfTheLinkShareIsNotProtectedByTalk () {
618+ $ this ->showShareLinkMenuIfNeeded ();
619+
620+ PHPUnit_Framework_Assert::assertFalse ($ this ->actor ->find (self ::passwordProtectByTalkCheckboxInput (), 10 )->isChecked ());
621+ }
622+
574623 /**
575624 * @Then I see that the checkbox to protect the password of the link share by Talk is not shown
576625 */
0 commit comments