#3374 Tweak notification styles
Merged 5 years ago by pingou. Opened 5 years ago by ryanlerch.
ryanlerch/pagure notifications  into  master

file modified
+12
@@ -82,6 +82,18 @@ 

      background:#f3f3f3;

  }

  

+ .notification-spacer .container{

+   position: absolute;

+   left: 50%;

+   transform: translate(-50%,0);

+   z-index: 999;

+   max-width: 600px!important;

+ }

+ 

+ .notification-spacer .alert{

+   box-shadow:0 0 10px 2px rgba(0,0,0,0.1)

+ }

+ 

  .code_table {

      background: #FDF6E3;

      min-width: 100%;

file modified
+8 -7
@@ -118,18 +118,19 @@ 

                  {% if messages %}

                  <div class="notification-spacer">

                  <div class="container pt-2">

-                     {% for category, message in messages %}

-                     <div class="alert {%

-                       if category == 'error' %}alert-warning{%

-                       else %}alert-info{%

-                       endif %} alert-dismissible" role="alert">

+                     <div class="alert alert-info border border-secondary bg-white alert-dismissible" role="alert">

                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">

                          <span aria-hidden="true">&times;</span>

                          <span class="sr-only">Close</span>

                        </button>

-                       {{ message }}

-                     </div>

+                     {% for category, message in messages %}

+                       {% if category == 'error' %}

+                         <div class="text-danger font-weight-bold"><i class="fa fa-fw fa-question-circle"></i> {{ message }}</div>

+                       {% else %}

+                         <div class="text-info font-weight-bold"><i class="fa fa-fw fa-info-circle"></i> {{ message }}</div>

+                       {% endif %}

                      {% endfor %}

+                   </div>

                  </div>

                  </div>

                  {% endif %}

@@ -643,8 +643,7 @@ 

                  '/test4/update', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n'\

-                 '                      Project updated',

+                 'Project updated',

                  output.get_data(as_text=True))

              self.assertNotIn(

                  '<input type="checkbox" value="private" name="private" checked="" />',
@@ -699,8 +698,7 @@ 

                  '/test4/update', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n'\

-                 '                      Project updated',

+                 'Project updated',

                  output.get_data(as_text=True))

              self.assertNotIn(

                  '<input type="checkbox" value="private" name="private" checked=""/>',

@@ -315,8 +315,8 @@ 

              output_text = output.get_data(as_text=True)

              self.assertIn('<strong>Create new Project</strong>', output_text)

              self.assertIn(

-                 '</button>\n                      No user '

-                 '&#34;username&#34; found\n                    </div>',

+                 'No user '

+                 '&#34;username&#34; found',

                  output_text)

  

          user.username = 'foo'
@@ -432,8 +432,8 @@ 

              output_text = output.get_data(as_text=True)

              self.assertIn('<strong>Create new Project</strong>', output_text)

              self.assertIn(

-                 '</button>\n                      No user '

-                 '&#34;username&#34; found\n                    </div>',

+                 'No user '

+                 '&#34;username&#34; found',

                  output_text)

  

          user.username = 'foo'
@@ -1000,7 +1000,7 @@ 

              self.assertIn(

                  '<title>foo\'s settings - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      You must always have at '

+                 'You must always have at '

                  'least one email', output_text)

  

          user.username = 'pingou'
@@ -1046,7 +1046,7 @@ 

              self.assertIn(

                  '<title>pingou\'s settings - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      You do not have the '

+                 'You do not have the '

                  'email: foobar@pingou.com, nothing to remove', output_text)

  

              data = {
@@ -1143,7 +1143,7 @@ 

              self.assertIn(

                  '<title>pingou\'s settings - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Email pending validation',

+                 'Email pending validation',

                  output_text)

              self.assertEqual(output_text.count('foo@pingou.com'), 4)

              self.assertEqual(output_text.count('bar@pingou.com'), 5)
@@ -1158,7 +1158,7 @@ 

                  '<div class="card-header">\n      '

                  '<strong>Add new email</strong>', output_text)

              self.assertIn(

-                 '</button>\n                      This email is already '

+                 'This email is already '

                  'pending confirmation', output_text)

  

              # User already has this email
@@ -1264,7 +1264,7 @@ 

                  '<title>pingou\'s settings - Pagure</title>', output_text)

              self.assertEqual(output_text.count('foo@pingou.com'), 4)

              self.assertIn(

-                 '</button>\n                      You do not have the '

+                 'You do not have the '

                  'email: foobar@pingou.com, nothing to set',

                  output_text)

  
@@ -1282,7 +1282,7 @@ 

                  '<title>pingou\'s settings - Pagure</title>', output_text)

              self.assertEqual(output_text.count('foo@pingou.com'), 4)

              self.assertIn(

-                 '</button>\n                      Default email set to: '

+                 'Default email set to: '

                  'foo@pingou.com', output_text)

  

              ast.return_value = True
@@ -1361,7 +1361,7 @@ 

                  '<title>pingou\'s settings - Pagure</title>', output_text)

              self.assertEqual(output_text.count('foo@pingou.com'), 4)

              self.assertIn(

-                 '</button>\n                      This email address has '

+                 'This email address has '

                  'already been confirmed', output_text)

  

              # Validate a non-validated email
@@ -1378,7 +1378,7 @@ 

                  '<title>pingou\'s settings - Pagure</title>', output_text)

              self.assertEqual(output_text.count('foo@pingou.com'), 4)

              self.assertIn(

-                 '</button>\n                      Confirmation email re-sent',

+                 'Confirmation email re-sent',

                  output_text)

  

              ast.return_value = True
@@ -1417,7 +1417,7 @@ 

              self.assertIn(

                  '<title>pingou\'s settings - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      No email associated with this token.',

+                 'No email associated with this token.',

                  output_text)

  

              # Confirm email
@@ -1428,7 +1428,7 @@ 

              self.assertIn(

                  '<title>pingou\'s settings - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Email validated',

+                 'Email validated',

                  output_text)

  

          userobj = pagure.lib.search_user(self.session, username='pingou')
@@ -1830,7 +1830,7 @@ 

              self.assertIn(

                  '<title>foo\'s settings - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Token created\n',

+                 'Token created',

                  output_text)

              self.assertEqual(

                  output_text.count(

@@ -241,8 +241,8 @@ 

                  '/test/give', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      The project has been '

-                 'transferred to foo\n',

+                 'The project has been '

+                 'transferred to foo',

                  output.get_data(as_text=True))

  

              self._check_user('foo')
@@ -269,8 +269,8 @@ 

                  '/test/give', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      The project has been '

-                 'transferred to foo\n',

+                 'The project has been '

+                 'transferred to foo',

                  output.get_data(as_text=True))

  

              self._check_user('foo')
