mirror of https://github.com/zulip/zulip.git
docs: Move integrations.html to integrations/index.html.
Add omiting rule for all of integrations docs in test_templates.
This commit is contained in:
parent
62603940a7
commit
5b17622589
|
@ -207,7 +207,7 @@ ZulipMobile/0.5.4 (Android; 4.2; maguro)
|
|||
|
||||
Every Zulip integration must be documented in
|
||||
`zerver/webhooks/mywebhook/doc.html` (or
|
||||
`templates/zerver/integrations.html`, for non-webhook integrations).
|
||||
`templates/zerver/integrations/<integration_name>.html`, for non-webhook integrations).
|
||||
Usually, this involves a few steps:
|
||||
|
||||
* Add text explaining all of the steps required to setup the
|
||||
|
|
|
@ -115,7 +115,7 @@ def check_html_templates(templates, all_dups):
|
|||
'templates/zerver/features.html',
|
||||
'templates/zerver/hello.html',
|
||||
'templates/zerver/home.html',
|
||||
'templates/zerver/integrations.html',
|
||||
'templates/zerver/integrations/index.html',
|
||||
'templates/zerver/invite_user.html',
|
||||
'templates/zerver/login.html',
|
||||
'templates/zerver/markdown_help.html',
|
||||
|
@ -162,7 +162,7 @@ def check_html_templates(templates, all_dups):
|
|||
'templates/zerver/help/main.html',
|
||||
'templates/zerver/home.html',
|
||||
'templates/zerver/index.html',
|
||||
'templates/zerver/integrations.html',
|
||||
'templates/zerver/integrations/index.html',
|
||||
'templates/zerver/keyboard_shortcuts.html',
|
||||
'templates/zerver/landing_nav.html',
|
||||
'templates/zerver/left_sidebar.html',
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re
|
||||
from typing import Any, Dict, Iterable
|
||||
import logging
|
||||
|
||||
|
@ -111,8 +112,11 @@ class TemplateTestCase(ZulipTestCase):
|
|||
'zerver/api_content.json',
|
||||
'zerver/handlebars_compilation_failed.html',
|
||||
]
|
||||
|
||||
integrations_regexp = re.compile('zerver/integrations/.*.html')
|
||||
|
||||
skip = covered + defer + logged_out + logged_in + unusual + ['tests/test_markdown.html', 'zerver/terms.html']
|
||||
templates = [t for t in get_all_templates() if t not in skip]
|
||||
templates = [t for t in get_all_templates() if not (t in skip or integrations_regexp.match(t))]
|
||||
self.render_templates(templates, self.get_context())
|
||||
|
||||
# Test the deferred templates with updated context.
|
||||
|
|
|
@ -99,7 +99,7 @@ def add_integrations_context(context):
|
|||
|
||||
|
||||
class IntegrationView(ApiURLView):
|
||||
template_name = 'zerver/integrations.html'
|
||||
template_name = 'zerver/integrations/index.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
# type: (**Any) -> Dict[str, Any]
|
||||
|
|
Loading…
Reference in New Issue