/** * @When I create a new channel :channelName */ public function iCreateNewChannel($channelName) { $this->channelCreatePage->open(); $this->channelCreatePage->nameIt($channelName); $this->channelCreatePage->specifyCode($channelName); $this->channelCreatePage->create(); $channel = $this->channelRepository->findOneBy(['name' => $channelName]); $this->sharedStorage->set('channel', $channel); }
/** * @Then I should be notified that channel with this code already exists */ public function iShouldBeNotifiedThatChannelWithThisCodeAlreadyExists() { Assert::same($this->createPage->getValidationMessage('code'), 'Channel code has to be unique.'); }
/** * @Then I should be notified that channel with this code already exists */ public function iShouldBeNotifiedThatChannelWithThisCodeAlreadyExists() { Assert::true($this->createPage->checkValidationMessageFor('code', 'Channel code has to be unique.'), 'Unique code violation message should appear on page, but it does not.'); }