@@ -311,8 +311,8 @@ 

                  '/test/give', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      The project has been '

-                 'transferred to foo\n',

+                 'The project has been '

+                 'transferred to foo',

                  output.get_data(as_text=True))

  

              self._check_user('foo')

@@ -389,7 +389,7 @@ 

                  'PR from the feature branch\n',

                  output_text)

              self.assertIn(

-                 '</button>\n                      This request must be '

+                 'This request must be '

                  'assigned to be merged', output_text)

  

              # PR assigned but not to this user
@@ -413,7 +413,7 @@ 

                  'PR from the feature branch\n',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Only the assignee can '

+                 'Only the assignee can '

                  'merge this review', output_text)

  

              # Project w/ minimal PR score
@@ -438,7 +438,7 @@ 

                  'PR from the feature branch\n',

                  output_text)

              self.assertIn(

-                 '</button>\n                      This request does not '

+                 'This request does not '

                  'have the minimum review score necessary to be merged',

                  output_text)

  
@@ -848,7 +848,7 @@ 

              '<title>PR#1: PR from the feature branch - test\n - Pagure</title>',

              output_text)

          self.assertIn(

-             '</button>\n                      Fork is empty, there are no '

+             'Fork is empty, there are no '

              'commits to create a pull request with',

              output_text)

  
@@ -1408,7 +1408,7 @@ 

              '<title>Overview - test - Pagure</title>',

              output_text)

          self.assertIn(

-             '</button>\n                      Fork is empty, there are no '

+             'Fork is empty, there are no '

              'commits to create a pull request with',

              output_text)

  
@@ -1437,7 +1437,7 @@ 

              self.assertIn(

                  '<title>Overview - test - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Invalid input submitted',

+                 'Invalid input submitted',

                  output_text)

  

              output = self.app.get('/test/pull-request/1')
@@ -1498,7 +1498,7 @@ 

              self.assertIn(

                  '<title>Overview - test - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Pull request canceled!',

+                 'Pull request canceled!',

                  output_text)

  

      @patch('pagure.lib.notify.send_email')
@@ -1524,7 +1524,7 @@ 

              self.assertIn(

                  '<title>PR#1: PR from the feature branch - test\n - Pagure</title>', output_text)

              self.assertIn(

-                 #'</button>\n                      Pull request reopened!',

+                 #'Pull request reopened!',

                  'return window.confirm("Are you sure you want to reopen this requested pull?")',

                  output_text)

  
@@ -1629,7 +1629,7 @@ 

                  '<span class="font-weight-bold">\n                  '

                  'PR from the feature branch\n', output_text)

              self.assertNotIn(

-                 '</button>\n                      Request assigned',

+                 'Request assigned',

                  output_text)

  

              output = self.app.get('/test/pull-request/1')
@@ -1658,7 +1658,7 @@ 

                  '<span class="font-weight-bold">\n                  '

                  'PR from the feature branch\n', output_text)

              self.assertNotIn(

-                 '</button>\n                      Request assigned',

+                 'Request assigned',

                  output_text)

  

              # Invalid assignee
@@ -1683,7 +1683,7 @@ 

                  '<span class="font-weight-bold">\n                  '

                  'PR from the feature branch\n', output_text)

              self.assertIn(

-                 '</button>\n                      No user &#34;bar&#34; found',

+                 'No user &#34;bar&#34; found',

                  output_text)

  

              # Assign the PR
@@ -1717,7 +1717,7 @@ 

                  '<span class="font-weight-bold">\n                  '

                  'PR from the feature branch\n', output_text)

              self.assertIn(

-                 '</button>\n                      Request assigned',

+                 'Request assigned',

                  output_text)

  

              # Pull-Request closed
@@ -1786,7 +1786,7 @@ 

                  '<span class="font-weight-bold">\n                  '

                  'PR from the feature branch\n', output_text)

              self.assertNotIn(

-                 '</button>\n                      Request assigned',

+                 'Request assigned',

                  output_text)

  

              # Tag the PR
@@ -1811,7 +1811,7 @@ 

                  '<span class="font-weight-bold">\n                  '

                  'PR from the feature branch\n', output_text)

              self.assertIn(

-                 '</button>\n                      Pull-request tagged with: black',

+                 'Pull-request tagged with: black',

                  output_text)

              self.assertIn(

                  'title="comma separated list of tags"\n              '
@@ -2091,13 +2091,13 @@ 

                  '<title>Diff from feature to master - test\n - '

                  'Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      This project enforces the '

+                 'This project enforces the '

                  'Signed-off-by statement on all commits', output_text)

              self.assertNotIn(

                  '<input type="submit" class="btn btn-primary" value="Create">',

                  output_text)

              self.assertNotIn(

-                 '</button>\n                      This repo enforces that '

+                 'This repo enforces that '

                  'all commits are signed off by their author.', output_text)

  

      @patch('pagure.lib.notify.send_email')
@@ -2134,7 +2134,7 @@ 

                  '<title>Create new Pull Request for master - test\n - '

                  'Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      This project enforces the '

+                 'This project enforces the '

                  'Signed-off-by statement on all commits', output_text)

              self.assertIn(

                  '<input type="submit" class="btn btn-primary" value="Create">',
@@ -2158,11 +2158,11 @@ 

                  'Pagure</title>', output_text)

              # Flashed information message

              self.assertIn(

-                 '</button>\n                      This project enforces the '

+                 'This project enforces the '

                  'Signed-off-by statement on all commits', output_text)

              # Flashed error message

              self.assertIn(

-                 '</button>\n                      This repo enforces that '

+                 'This repo enforces that '

                  'all commits are signed off by their author.', output_text)

              self.assertIn(

                  '<input type="submit" class="btn btn-primary" value="Create">',
@@ -2689,7 +2689,7 @@ 

                  '<title>PR#1: PR from the feature branch - test\n - '

                  'Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Comment added',

+                 'Comment added',

                  output_text)

              self.assertEqual(output_text.count('title="PY C (pingou)"'), 2)

  
@@ -2780,7 +2780,7 @@ 

                  'PR from the feature branch\n',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Comment removed',

+                 'Comment removed',

                  output_text)

  

              # Project w/o pull-request
@@ -2841,7 +2841,7 @@ 

                  'PR from the feature branch\n',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Comment added',

+                 'Comment added',

                  output_text)

              # Check if the comment is there

              self.assertIn(
@@ -2884,7 +2884,7 @@ 

                  '<small class="text-semimuted">Edited seconds ago by pingou </small>'

                  in output_text)

              self.assertIn(

-                 '</button>\n                      Comment updated', output_text)

