From 5d3b1996a777eb6563d376dd31516c50a67406ee Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 7 Mar 2015 14:15:28 +1100 Subject: [PATCH] Update functional test to factor in the new user menu --- tests/functional/backend/AuthTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/functional/backend/AuthTest.php b/tests/functional/backend/AuthTest.php index 9b3f44d11..4332847f1 100644 --- a/tests/functional/backend/AuthTest.php +++ b/tests/functional/backend/AuthTest.php @@ -7,6 +7,8 @@ class AuthTest extends UiTestCase { $this->open('backend'); + $cssLogoutLink = '#layout-mainmenu .mainmenu-accountmenu > ul > li:first-child > a'; + try { $this->assertTitle('Administration Area'); $this->assertTrue($this->isElementPresent("name=login")); @@ -28,16 +30,18 @@ class AuthTest extends UiTestCase try { $this->assertTitle('Dashboard | October CMS'); - $this->assertTrue($this->isElementPresent('css=a[data-original-title="Sign out"]')); + $this->assertTrue($this->isElementPresent('css='.$cssLogoutLink)); } catch (PHPUnit_Framework_AssertionFailedError $e) { array_push($this->verificationErrors, $e->toString()); } + $this->verifyText('css='.$cssLogoutLink, "Sign out"); + /* * Log out */ - $this->click('css=a[data-original-title="Sign out"]'); + $this->click('css='.$cssLogoutLink); $this->waitForPageToLoad("30000"); try {