Skip to content

Commit

Permalink
Refactored step implementation for adding public link to server
Browse files Browse the repository at this point in the history
  • Loading branch information
grgprarup committed Oct 28, 2022
1 parent eb49183 commit ab5f752
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/acceptance/features/bootstrap/WebUISharingContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -1283,18 +1283,17 @@ public function thePublicAddsThePublicLinkToUsingTheWebUI(
if (!$this->publicLinkFilesPage->isOpen()) {
throw new Exception('Not on public link page!');
}
if ($server === '%remote_server%') {
$servers = ['%local_server%', '%remote_server%'];
if (\in_array($server, $servers)) {
$server = $this->featureContext->substituteInLineCodes($server);
$this->publicLinkFilesPage->addToServer($server);
} elseif ($server === '%local_server%') {
$this->publicLinkFilesPage->saveToSameServer();
} else {
throw new Exception(
"Invalid server provided '" . $server . "'. " .
"Either should be '%remote_server%' or '%local_server%'"
);
}
// addToServer and saveToSameServer takes us from the public link page to the login page
// addToServer takes us from the public link page to the login page
// of the remote and local server respectively, waiting for us to login.
$actualUsername = $this->featureContext->getActualUsername($username);
$password = $this->featureContext->getUserPassword($actualUsername);
Expand Down

0 comments on commit ab5f752

Please sign in to comment.