+                 'Comment updated', output_text)

  

              #  Project w/o pull-request

              repo = pagure.lib.get_authorized_project(self.session, 'test')
@@ -3221,7 +3221,7 @@ 

                  '<title>Edit - test - Pagure</title>',

                  output_text)

              self.assertIn(

-                 '</button>\n                      You had already forked '

+                 'You had already forked '

                  'this project', output_text)

              self.assertIn(

                  '<i class="fa fa-code-fork fa-fw"></i> View Upstream',
@@ -3379,7 +3379,7 @@ 

                  '<title>Edit - somenamespace/test3 - Pagure</title>',

                  output_text)

              self.assertIn(

-                 '</button>\n                      You had already forked '

+                 'You had already forked '

                  'this project', output_text)

              self.assertIn(

                  '<i class="fa fa-code-fork fa-fw"></i> View Upstream',

@@ -111,10 +111,10 @@ 

                  '/group/add', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      User `pingou` added to '

+                 'User `pingou` added to '

                  'the group `test_group`.', output.get_data(as_text=True))

              self.assertIn(

-                 '</button>\n                      Group `test_group` created.',

+                 'Group `test_group` created.',

                  output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="font-weight-bold">\n'
@@ -143,10 +143,10 @@ 

                  '/group/add', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      User `pingou` added to '

+                 'User `pingou` added to '

                  'the group `test_admin_group`.', output.get_data(as_text=True))

              self.assertIn(

-                 '</button>\n                      Group `test_admin_group` '

+                 'Group `test_admin_group` '

                  'created.',output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="font-weight-bold">\n'
@@ -218,7 +218,7 @@ 

                  '<title>Group test_group - Pagure</title>',

                  output.get_data(as_text=True))

              self.assertIn(

-                 '</button>\n                      You are not '

+                 'You are not '

                  'allowed to edit this group', output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="mb-0 font-weight-bold">Test Group</h3>',
@@ -285,7 +285,7 @@ 

                  '/group/bar/delete', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      No group `bar` found',

+                 'No group `bar` found',

                  output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="font-weight-bold">\n'
@@ -296,7 +296,7 @@ 

                  '/group/test_group/delete', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      You are not allowed to '

+                 'You are not allowed to '

                  'delete the group test_group', output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="font-weight-bold">\n'
@@ -317,7 +317,7 @@ 

                  '/group/test_group/delete', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      Group `test_group` has '

+                 'Group `test_group` has '

                  'been deleted', output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="font-weight-bold">\n'
@@ -380,7 +380,7 @@ 

                  '/group/test_admin_group', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      No user `bar` found',

+                 'No user `bar` found',

                  output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="mb-0 font-weight-bold">Test Admin Group</h3>',
@@ -396,7 +396,7 @@ 

              output = self.app.post('/group/test_admin_group', data=data)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      User `foo` added to the '

+                 'User `foo` added to the '

                  'group `test_admin_group`.', output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="mb-0 font-weight-bold">Test Admin Group</h3>',
@@ -438,7 +438,7 @@ 

                  '/group/test_group/bar/delete', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      No user `bar` found',

+                 'No user `bar` found',

                  output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="mb-0 font-weight-bold">Test Group</h3>',
@@ -450,7 +450,7 @@ 

                  '/group/test_group/foo/delete', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      Could not find user '

+                 'Could not find user '

                  'username', output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="mb-0 font-weight-bold">Test Group</h3>',
@@ -465,7 +465,7 @@ 

                  '/group/test_group/foo/delete', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      User `foo` could not be '

+                 'User `foo` could not be '

                  'found in the group `test_group`', output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="mb-0 font-weight-bold">Test Group</h3>',
@@ -478,7 +478,7 @@ 

                  '/group/test_group/foo/delete', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      User `foo` could not be '

+                 'User `foo` could not be '

                  'found in the group `test_group`', output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="mb-0 font-weight-bold">Test Group</h3>',
@@ -494,7 +494,7 @@ 

              output = self.app.post('/group/test_group', data=data)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      User `foo` added to the '

+                 'User `foo` added to the '

                  'group `test_group`.', output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="mb-0 font-weight-bold">Test Group</h3>',
@@ -506,7 +506,7 @@ 

                  '/group/test_group/foo/delete', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      User `foo` removed from '

+                 'User `foo` removed from '

                  'the group `test_group`', output.get_data(as_text=True))

              self.assertIn(

                  '<h3 class="mb-0 font-weight-bold">Test Group</h3>',

@@ -104,7 +104,7 @@ 

                  '<div class="card-header">\n        New issue',

                  output_text)

              self.assertEqual(output_text.count(

-                 '</button>\n                      This field is required.'),

+                 'This field is required.'),

                  0)

  

              # Invalid user
@@ -1724,12 +1724,12 @@ 

                   ' href="/test/issue/1/edit" title="Edit this issue">',

                  output_text)

              self.assertIn(

-                 '</button>\n                      '

-                 'Issue close_status updated to: Fixed\n',

+                 ''

+                 'Issue close_status updated to: Fixed',

                  output_text)

              self.assertIn(

-                 '</button>\n                      '

-                 'Issue status updated to: Closed (was: Open)\n',

+                 ''

+                 'Issue status updated to: Closed (was: Open)',

                  output_text)

              self.assertTrue(

                  '<option selected value="Fixed">Fixed</option>'
@@ -1763,10 +1763,10 @@ 

                   ' href="/test/issue/1/edit" title="Edit this issue">',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Comment added',

+                 'Comment added',

                  output_text)

              self.assertNotIn(

-                 '</button>\n                      No changes to edit',

+                 'No changes to edit',

                  output_text)

              self.assertIn(

                  '<p>Woohoo a second comment!</p>',
@@ -1827,7 +1827,7 @@ 

                   ' href="/test/issue/1/edit" title="Edit this issue">',

                  output_text)

              self.assertIn(

-                 '</button>\n                      No user &#34;ralph&#34; found',

+                 'No user &#34;ralph&#34; found',

                  output_text)

              self.assertIn(

                  '<p>Woohoo a second comment!</p>',
@@ -1857,7 +1857,7 @@ 

                   ' href="/test/issue/1/edit" title="Edit this issue">',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Issue assigned to pingou\n',

+                 'Issue assigned to pingou',

                  output_text)

              self.assertIn(

                  '<a href="/test/issues?assignee=pingou" title="PY C (pingou)"',
@@ -1911,7 +1911,7 @@ 

                   ' href="/test/issue/2/edit" title="Edit this issue">',

                  output_text)

              self.assertIn(

-                 '</button>\n                      You cannot close a ticket '

+                 'You cannot close a ticket '

                  'that has ticket depending that are still open.',

                  output_text)

              self.assertTrue(
@@ -2007,7 +2007,7 @@ 

                   ' href="/test/issue/1/edit" title="Edit this issue">',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Comment added',

+                 'Comment added',

                  output_text)

              self.assertIn(

                  '<p>Woohoo a second comment!</p>',
@@ -2052,7 +2052,7 @@ 

                   ' href="/test/issue/1/edit" title="Edit this issue">',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Comment removed',

+                 'Comment removed',

                  output_text)

  

              # Drop non-existant comment
