Get this value').must_equal "[Get this value]({{ page.baseurl }}/cloud/project/project-conf-files_services-elastic.html#cloud-es-config-mg)\n"
+ @converter.to_kramdown('
Get this value').must_equal '[Get this value]({{ page.baseurl }}/cloud/project/project-conf-files_services-elastic.html#cloud-es-config-mg)'
+ end
+ end
+
+ describe 'when converting the link with braces in text' do
+ it 'must return the valid inline kramdown link' do
+ @converter.to_kramdown('
Get this {value}').must_equal '[Get this {value}]({{ page.baseurl }}/cloud/project/project-conf-files_services-elastic.html#cloud-es-config-mg)'
end
end
describe 'when converting the external link' do
it 'must return the valid inline kramdown link with trailing new line' do
- @converter.to_kramdown('
Get this value').must_equal "[Get this value](http://www.nokogiri.org/tutorials/modifying_an_html_xml_document.html)\n"
+ @converter.to_kramdown('
Get this value').must_equal '[Get this value](http://www.nokogiri.org/tutorials/modifying_an_html_xml_document.html)'
end
end
describe 'when converting the image with default options and no text and attributes' do
it 'must return the image in Kramdown with trailing new line' do
- @converter.to_kramdown('

').must_equal "\n"
+ @converter.to_kramdown('

').must_equal ''
+ end
+ end
+
+ describe 'when converting an HTML note wrapped in div' do
+ it 'must return its content converted in Kramdown and markdown parsing enabled' do
+ @converter.to_kramdown(<<-HTML
+
+
Don’t configure the module in your local before building and deploying. You’ll configure the module in those environments.
+
+
We recommend using the bin/magento magento-cloud:scd-dump
command for Configuration Management
+ (2.1.X,
+ 2.2.X).
+ If you use the app:config:dump
command, all configuration options for Fastly will be locked from editing in Staging and Production.
+
+ HTML
+ ).must_equal <<-KRAMDOWN
+
+Don’t configure the module in your local before building and deploying. You’ll configure the module in those environments.
+We recommend using the `bin/magento magento-cloud:scd-dump` command for Configuration Management ([2.1.X]({{ site.baseurl }}/guides/v2.1/cloud/live/sens-data-over.html#cloud-config-specific-recomm), [2.2.X]({{ site.baseurl }}/guides/v2.2/cloud/live/sens-data-over.html#cloud-config-specific-recomm)). If you use the `app:config:dump` command, all configuration options for Fastly will be locked from editing in Staging and Production.
+
+ KRAMDOWN
end
end
- describe 'when converting the text with {}' do
- it 'must return {} without escapting' do
- @converter.to_kramdown('{}').must_equal "{}"
+ describe 'when converting a note wrapped in div with mixed HTML and with markdown="1"' do
+ it 'must return the note converted in Kramdown' do
+ @converter.to_kramdown(<<-HTML
+
+Don’t configure the module in your local before building and deploying. You’ll configure the module in those environments.
+
+We recommend using the `bin/magento magento-cloud:scd-dump` command for Configuration Management
+(
2.1.X,
+
2.2.X).
+
If you use the app:config:dump
command, all configuration options for Fastly will be locked from editing in Staging and Production.
+
+ HTML
+ ).must_equal <<-KRAMDOWN
+
+Don’t configure the module in your local before building and deploying. You’ll configure the module in those environments. We recommend using the `bin/magento magento-cloud:scd-dump` command for Configuration Management ([2.1.X]({{ site.baseurl }}/guides/v2.1/cloud/live/sens-data-over.html#cloud-config-specific-recomm), [2.2.X]({{ site.baseurl }}/guides/v2.2/cloud/live/sens-data-over.html#cloud-config-specific-recomm)).
+If you use the `app:config:dump` command, all configuration options for Fastly will be locked from editing in Staging and Production.
+
+ KRAMDOWN
end
end
@@ -104,4 +146,9 @@
)
end
end
+
+ # TODO: TEST
+ #
+ # The extension name is in the format `_`; it's not the same format as the Composer name. Use this format to enable the extension.
+ #
end
diff --git a/test/test_crawler.rb b/test/test_crawler.rb
index 4c32338..2d42bdc 100644
--- a/test/test_crawler.rb
+++ b/test/test_crawler.rb
@@ -89,4 +89,82 @@
)
end
end
+
+ describe 'when converting an HTML note wrapped in div' do
+ it 'must return its content converted in Kramdown and markdown parsing enabled' do
+ @crawler.notes_to_kramdown(<<-HTML
+
+
Don’t configure the module in your local before building and deploying. You’ll configure the module in those environments.
+
+
We recommend using the bin/magento magento-cloud:scd-dump
command for Configuration Management
+(2.1.X,
+ 2.2.X).
+ If you use the app:config:dump
command, all configuration options for Fastly will be locked from editing in Staging and Production.
+
+ HTML
+ ).must_equal <<-KRAMDOWN
+
+Don’t configure the module in your local before building and deploying. You’ll configure the module in those environments.
+We recommend using the `bin/magento magento-cloud:scd-dump` command for Configuration Management ([2.1.X]({{ site.baseurl }}/guides/v2.1/cloud/live/sens-data-over.html#cloud-config-specific-recomm), [2.2.X]({{ site.baseurl }}/guides/v2.2/cloud/live/sens-data-over.html#cloud-config-specific-recomm)). If you use the `app:config:dump` command, all configuration options for Fastly will be locked from editing in Staging and Production.
+
+ KRAMDOWN
+ end
+ end
+
+ describe 'when converting a note wrapped in div with mixed HTML and with markdown="1"' do
+ it 'must return the note converted in Kramdown' do
+ @crawler.notes_to_kramdown(<<-HTML
+
+Don’t configure the module in your local before building and deploying. You’ll configure the module in those environments.
+
+We recommend using the `bin/magento magento-cloud:scd-dump` command for Configuration Management
+(
2.1.X,
+
2.2.X).
+
If you use the app:config:dump
command, all configuration options for Fastly will be locked from editing in Staging and Production.
+
+ HTML
+ ).must_equal <<-KRAMDOWN
+
+Don’t configure the module in your local before building and deploying. You’ll configure the module in those environments. We recommend using the `bin/magento magento-cloud:scd-dump` command for Configuration Management ([2.1.X]({{ site.baseurl }}/guides/v2.1/cloud/live/sens-data-over.html#cloud-config-specific-recomm), [2.2.X]({{ site.baseurl }}/guides/v2.2/cloud/live/sens-data-over.html#cloud-config-specific-recomm)).
+If you use the `app:config:dump` command, all configuration options for Fastly will be locked from editing in Staging and Production.
+
+ KRAMDOWN
+ end
+ end
+
+ describe 'when converting a note wrapped in div with markdown="1" but with no HTML ' do
+ it 'must remain it as is' do
+ @crawler.notes_to_kramdown(<<-HTML
+
+We'll periodically add more cache alternatives so watch this space.
+
+ HTML
+ ).must_equal <<-KRAMDOWN
+
+We'll periodically add more cache alternatives so watch this space.
+
+ KRAMDOWN
+ end
+ end
+
+ ##TOtest
+#
+
+#* Each part has a header and body with `Content-Disposition` header always set to `form-data`.
+#* The `name` value must be set to `file[]` for all parts.
+#* The original filename must be supplied in the `filename` parameter.
+#* The `Content-Type` header must be set to the appropriate mime-type for the file.
+#* The body of each part is the full contents of the raw file.
+#
+
+##TOtest
+#
+#The default configuration is set in [`/dev/tests/functional/etc/config.xml.dist`]({{ site.mage2000url }}dev/tests/functional/etc/config.xml.dist). It should be copied as `config.xml` for further changes.
+#
+
+##TOtest
+#
+
end