Revision 9d825eaa
Added by koszko over 1 year ago
test/unit/test_popup.py | ||
---|---|---|
62 | 62 |
**unprivileged_page_info, |
63 | 63 |
'mapping': 'm1', |
64 | 64 |
'payload': {'identifier': 'res1'} |
65 |
}, |
|
66 |
'error': { |
|
67 |
**unprivileged_page_info, |
|
68 |
'error': True |
|
65 | 69 |
} |
66 | 70 |
} |
67 | 71 |
|
... | ... | |
143 | 147 |
assert by_id['page_url'].text == mocked_page_infos[page_info_key]['url'] |
144 | 148 |
assert not by_id['repo_query_container'].is_displayed() |
145 | 149 |
|
146 |
if 'blocked' in page_info_key or page_info_key == 'mapping':
|
|
150 |
if 'blocked' in page_info_key or page_info_key in ('mapping', 'error'):
|
|
147 | 151 |
assert by_id['scripts_blocked'].text.lower() == 'yes' |
148 | 152 |
elif 'allowed' in page_info_key: |
149 | 153 |
assert by_id['scripts_blocked'].text.lower() == 'no' |
... | ... | |
167 | 171 |
elif 'default' in page_info_key: |
168 | 172 |
'by default_policy)' in mapping_text |
169 | 173 |
|
174 |
if page_info_key == 'error': |
|
175 |
assert mapping_text == 'None (error occured when determining policy)' |
|
176 |
|
|
170 | 177 |
@pytest.mark.ext_data(popup_ext_data) |
171 | 178 |
@pytest.mark.usefixtures('webextension') |
172 | 179 |
def test_popup_repo_query(driver, execute_in_page): |
Also available in: Unified diff
add new root content script