tools: Allow specifying & capturing screenshots for all integrations.

This commit is contained in:
Puneeth Chaganti
2020-04-26 14:05:13 +05:30
committed by Tim Abbott
parent 04b2653364
commit 752fe58f4f
3 changed files with 143 additions and 11 deletions

View File

@@ -533,3 +533,101 @@ for webhook_integration in WEBHOOK_INTEGRATIONS:
for bot_integration in BOT_INTEGRATIONS:
INTEGRATIONS[bot_integration.name] = bot_integration
# Add integrations that don't have automated screenshots here
NO_SCREENSHOT_WEBHOOKS = {
'beeminder', # FIXME: fixture's goal.losedate needs to be modified dynamically
'ifttt', # Docs don't have a screenshot
'slack_incoming', # Docs don't have a screenshot
'zapier', # Docs don't have a screenshot
}
DOC_SCREENSHOT_CONFIG: Dict[str, List[ScreenshotConfig]] = {
'airbrake': [ScreenshotConfig('error_message.json')],
'alertmanager': [ScreenshotConfig('alert.json', extra_params={'name': 'topic', 'desc': 'description'})],
'ansibletower': [ScreenshotConfig('job_successful_multiple_hosts.json')],
'appfollow': [ScreenshotConfig('review.json')],
'appveyor': [ScreenshotConfig('appveyor_build_success.json')],
'basecamp': [ScreenshotConfig('doc_active.json')],
'beanstalk': [ScreenshotConfig('git_multiple.json', use_basic_auth=True, payload_as_query_param=True)],
# 'beeminder': [ScreenshotConfig('derail_worried.json')],
'bitbucket': [
ScreenshotConfig('push.json', '002.png', use_basic_auth=True,
payload_as_query_param=True)],
'bitbucket2': [
ScreenshotConfig('issue_created.json', '003.png', 'bitbucket',
bot_name='Bitbucket Bot')],
'bitbucket3': [
ScreenshotConfig('repo_push_update_single_branch.json', '004.png', 'bitbucket',
bot_name='Bitbucket Server Bot')],
'buildbot': [ScreenshotConfig('started.json')],
'circleci': [ScreenshotConfig('build_passed.json')],
'clubhouse': [ScreenshotConfig('story_create.json')],
'codeship': [ScreenshotConfig('error_build.json')],
'crashlytics': [ScreenshotConfig('issue_message.json')],
'delighted': [ScreenshotConfig('survey_response_updated_promoter.json')],
'deskdotcom': [ScreenshotConfig('static_text.txt', '009.png', 'desk', use_basic_auth=True)],
'dialogflow': [ScreenshotConfig('weather_app.json', extra_params={'email': 'iago@zulip.com'})],
'dropbox': [ScreenshotConfig('file_updated.json')],
'errbit': [ScreenshotConfig('error_message.json')],
'flock': [ScreenshotConfig('messages.json')],
'freshdesk': [ScreenshotConfig('ticket_created.json', image_name='004.png', use_basic_auth=True)],
'front': [ScreenshotConfig('inbound_message.json')],
'gci': [ScreenshotConfig('task_abandoned_by_student.json')],
'gitea': [ScreenshotConfig('pull_request__merged.json')],
'github': [ScreenshotConfig('push__1_commit.json')],
'gitlab': [ScreenshotConfig('push_hook__push_local_branch_without_commits.json')],
'gocd': [ScreenshotConfig('pipeline.json')],
'gogs': [ScreenshotConfig('pull_request__opened.json')],
'gosquared': [ScreenshotConfig('traffic_spike.json', image_name='000.png')],
'grafana': [ScreenshotConfig('alert.json')],
'greenhouse': [ScreenshotConfig('candidate_stage_change.json', image_name='000.png')],
'groove': [ScreenshotConfig('ticket_started.json')],
'harbor': [ScreenshotConfig('scanning_completed.json')],
'hellosign': [ScreenshotConfig('signatures_signed_by_one_signatory.json',
payload_as_query_param=True, payload_param_name='json')],
'helloworld': [ScreenshotConfig('hello.json')],
'heroku': [ScreenshotConfig('deploy.txt')],
'homeassistant': [ScreenshotConfig('reqwithtitle.json', image_name='003.png')],
'insping': [ScreenshotConfig('website_state_available.json')],
'intercom': [ScreenshotConfig('conversation_admin_replied.json')],
'jira': [ScreenshotConfig('created_v1.json')],
'librato': [ScreenshotConfig('three_conditions_alert.json', payload_as_query_param=True)],
'mention': [ScreenshotConfig('webfeeds.json')],
'netlify': [ScreenshotConfig('deploy_building.json')],
'newrelic': [ScreenshotConfig('alert.txt', '002.png')],
'opbeat': [ScreenshotConfig('error_reopen.json')],
'opsgenie': [ScreenshotConfig('addrecipient.json', image_name='000.png')],
'pagerduty': [ScreenshotConfig('trigger_v2.json')],
'papertrail': [ScreenshotConfig('short_post.json', payload_as_query_param=True)],
'pingdom': [ScreenshotConfig('http_up_to_down.json', image_name='002.png')],
'pivotal': [ScreenshotConfig('v5_type_changed.json')],
'raygun': [ScreenshotConfig('new_error.json')],
'reviewboard': [ScreenshotConfig('review_request_published.json')],
'semaphore': [ScreenshotConfig('pull_request.json')],
'sentry': [ScreenshotConfig('event_for_exception_python.json'),
ScreenshotConfig('issue_assigned_to_team.json', '002.png')],
'slack': [ScreenshotConfig('message_info.txt')],
'solano': [ScreenshotConfig('build_001.json')],
'splunk': [ScreenshotConfig('search_one_result.json')],
'statuspage': [ScreenshotConfig('incident_created.json')],
'stripe': [ScreenshotConfig('charge_succeeded__card.json')],
'taiga': [ScreenshotConfig('userstory_changed_status.json')],
'teamcity': [ScreenshotConfig('success.json'), ScreenshotConfig('personal.json', '002.png')],
'transifex': [ScreenshotConfig('', extra_params={'project': 'Zulip Mobile',
'language': 'en',
'resource': 'file',
'reviewed': '100'})],
'travis': [ScreenshotConfig('build.json', payload_as_query_param=True)],
'trello': [ScreenshotConfig('adding_comment_to_card.json')],
'updown': [ScreenshotConfig('check_multiple_events.json')],
'wordpress': [ScreenshotConfig('publish_post.txt', 'wordpress_post_created.png')],
'yo': [ScreenshotConfig('', '002.png', 'yo-app', extra_params={'email': 'iago@zulip.com',
'username': 'Cordelia'})],
'zabbix': [ScreenshotConfig('zabbix_alert.json')],
'zendesk': [ScreenshotConfig('', '007.png', use_basic_auth=True,
extra_params={'ticket_title': 'Test ticket',
'ticket_id': '4',
'message': 'Test Message'})],
}