From a99ac6352c126608250aec4c79f595a68bf6db21 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Thu, 15 Oct 2015 11:44:46 -0400 Subject: [PATCH] Add taken user name test. --- .../src/VuFindTest/Mink/FavoritesTest.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/FavoritesTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/FavoritesTest.php index b5ef2e4a0a0..bb7bf117716 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/FavoritesTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/FavoritesTest.php @@ -233,21 +233,25 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase ); $page->find('css', '.modal-body .btn.btn-primary')->click(); $this->assertNotNull($page->findById('account_firstname')); - // Invalid email $page->findById('account_firstname')->setValue('Tester'); $page->findById('account_lastname')->setValue('McTestenson'); - $page->findById('account_email')->setValue('blargasaurus'); - // TODO test taken - $page->findById('account_username')->setValue(self::$hash2); $page->findById('account_password')->setValue('test'); $page->findById('account_password2')->setValue('test'); + $page->findById('account_username')->setValue(self::$hash2); + // Invalid email + $page->findById('account_email')->setValue('blargasaurus'); $this->assertNull( $page->find('css', '.modal-body .btn.btn-primary.disabled') ); $page->find('css', '.modal-body .btn.btn-primary')->click(); $this->assertNotNull($page->findById('account_firstname')); - // Correct $page->findById('account_email')->setValue(self::$hash2 . '@ignore.com'); + // Test taken + $page->findById('account_username')->setValue(self::$hash); + $page->find('css', '.modal-body .btn.btn-primary')->click(); + $this->assertNotNull($page->findById('account_firstname')); + $page->findById('account_username')->setValue(self::$hash2); + // Correct $page->find('css', '.modal-body .btn.btn-primary')->click(); $this->assertNotNull($page->findById('save_list')); // Make list @@ -296,7 +300,6 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase // - empty $page->find('css', '.modal-body .btn.btn-primary')->click(); $this->assertNotNull($page->find('css', $username)); - // - TODO wrong // - for real $page->find('css', $username)->setValue(self::$hash2); $page->find('css', $password)->setValue('test'); -- GitLab