@@ -2151,7 +2151,7 @@ 

                   ' href="/test/issue/1/edit" title="Edit this issue">',

                  output_text)

              self.assertNotIn(

-                 '</button>\n                      '

+                 ''

                  'Successfully edited issue #1',

                  output_text)

  
@@ -2274,7 +2274,7 @@ 

                   ' href="/test/issue/1/edit" title="Edit this issue">',

                  output_text)

              self.assertNotIn(

-                 '</button>\n                      '

+                 ''

                  'Successfully edited issue #1',

                  output_text)

  
@@ -2826,7 +2826,7 @@ 

              self.assertIn(

                  'Settings - test - Pagure', output_text)

              self.assertIn(

-                 '</button>\n                      '

+                 ''

                  'Edited tag: tag1()[DeepSkyBlue] to tag2(lorem ipsum)[DeepSkyBlue]',

                  output_text)

  
@@ -2839,7 +2839,7 @@ 

              self.assertIn(

                  'Settings - test - Pagure', output_text)

              self.assertIn(

-                 '</button>\n                      '

+                 ''

                  'Edited tag: tag2(lorem ipsum)[DeepSkyBlue] to tag2()[DeepSkyBlue]',

                  output_text)

  
@@ -2936,7 +2936,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">Project '

                  'Settings</h5>', output_text)

              self.assertIn(

-                 '</button>\n                      '

+                 ''

                  'Tag: tag1 has been deleted', output_text)

  

      @patch('pagure.lib.git.update_git')
@@ -3007,7 +3007,7 @@ 

              self.assertIn(

                  '<title>Issues - test - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Issue deleted',

+                 'Issue deleted',

                  output_text)

  

          # Project w/o issue tracker
@@ -3078,7 +3078,7 @@ 

                  ' href="/test/issue/1/edit" title="Edit this issue">\n',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Comment added',

+                 'Comment added',

                  output_text)

              self.assertIn(

                  '<p>Woohoo a second comment!</p>',
@@ -3127,7 +3127,7 @@ 

                   ' href="/test/issue/1/edit" title="Edit this issue">',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Comment updated',

+                 'Comment updated',

                  output_text)

  

          self.session.commit()
@@ -3167,7 +3167,7 @@ 

                   ' href="/test/issue/1/edit" title="Edit this issue">',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Comment updated',

+                 'Comment updated',

                  output_text)

  

          self.session.commit()
@@ -3212,12 +3212,12 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertNotIn(

-                 '</button>\n                      '

+                 ''

                  'Successfully edited issue #1\n',

                  output_text

              )

              self.assertIn(

-                 '</button>\n                      Comment added\n',

+                 'Comment added',

                  output_text

              )

              self.assertNotIn(
@@ -3240,17 +3240,17 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      '

-                 'Issue close_status updated to: Invalid\n',

+                 ''

+                 'Issue close_status updated to: Invalid',

                  output_text

              )

              self.assertIn(

-                 '</button>\n                      Comment added\n',

+                 'Comment added',

                  output_text

              )

              self.assertIn(

-                 '</button>\n                      '

-                 'Issue status updated to: Closed (was: Open)\n',

+                 ''

+                 'Issue status updated to: Closed (was: Open)',

                  output_text

              )

              self.assertIn(
@@ -3397,7 +3397,7 @@ 

              self.assertIn(

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      '

+                 ''

                  'Color: red does not match the expected pattern',

                  output_text)

              self.assertIn(
@@ -3418,7 +3418,7 @@ 

              self.assertIn(

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      '

+                 ''

                  'Tag: red/green contains an invalid character: &#34;/&#34;',

                  output_text)

              self.assertIn(
@@ -3439,7 +3439,7 @@ 

              self.assertIn(

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Error: Incomplete request. '

+                 'Error: Incomplete request. '

                  'One or more tag fields missing.', output_text)

              self.assertIn(

                  '<h5 class="pl-2 font-weight-bold text-muted">Project '
@@ -3459,11 +3459,11 @@ 

              self.assertIn(

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      '

+                 ''

                  'Color: red does not match the expected pattern',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Error: Incomplete request. '

+                 'Error: Incomplete request. '

                  'One or more tag color fields missing.', output_text)

              self.assertIn(

                  '<h5 class="pl-2 font-weight-bold text-muted">Project '
@@ -3483,7 +3483,7 @@ 

              self.assertIn(

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Error: Incomplete request. '

+                 'Error: Incomplete request. '

                  'One or more tag description fields missing.', output_text)

              self.assertIn(

                  '<h5 class="pl-2 font-weight-bold text-muted">Project '
@@ -3609,7 +3609,7 @@ 

                  '<input type="hidden" value="red" name="tag" />',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Duplicated tag: red2',

+                 'Duplicated tag: red2',

                  output_text)

  

          # After update, list tags
@@ -3825,7 +3825,7 @@ 

                   ' href="/test/issue/1/edit" title="Edit this issue">',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Comment added',

+                 'Comment added',

                  output_text)

              self.assertTrue(

                  '<p>Woohoo a second comment!</p>' in output_text)

@@ -115,7 +115,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Mail activated',

+                 'Hook Mail activated',

                  output_text)

  

              data = {
@@ -131,7 +131,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Mail deactivated',

+                 'Hook Mail deactivated',

                  output_text)

  

      def test_RequiredIf(self):

@@ -95,7 +95,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Fedmsg deactivated',

+                 'Hook Fedmsg deactivated',

                  output_text)

  

              output = self.app.get('/test/settings/Fedmsg', data=data)
@@ -138,7 +138,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Fedmsg activated',

+                 'Hook Fedmsg activated',

                  output_text)

  

              output = self.app.get('/test/settings/Fedmsg', data=data)
@@ -177,7 +177,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Fedmsg deactivated',

+                 'Hook Fedmsg deactivated',

                  output_text)

  

              output = self.app.get('/test/settings/Fedmsg', data=data)

@@ -70,7 +70,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook IRC deactivated', output_text)

