From cd499a71b592f0e8018d79ec65606876c2aa94a6 Mon Sep 17 00:00:00 2001 From: Sanpi Date: Mon, 18 Feb 2013 13:57:08 +0100 Subject: [PATCH 1/3] Add homepage assertion --- src/Behat/MinkExtension/Context/MinkContext.php | 10 ++++++++++ src/Behat/MinkExtension/Context/MinkDictionary.php | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/Behat/MinkExtension/Context/MinkContext.php b/src/Behat/MinkExtension/Context/MinkContext.php index ea8bfc1..f5ea75b 100644 --- a/src/Behat/MinkExtension/Context/MinkContext.php +++ b/src/Behat/MinkExtension/Context/MinkContext.php @@ -197,6 +197,16 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface $this->assertSession()->addressEquals($this->locatePath($page)); } + /** + * Checks, that current page is the homepage. + * + * @Then /^(?:|I )should be on (?:|the )homepage$/ + */ + public function assertHomepage() + { + $this->assertSession()->addressEquals($this->locatePath('/')); + } + /** * Checks, that current page PATH matches regular expression. * diff --git a/src/Behat/MinkExtension/Context/MinkDictionary.php b/src/Behat/MinkExtension/Context/MinkDictionary.php index a36aef3..aab8fef 100644 --- a/src/Behat/MinkExtension/Context/MinkDictionary.php +++ b/src/Behat/MinkExtension/Context/MinkDictionary.php @@ -263,6 +263,16 @@ trait MinkDictionary $this->assertSession()->addressEquals($this->locatePath($page)); } + /** + * Checks, that current page is the homepage. + * + * @Then /^(?:|I )should be on (?:|the )homepage$/ + */ + public function assertHomepage() + { + $this->assertSession()->addressEquals($this->locatePath('/')); + } + /** * Checks, that current page PATH matches regular expression. * From 9f0829980f9bb2c2627dc620a2fbbbfdc61aecb0 Mon Sep 17 00:00:00 2001 From: Sanpi Date: Mon, 18 Feb 2013 13:59:49 +0100 Subject: [PATCH 2/3] Update i18n/fr.xliff --- i18n/fr.xliff | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/i18n/fr.xliff b/i18n/fr.xliff index b196a44..4057a08 100644 --- a/i18n/fr.xliff +++ b/i18n/fr.xliff @@ -114,6 +114,10 @@ [^"]+)"$/]]> [^"]+)"$/]]> + + + + "([^"]|\\")*")$/]]> "([^"]|\\")*")$/]]> From 80614914febfdbf725f1a505c2ad9422a181b57e Mon Sep 17 00:00:00 2001 From: Sanpi Date: Mon, 18 Feb 2013 14:24:58 +0100 Subject: [PATCH 3/3] Fixed typo --- i18n/fr.xliff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/fr.xliff b/i18n/fr.xliff index 4057a08..9d92b7f 100644 --- a/i18n/fr.xliff +++ b/i18n/fr.xliff @@ -114,7 +114,7 @@ [^"]+)"$/]]> [^"]+)"$/]]> - +