Repository: uccser/verto

Issue:
Add all interactives to required files

Discussion:

Patch:
diff --git a/docs/source/processors/interactive.rst b/docs/source/processors/interactive.rst
index 7382d7e..a029332 100644
--- a/docs/source/processors/interactive.rst
+++ b/docs/source/processors/interactive.rst
@@ -74,7 +74,7 @@ Optional Tag Parameters
     The set of filepaths can be accessed after conversion,
     see :ref:`accessing_verto_data`.
 
-The default HTML for button links is:
+The default HTML for an interactive is:
 
 .. literalinclude:: ../../../verto/html-templates/interactive.html
     :language: css+jinja
diff --git a/verto/processors/InteractiveBlockProcessor.py b/verto/processors/InteractiveBlockProcessor.py
index 71ec87b..37a295f 100644
--- a/verto/processors/InteractiveBlockProcessor.py
+++ b/verto/processors/InteractiveBlockProcessor.py
@@ -62,10 +62,11 @@ class InteractiveBlockProcessor(GenericTagBlockProcessor):
         text = argument_values.get('text', None)
         parameters = argument_values.get('parameters', None)
 
+        # add to list of interactives
+        self.required.add(name)
+
         if interactive_type == 'in-page':
             self.scripts.add('interactive/{}/scripts.html'.format(name))
-        if interactive_type != 'whole-page':
-            self.required.add(name)
 
         context = dict()
         context['type'] = interactive_type


Test patch:
diff --git a/verto/tests/InteractiveTest.py b/verto/tests/InteractiveTest.py
index 77f464a..375e56b 100644
--- a/verto/tests/InteractiveTest.py
+++ b/verto/tests/InteractiveTest.py
@@ -6,6 +6,7 @@ from verto.VertoExtension import VertoExtension
 from verto.processors.InteractiveBlockProcessor import InteractiveBlockProcessor
 from verto.tests.ProcessorTest import ProcessorTest
 
+
 class InteractiveTest(ProcessorTest):
     '''The interactive processor is a simple tag with a complex
     output that relies on external systems.
@@ -37,7 +38,7 @@ class InteractiveTest(ProcessorTest):
         expected_string = self.read_test_file(self.processor_name, 'doc_example_in_page_usage_expected.html', strip=True)
         self.assertEqual(expected_string, converted_test_string)
 
-        required_files={
+        required_files = {
             'interactives': {
                 'binary-cards'
             },
@@ -50,7 +51,7 @@ class InteractiveTest(ProcessorTest):
         self.assertEqual(self.verto_extension.required_files, required_files)
 
     def test_doc_example_whole_page(self):
-        '''Example of an whole-page interactive.
+        '''Example of a whole-page interactive.
         '''
         test_string = self.read_test_file(self.processor_name, 'doc_example_whole_page_usage.md')
         blocks = self.to_blocks(test_string)
@@ -61,8 +62,8 @@ class InteractiveTest(ProcessorTest):
         expected_string = self.read_test_file(self.processor_name, 'doc_example_whole_page_usage_expected.html', strip=True)
         self.assertEqual(expected_string, converted_test_string)
 
-        required_files={
-            'interactives': set(),
+        required_files = {
+            'interactives': {"binary-cards"},
             'images': {
                 'binary-cards/thumbnail.png'
             },
@@ -83,7 +84,7 @@ class InteractiveTest(ProcessorTest):
         expected_string = self.read_test_file(self.processor_name, 'doc_example_iframe_usage_expected.html', strip=True)
         self.assertEqual(expected_string, converted_test_string)
 
-        required_files={
+        required_files = {
             'interactives': {
                 'binary-cards'
             },