+                 'Hook IRC deactivated', output_text)

  

              output = self.app.get('/test/settings/IRC')

              self.assertEqual(output.status_code, 200)
@@ -101,7 +101,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook IRC activated', output_text)

+                 'Hook IRC activated', output_text)

  

              output = self.app.get('/test/settings/IRC')

              self.assertEqual(output.status_code, 200)
@@ -125,7 +125,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook IRC deactivated', output_text)

+                 'Hook IRC deactivated', output_text)

  

              output = self.app.get('/test/settings/IRC')

              self.assertEqual(output.status_code, 200)

@@ -74,7 +74,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Mail deactivated', output_text)

+                 'Hook Mail deactivated', output_text)

  

              output = self.app.get('/test/settings/Mail')

              self.assertEqual(output.status_code, 200)
@@ -100,7 +100,7 @@ 

              self.assertIn(

                  '<title>Settings Mail - test - Pagure</title>', output_text)

              self.assertNotIn(

-                 '</button>\n                      Hook activated', output_text)

+                 'Hook activated', output_text)

              if self.get_wtforms_version() >= (2, 2):

                  self.assertIn(

                      '<input class="form-control" id="mail_to" name="mail_to" '
@@ -133,7 +133,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Mail activated', output_text)

+                 'Hook Mail activated', output_text)

  

              output = self.app.get('/test/settings/Mail')

              output_text = output.get_data(as_text=True)
@@ -158,7 +158,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Mail deactivated', output_text)

+                 'Hook Mail deactivated', output_text)

  

              output = self.app.get('/test/settings/Mail')

              output_text = output.get_data(as_text=True)

@@ -90,7 +90,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertTrue(

-                 '</button>\n                      Hook Block non '

+                 'Hook Block non '

                  'fast-forward pushes deactivated' in output_text)

  

              output = self.app.get(
@@ -127,7 +127,7 @@ 

                  '<title>Settings Block non fast-forward pushes - test - '

                  'Pagure</title>', output_text)

              self.assertNotIn(

-                 '</button>\n                      Hook activated',

+                 'Hook activated',

                  output_text)

              if self.get_wtforms_version() >= (2, 2):

                  self.assertIn(
@@ -161,7 +161,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Block non '

+                 'Hook Block non '

                  'fast-forward pushes activated', output_text)

  

              output = self.app.get(
@@ -197,7 +197,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Block non '

+                 'Hook Block non '

                  'fast-forward pushes deactivated', output_text)

  

              output = self.app.get(

@@ -110,7 +110,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Pagure CI activated',

+                 'Hook Pagure CI activated',

                  output_text)

  

              output = self.app.get('/test/settings/Pagure CI')
@@ -144,7 +144,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Pagure CI deactivated',

+                 'Hook Pagure CI deactivated',

                  output_text)

  

              output = self.app.get('/test/settings/Pagure CI')
@@ -174,7 +174,7 @@ 

                  '<title>Settings Pagure CI - test - Pagure</title>',

                  output_text)

              self.assertNotIn(

-                 '</button>\n                      Hook Pagure CI activated',

+                 'Hook Pagure CI activated',

                  output_text)

  

              if self.get_wtforms_version() >= (2, 2):
@@ -254,7 +254,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Pagure CI activated',

+                 'Hook Pagure CI activated',

                  output_text)

  

              output = self.app.get('/somenamespace/test3/settings/Pagure CI')

@@ -104,7 +104,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Pagure deactivated',

+                 'Hook Pagure deactivated',

                  output_text)

  

              output = self.app.get('/test/settings/Pagure')
@@ -151,7 +151,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Pagure activated',

+                 'Hook Pagure activated',

                  output_text)

  

              output = self.app.get('/test/settings/Pagure')
@@ -193,7 +193,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Pagure deactivated',

+                 'Hook Pagure deactivated',

                  output_text)

  

              output = self.app.get('/test/settings/Pagure')
@@ -236,7 +236,7 @@ 

                  '/test/settings/Pagure', data=data, follow_redirects=True)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Hook Pagure activated',

+                 'Hook Pagure activated',

                  output_text)

  

              self.assertTrue(os.path.exists(os.path.join(
@@ -274,7 +274,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Pagure activated',

+                 'Hook Pagure activated',

                  output_text)

  

              self.assertTrue(os.path.exists(os.path.join(
@@ -296,7 +296,7 @@ 

                  '/test/settings/Pagure', data=data, follow_redirects=True)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Hook Pagure deactivated',

+                 'Hook Pagure deactivated',

                  output_text)

  

              self.assertFalse(os.path.exists(os.path.join(

@@ -74,7 +74,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Pagure requests deactivated',

+                 'Hook Pagure requests deactivated',

                  output_text)

  

              output = self.app.get('/test/settings/Pagure requests')
@@ -106,7 +106,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Pagure requests activated',

+                 'Hook Pagure requests activated',

                  output_text)

  

              output = self.app.get('/test/settings/Pagure requests')
@@ -134,7 +134,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Pagure requests deactivated',

+                 'Hook Pagure requests deactivated',

                  output_text)

  

              output = self.app.get('/test/settings/Pagure requests')

@@ -75,7 +75,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Pagure tickets deactivated',

+                 'Hook Pagure tickets deactivated',

                  output_text)

  

              output = self.app.get('/test/settings/Pagure tickets')
@@ -107,7 +107,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Pagure tickets activated',

+                 'Hook Pagure tickets activated',

                  output_text)

  

              output = self.app.get('/test/settings/Pagure tickets')
@@ -135,7 +135,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Pagure tickets deactivated',

+                 'Hook Pagure tickets deactivated',

                  output_text)

  

              output = self.app.get('/test/settings/Pagure tickets')

@@ -74,7 +74,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Read the Doc deactivated',

+                 'Hook Read the Doc deactivated',

                  output_text)

  

              output = self.app.get('/test/settings/Read the Doc')
@@ -107,7 +107,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Read the Doc activated',

+                 'Hook Read the Doc activated',

                  output_text)

  

              output = self.app.get('/test/settings/Read the Doc')
@@ -135,7 +135,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Hook Read the Doc deactivated',

+                 'Hook Read the Doc deactivated',

                  output_text)

  

              output = self.app.get('/test/settings/Read the Doc')

