You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/10/27 18:07:40 UTC
[23/40] allura git commit: [#7924] ticket:837 Update tests
[#7924] ticket:837 Update tests
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/13227411
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/13227411
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/13227411
Branch: refs/heads/ib/7924
Commit: 13227411cc54be0d27f98b51e077f70765166780
Parents: 932e415
Author: Igor Bondarenko <je...@gmail.com>
Authored: Thu Oct 15 16:52:07 2015 +0000
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Tue Oct 27 16:22:11 2015 +0200
----------------------------------------------------------------------
.../forgediscussion/tests/functional/test_forum.py | 4 +++-
ForgeGit/forgegit/tests/functional/test_controllers.py | 2 +-
ForgeTracker/forgetracker/tests/functional/test_root.py | 10 +++++-----
ForgeWiki/forgewiki/tests/functional/test_root.py | 2 +-
4 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/13227411/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py b/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
index c66d5f8..d5bb39f 100644
--- a/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
+++ b/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
@@ -489,7 +489,9 @@ class TestForum(TestController):
r = self.app.get(thread.request.url)
assert '<div class="display_post moderate">' in r
- assert '<a href="#" class="reply_post btn" style="display:none">' in r
+ assert '<a class="icon fa fa-reply reply_post btn" href="#" style="display:none;" title="Reply">'\
+ '<span> Reply</span></a>' in r
+
assert r.html.find(
'a', {'class': 'little_link shortlink', 'style': 'display:none'}) is not None
assert 'name="delete"' in r
http://git-wip-us.apache.org/repos/asf/allura/blob/13227411/ForgeGit/forgegit/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py
index 0e0928d..9ef589d 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -696,7 +696,7 @@ class TestFork(_TestCase):
'summary': 'summary',
'description': 'description',
}).follow()
- assert '<a href="edit" title="Edit"><b data-icon="p" class="ico ico-pencil" title="Edit"></b></a>' in r
+ assert '<a class="icon fa fa-edit" href="edit" title="Edit"><span> Edit</span></a>' in r
r = self.app.get('/p/test/src-git/merge-requests/1/edit')
assert 'value="summary"' in r
assert '<option selected value="zz">zz</option>' in r
http://git-wip-us.apache.org/repos/asf/allura/blob/13227411/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index 73ef421..8a1d8c4 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -736,7 +736,7 @@ class TestFunctionalController(TrackerTestController):
# Make sure the 'Create Ticket' button is disabled for user without 'create' perm
r = self.app.get('/bugs/', extra_environ=dict(username='*anonymous'))
create_button = r.html.find('a', attrs={'href': u'/p/test/bugs/new/'})
- assert_equal(create_button['class'], 'sidebar-disabled')
+ assert_equal(create_button['class'], 'icon fa fa-plus-circle sidebar-disabled')
def test_render_markdown_syntax(self):
r = self.app.get('/bugs/markdown_syntax')
@@ -853,7 +853,7 @@ class TestFunctionalController(TrackerTestController):
assert file_name in ticket_editor, ticket_editor.showbrowser()
req = self.app.get('/bugs/1/')
form = self._find_update_ticket_form(req)
- file_link = BeautifulSoup(form.text).findAll('a')[1]
+ file_link = BeautifulSoup(form.text).findAll('a')[2]
assert_equal(file_link.string, file_name)
self.app.post(str(file_link['href']), {
'delete': 'True'
@@ -896,7 +896,7 @@ class TestFunctionalController(TrackerTestController):
'summary': 'zzz'
}, upload_files=[upload]).follow()
form = self._find_update_ticket_form(ticket_editor)
- download = self.app.get(str(BeautifulSoup(form.text).findAll('a')[1]['href']))
+ download = self.app.get(str(BeautifulSoup(form.text).findAll('a')[2]['href']))
assert_equal(download.body, file_data)
def test_two_attachments(self):
@@ -1986,8 +1986,8 @@ class TestFunctionalController(TrackerTestController):
extra_environ=dict(username='*anonymous'))
ticket_url = r.headers['Location']
r = self.app.get(ticket_url, extra_environ=dict(username='*anonymous'))
- a = r.html.find('a', {'class': 'edit_ticket'})
- assert a.text == 'Edit'
+ a = r.html.find('a', {'class': 'icon fa fa-edit edit_ticket'})
+ assert_equal(a.text, ' Edit')
def test_ticket_creator_cant_edit_private_ticket_without_update_perm(self):
p = M.Project.query.get(shortname='test')
http://git-wip-us.apache.org/repos/asf/allura/blob/13227411/ForgeWiki/forgewiki/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/tests/functional/test_root.py b/ForgeWiki/forgewiki/tests/functional/test_root.py
index 635e2b6..eee2432 100644
--- a/ForgeWiki/forgewiki/tests/functional/test_root.py
+++ b/ForgeWiki/forgewiki/tests/functional/test_root.py
@@ -136,7 +136,7 @@ class TestRootController(TestController):
def test_search_help(self):
r = self.app.get('/wiki/search?q=test')
- btn = r.html.find('a', attrs={'class': 'btn search_help_modal'})
+ btn = r.html.find('a', attrs={'class': 'icon fa fa-question-circle btn search_help_modal'})
assert btn is not None, "Can't find a help button"
div = r.html.find('div', attrs={'id': 'lightbox_search_help_modal'})
assert div is not None, "Can't find help text"