mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Set accepted files for branding upload
This commit is contained in:
@@ -61,6 +61,7 @@ def test_edit_email_branding_shows_the_correct_branding_info(
|
||||
|
||||
assert page.select_one('#logo-img > img')['src'].endswith('/example.png')
|
||||
assert page.select_one('#name').attrs.get('value') == 'Organisation name'
|
||||
assert page.select_one('#file').attrs.get('accept') == '.png'
|
||||
assert page.select_one('#text').attrs.get('value') == 'Organisation text'
|
||||
assert page.select_one('#colour').attrs.get('value') == '#f00'
|
||||
|
||||
@@ -79,6 +80,7 @@ def test_create_email_branding_does_not_show_any_branding_info(
|
||||
|
||||
assert page.select_one('#logo-img > img') is None
|
||||
assert page.select_one('#name').attrs.get('value') is None
|
||||
assert page.select_one('#file').attrs.get('accept') == '.png'
|
||||
assert page.select_one('#text').attrs.get('value') is None
|
||||
assert page.select_one('#colour').attrs.get('value') is None
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ def test_update_letter_branding_shows_the_current_letter_brand(
|
||||
assert page.find('h1').text == 'Update letter branding'
|
||||
assert page.select_one('#logo-img > img')['src'].endswith('/hm-government.svg')
|
||||
assert page.select_one('#name').attrs.get('value') == 'HM Government'
|
||||
assert page.select_one('#file').attrs.get('accept') == '.svg'
|
||||
|
||||
|
||||
def test_update_letter_branding_with_new_valid_file(
|
||||
@@ -312,6 +313,7 @@ def test_create_letter_branding_does_not_show_branding_info(platform_admin_clien
|
||||
|
||||
assert page.select_one('#logo-img > img') is None
|
||||
assert page.select_one('#name').attrs.get('value') is None
|
||||
assert page.select_one('#file').attrs.get('accept') == '.svg'
|
||||
|
||||
|
||||
def test_create_letter_branding_when_uploading_valid_file(
|
||||
|
||||
Reference in New Issue
Block a user