@@ -74,7 +74,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertTrue(

-                 '</button>\n                      Hook Block Un-Signed '

+                 'Hook Block Un-Signed '

                  'commits deactivated' in output_text)

  

              output = self.app.get(
@@ -104,7 +104,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertNotIn(

-                 '</button>\n                      Hook activated',

+                 'Hook activated',

                  output_text)

  

              self.assertTrue(os.path.exists(os.path.join(
@@ -122,7 +122,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertTrue(

-                 '</button>\n                      Hook Block Un-Signed '

+                 'Hook Block Un-Signed '

                  'commits deactivated' in output_text)

  

              output = self.app.get(

@@ -245,8 +245,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n'

-                 '                      Priorities weights and titles are '

+                 'Priorities weights and titles are '

                  'not of the same length', output_text)

              # Check the result of the action -- Priorities un-changed

              self.session.commit()
@@ -273,8 +272,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n'

-                 '                      Priorities weights must be numbers',

+                 'Priorities weights must be numbers',

                  output_text)

              # Check the result of the action -- Priorities un-changed

              self.session.commit()
@@ -301,8 +299,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n'

-                 '                      Priority weight 2 is present 2 times',

+                 'Priority weight 2 is present 2 times',

                  output_text)

              # Check the result of the action -- Priorities un-changed

              self.session.commit()
@@ -329,8 +326,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n'

-                 '                      Priority Normal is present 2 times',

+                 'Priority Normal is present 2 times',

                  output_text)

              # Check the result of the action -- Priorities un-changed

              self.session.commit()
@@ -1034,7 +1030,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Default priority set '

+                 'Default priority set '

                  'to High', output_text)

              # Check the result of the action -- default_priority no change

              self.session.commit()
@@ -1073,7 +1069,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Default priority reset',

+                 'Default priority reset',

                  output_text)

              # Check the result of the action -- default_priority no change

              self.session.commit()
@@ -1172,7 +1168,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Default priority set '

+                 'Default priority set '

                  'to High', output_text)

              # Check the result of the action -- default_priority no change

              self.session.commit()
@@ -1196,10 +1192,10 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n                      Priorities updated',

+                 'Priorities updated',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Default priority reset '

+                 'Default priority reset '

                  'as it is no longer one of set priorities.',

                  output_text)

              # Check the ordering

@@ -134,7 +134,7 @@ 

          self.assertEqual(output.status_code, 200)

          output_text = output.get_data(as_text=True)

          self.assertIn(

-             '</button>\n                      Action canceled, try it '

+             'Action canceled, try it '

              'again', output_text)

  

          ast.return_value = False
@@ -262,7 +262,7 @@ 

          self.assertEqual(output.status_code, 200)

          output_text = output.get_data(as_text=True)

          self.assertIn(

-             '</button>\n                      Action canceled, try it '

+             'Action canceled, try it '

              'again', output_text)

  

          ast.return_value = False
@@ -314,7 +314,7 @@ 

                  '<title>Add user - test - Pagure</title>', output_text)

              self.assertIn('<strong>Add user to the', output_text)

              self.assertIn(

-                 '</button>\n                      No user &#34;ralph&#34; found\n',

+                 'No user &#34;ralph&#34; found',

                  output_text)

  

              # All correct
@@ -325,7 +325,7 @@ 

              output_text = output.get_data(as_text=True)

              self.assertIn('<h5 class="pl-2 font-weight-bold text-muted">Project Settings</h5>', output_text)

              self.assertIn(

-                 '</button>\n                      User added', output_text)

+                 'User added', output_text)

  

          mock_log.assert_called_with(ANY, topic='project.user.added', msg=ANY, redis=ANY)

  
@@ -451,7 +451,7 @@ 

          self.assertEqual(output.status_code, 200)

          output_text = output.get_data(as_text=True)

          self.assertIn(

-             '</button>\n                      Action canceled, try it '

+             'Action canceled, try it '

              'again', output_text)

  

          ast.return_value = False
@@ -510,7 +510,7 @@ 

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn('<h5 class="pl-2 font-weight-bold text-muted">Project Settings</h5>', output_text)

              self.assertIn(

-                 '</button>\n                      Group added', output_text)

+                 'Group added', output_text)

  

      @patch('pagure.decorators.admin_session_timedout')

      def test_remove_user_when_user_mngt_off(self, ast):
@@ -708,7 +708,7 @@ 

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn('<h5 class="pl-2 font-weight-bold text-muted">Project Settings</h5>', output_text)

              self.assertIn(

-                 '</button>\n                      User does not have any '

+                 'User does not have any '

                  'access on the repo', output_text)

  

          # Add an user to a project
@@ -732,7 +732,7 @@ 

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn('<h5 class="pl-2 font-weight-bold text-muted">Project Settings</h5>', output_text)

              self.assertNotIn(

-                 '</button>\n                      User removed', output_text)

+                 'User removed', output_text)

              self.assertIn('action="/test/dropuser/2">', output_text)

              repo = pagure.lib.get_authorized_project(self.session, 'test')

              self.assertEqual(len(repo.users), 1)
@@ -746,7 +746,7 @@ 

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn('<h5 class="pl-2 font-weight-bold text-muted">Project Settings</h5>', output_text)

              self.assertIn(

-                 '</button>\n                      User removed', output_text)

+                 'User removed', output_text)

              self.assertNotIn('action="/test/dropuser/2">', output_text)

  

              self.session.commit()
@@ -794,7 +794,7 @@ 

                  '</a>\n            </h3>',

                  output_text)

              self.assertIn(

-                 '</button>\n                      User removed', output_text)

+                 'User removed', output_text)

  

          self.session.commit()

          repo = pagure.lib.get_authorized_project(self.session, 'test')
@@ -918,7 +918,7 @@ 

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn('<h5 class="pl-2 font-weight-bold text-muted">Project Settings</h5>', output_text)

              self.assertIn(

-                 '</button>\n                      '

+                 ''

                  'Group does not seem to be part of this project',

                  output_text)

  
@@ -959,7 +959,7 @@ 

              self.assertIn('<h5 class="pl-2 font-weight-bold text-muted">Project Settings</h5>', output_text)

              self.assertIn('action="/test/dropgroup/1">', output_text)

              self.assertNotIn(

-                 '</button>\n                      Group removed',

+                 'Group removed',

                  output_text)

              repo = pagure.lib.get_authorized_project(self.session, 'test')

              self.assertEqual(len(repo.groups), 1)
@@ -973,7 +973,7 @@ 

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn('<h5 class="pl-2 font-weight-bold text-muted">Project Settings</h5>', output_text)

              self.assertIn(

-                 '</button>\n                      Group removed',

+                 'Group removed',

                  output_text)

              self.assertNotIn('action="/test/dropgroup/1">', output_text)

  
@@ -1039,7 +1039,7 @@ 

              self.assertIn(

                  '<input class="form-control" name="avatar_email" value="" />', output_text)

              self.assertIn(

-                 '</button>\n                      Project updated',

+                 'Project updated',

                  output_text)

  

              # Edit the avatar_email
