mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 00:20:43 -04:00
Always show live key, reword key labels
This is trying to resolve these confusions: - that you’re in trial mode, which means you can’t have a live key yet ( or you can but it wont work, which is what we used to have) - what does simulate mean The create key page is the right place to resolve these confusions because it’s where users are actively reading. This commit also removes the trial mode banner from API integration page because this where users _aren’t_ actively reading. A whole bunch of users weren’t seeing this banner at all. The implementation of the disabled API key options is kinda clunky because WTForms doesn’t have a native way of doing this. ¯\_(ツ)_/¯
This commit is contained in:
@@ -21,7 +21,6 @@ def test_should_show_api_page(
|
||||
assert response.status_code == 200
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
assert page.h1.string.strip() == 'API integration'
|
||||
assert 'Your service is in trial mode' in page.find('div', {'class': 'banner-warning'}).text
|
||||
rows = page.find_all('details')
|
||||
assert len(rows) == 5
|
||||
for index, row in enumerate(rows):
|
||||
@@ -201,10 +200,7 @@ def test_cant_create_normal_api_key_in_trial_mode(
|
||||
'key_type': 'normal'
|
||||
}
|
||||
)
|
||||
assert response.status_code == 200
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
assert page.find('span', {'class': 'error-message'}).text.strip() == 'Not a valid choice'
|
||||
|
||||
assert response.status_code == 400
|
||||
mock_post.assert_not_called()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user