@@ -1059,7 +1059,7 @@ 

                  '<input class="form-control" name="avatar_email" value="pingou@fp.o" />',

                  output_text)

              self.assertIn(

-                 '</button>\n                      Project updated',

+                 'Project updated',

                  output_text)

  

              # Reset the avatar_email
@@ -1078,7 +1078,7 @@ 

              self.assertIn(

                  '<input class="form-control" name="avatar_email" value="" />', output_text)

              self.assertIn(

-                 '</button>\n                      Project updated',

+                 'Project updated',

                  output_text)

  

      @patch('pagure.decorators.admin_session_timedout')
@@ -1123,7 +1123,7 @@ 

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn('<h5 class="pl-2 font-weight-bold text-muted">Project Settings</h5>', output_text)

              self.assertIn(

-                 '</button>\n                      Project updated',

+                 'Project updated',

                  output_text)

  

              # Remove two of the tags of the project, they will still be in
@@ -1141,7 +1141,7 @@ 

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn('<h5 class="pl-2 font-weight-bold text-muted">Project Settings</h5>', output_text)

              self.assertIn(

-                 '</button>\n                      Project updated',

+                 'Project updated',

                  output_text)

  

              # Try re-adding the two tags, this used to fail before we fixed
@@ -1159,7 +1159,7 @@ 

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn('<h5 class="pl-2 font-weight-bold text-muted">Project Settings</h5>', output_text)

              self.assertIn(

-                 '</button>\n                      Project updated',

+                 'Project updated',

                  output_text)

  

      @patch('pagure.decorators.admin_session_timedout')
@@ -1242,7 +1242,7 @@ 

              self.assertIn(

                  '<title>Overview - test - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Edited successfully '

+                 'Edited successfully '

                  'settings of repo: test', output_text)

  

              # Both checkbox are now un-checked
@@ -1271,7 +1271,7 @@ 

              self.assertIn(

                  '<title>Overview - test - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Edited successfully '

+                 'Edited successfully '

                  'settings of repo: test', output_text)

  

              # Both checkbox are again checked
@@ -1320,7 +1320,7 @@ 

              self.assertIn(

                  '<title>Overview - test - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Edited successfully '

+                 'Edited successfully '

                  'settings of repo: test', output_text)

  

              # Both checkbox are again checked
@@ -4085,7 +4085,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      New hook token generated',

+                 'New hook token generated',

                  output_text)

              pagure.config.config['WEBHOOK'] = False

  
@@ -4158,7 +4158,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Tickets git repo updated',

+                 'Tickets git repo updated',

                  output_text)

  

              # Create a request to play with
@@ -4182,7 +4182,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Requests git repo updated',

+                 'Requests git repo updated',

                  output_text)

  

      def test_view_tags(self):
@@ -4628,7 +4628,7 @@ 

                      '<option value="master">master</option>'

                      '</select>', output_text)

              self.assertIn(

-                 '</button>\n                      Default branch updated '

+                 'Default branch updated '

                  'to feature', output_text)

  

              data = {
@@ -4659,7 +4659,7 @@ 

                      '<option selected value="master">master</option>'

                      '</select>', output_text)

              self.assertIn(

-                 '</button>\n                      Default branch updated '

+                 'Default branch updated '

                  'to master', output_text)

  

      def test_new_release(self):
@@ -4711,9 +4711,9 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      File', output_text)

+                 'File', output_text)

              self.assertIn(

-                 'uploaded\n                    </div>', output_text)

+                 'uploaded', output_text)

              self.assertIn('This project has not been tagged.', output_text)

  

              self.assertEqual(os.listdir(upload_dir), ['test'])
@@ -4758,7 +4758,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      This tarball has already '

+                 'This tarball has already '

                  'been uploaded', output_text)

              self.assertIn('This project has not been tagged.', output_text)

  
@@ -4845,7 +4845,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Action canceled, try it '

+                 'Action canceled, try it '

                  'again', output_text)

              ast.return_value = False

  
@@ -4855,7 +4855,7 @@ 

              output_text = output.get_data(as_text=True)

              self.assertIn('<strong>Create a new token</strong>', output_text)

              self.assertIn(

-                     '</button>\n                      You must select at least '

+                     'You must select at least '

                      'one permission.', output_text)

  

              data = {
@@ -4870,7 +4870,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Token created', output_text)

+                 'Token created', output_text)

              self.assertIn(

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn('<h5 class="pl-2 font-weight-bold text-muted">Project Settings</h5>', output_text)
@@ -4924,7 +4924,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Action canceled, try it again',

+                 'Action canceled, try it again',

                  output_text)

              ast.return_value = False

  
@@ -4940,7 +4940,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Token created',

+                 'Token created',

                  output_text)

  

              # Existing token will expire in 60 days
@@ -4958,7 +4958,7 @@ 

              self.assertIn(

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Token revoked',

+                 'Token revoked',

                  output_text)

              self.assertEqual(output_text.count('title="Revoke token">'), 0)

              self.assertEqual(output_text.count('title="Renew token">'), 1)
@@ -5018,7 +5018,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Action canceled, try it again',

+                 'Action canceled, try it again',

                  output_text)

              ast.return_value = False

  
@@ -5034,7 +5034,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Token created',

+                 'Token created',

                  output_text)

  

              # 1 token associated with the project, expires in 60 days
@@ -5053,7 +5053,7 @@ 

              self.assertIn(

                  '<title>Settings - test - Pagure</title>', output_text)

              self.assertIn(

-                 '</button>\n                      Token created',

+                 'Token created',

                  output_text)

              self.assertEqual(output_text.count('title="Revoke token">'), 2)

              self.assertEqual(output_text.count('title="Renew token">'), 0)
@@ -5290,28 +5290,28 @@ 

                  '/test/watch/settings/0', data=data, follow_redirects=True)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      You are no longer'

+                 'You are no longer'

                  ' watching this project', output_text)

  

              output = self.app.post(

                  '/test/watch/settings/1', data=data, follow_redirects=True)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      You are now'

+                 'You are now'

                  ' watching issues and PRs on this project', output_text)

  

              output = self.app.post(

                  '/test/watch/settings/2', data=data, follow_redirects=True)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      You are now'

+                 'You are now'

                  ' watching commits on this project', output_text)

  

              output = self.app.post(

                  '/test/watch/settings/3', data=data, follow_redirects=True)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 ('</button>\n                      You are now'

+                 ('You are now'

                   ' watching issues, PRs, and commits on this project'),

                  output_text)

  
@@ -5334,7 +5334,7 @@ 

                  follow_redirects=True)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Watch status is already reset',

+                 'Watch status is already reset',

                  output_text)

  

              output = self.app.post(
@@ -5342,7 +5342,7 @@ 

                  follow_redirects=True)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      You are no longer'

+                 'You are no longer'

                  ' watching this project', output_text)

  

              output = self.app.post(
@@ -5350,7 +5350,7 @@ 

                  follow_redirects=True)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      You are now'

+                 'You are now'

                  ' watching issues and PRs on this project', output_text)

  

              output = self.app.post(
@@ -5358,7 +5358,7 @@ 

                  follow_redirects=True)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      You are now'

+                 'You are now'

                  ' watching commits on this project', output_text)

  

              output = self.app.post(
@@ -5366,7 +5366,7 @@ 

                  follow_redirects=True)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 ('</button>\n                      You are now'

+                 ('You are now'

                   ' watching issues, PRs, and commits on this project'),

                  output_text)

  
@@ -5375,7 +5375,7 @@ 

                  follow_redirects=True)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Watch status reset',

+                 'Watch status reset',

                  output_text)

  

      def test_delete_report(self):
@@ -5408,7 +5408,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Unknown report: None',

+                 'Unknown report: None',

                  output_text)

  

              # Report specified not in the project's reports
@@ -5421,7 +5421,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Unknown report: foo',

+                 'Unknown report: foo',

                  output_text)

  

              # Create a report
@@ -5471,7 +5471,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      List of reports updated',

+                 'List of reports updated',

                  output_text)

              self.session.commit()

              project = pagure.lib.get_authorized_project(self.session, project_name='test')
@@ -5519,7 +5519,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Unknown report: None',

+                 'Unknown report: None',

                  output_text)

  

              # Report specified not in the project's reports
@@ -5532,7 +5532,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      Unknown report: foo',

+                 'Unknown report: foo',

                  output_text)

  

              # Create a report
@@ -5586,7 +5586,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '</button>\n                      List of reports updated',

+                 'List of reports updated',

                  output_text)

  

              self.session.commit()

@@ -147,7 +147,7 @@ 

                  '/fork/pingou/test/delete', follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      The ACLs of this project '

+                 'The ACLs of this project '

                  'are being refreshed in the backend this prevents the '

                  'project from being deleted. Please wait for this task to '

                  'finish before trying again. Thanks!', output.get_data(as_text=True))

@@ -291,8 +291,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n'

-                 '                      Milestone v2.0 is present 2 times',

+                 'Milestone v2.0 is present 2 times',

                  output_text)

              # Check the result of the action -- Milestones un-changed

              self.session.commit()
@@ -324,8 +323,7 @@ 

                  '<h5 class="pl-2 font-weight-bold text-muted">'

                  'Project Settings</h5>\n', output_text)

              self.assertIn(

-                 '</button>\n'

-                 '                      Milestones updated',

+                 'Milestones updated',

                  output_text)

              # Check the result of the action -- Milestones updated

              self.session.commit()
@@ -518,8 +516,7 @@ 

                      'href="/test/issue/%s/edit" title="Edit this issue">' % cnt,

                      output_text)

                  self.assertIn(

-                     '</button>\n                      '

-                     'Issue set to the milestone: %s\n' % mstone,

+                     'Issue set to the milestone: %s' % mstone,

                      output_text)

                  self.assertIn(

                      '<div class="ml-2" id="milestone_plain">', output_text)

@@ -102,8 +102,8 @@ 

                  '/test/star/1', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      You starred '

-                 'this project\n                    </div>',

+                 'You starred '

+                 'this project',

                  output.get_data(as_text=True)

              )

  
@@ -115,8 +115,8 @@ 

                  '/test/star/0', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      You unstarred '

-                 'this project\n                    </div>',

+                 'You unstarred '

+                 'this project',

                  output.get_data(as_text=True)

              )

              self._check_star_count(data=data, stars=0)
@@ -138,8 +138,8 @@ 

                  '/test/star/1', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      You starred '

-                 'this project\n                    </div>',

+                 'You starred '

+                 'this project',

                  output.get_data(as_text=True)

              )

              self._check_star_count(data=data, stars=1)
@@ -170,8 +170,8 @@ 

                  '/test/star/0', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      You unstarred '

-                 'this project\n                    </div>',

+                 'You unstarred '

+                 'this project',

                  output.get_data(as_text=True)

              )

              self._check_star_count(data=data, stars=0)
@@ -207,8 +207,8 @@ 

                  '/test/star/1', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      You starred '

-                 'this project\n                    </div>',

+                 'You starred '

+                 'this project',

                  output.get_data(as_text=True)

              )

              self._check_star_count(data=data, stars=1)
@@ -238,8 +238,8 @@ 

                  '/test/star/0', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              self.assertIn(

-                 '</button>\n                      You unstarred '

-                 'this project\n                    </div>',

+                 'You unstarred '

+                 'this project',

                  output.get_data(as_text=True)

              )

              self._check_star_count(data=data, stars=0)

Adds all notifications for a single request into a single
box that can be more easily dismissed when there are multiple
notifications. Also absolutely positions the notification so we
don't have to worry about if a page uses a sub-header or not (like
on the repo pages)

The notification body is now white, and the status of each notification
is signifed by the text colour and a small icon.

The welcome message still uses the alert-info colours.

Screenshot_from_2018-06-26_20-02-41.pngScreenshot_from_2018-06-26_20-01-20.pngScreenshot_from_2018-06-26_20-00-15.png

Relates to #3347

Signed-off-by: Ryan Lerch rlerch@redhat.com

rebased onto ec05e152b24a0c913b3d060f6ee01166d00dfeea

5 years ago

Pretty please pagure-ci rebuild

@ryanlerch What happens in a no-JS experience?

And... you need to rebase your code on top of current master. It's failing to do the mergeback to start the test run.

rebased onto 70c221878e597f325e9fc7610f8bad99a161dbba

5 years ago

Pretty please pagure-ci rebuild

Pretty please pagure-ci rebuild

Looks like jenkins is doing something this time :)

Hm, it looks like jenkins aborted the test run but some of the tests didn't pass

rebased onto 6b320d6c6e7d9fe668b8fd438548aaaee806b616

5 years ago

Pretty please pagure-ci rebuild

I didn' t run this code myself, but change itself looks fine and jenkins is happy.

If you are confident about it, go ahead with rebase and merge :)

rebased onto 457592c

5 years ago

Pretty please pagure-ci rebuild

Pull-Request has been merged by pingou

5 years ago
Changes Summary 24