This implements rendering mime-types with content-type 'text/markdown'
and 'text/x-markdown' into HTML in the preview and show views (if not
"dispositioned" as "attachment"), but not in the get view for attached
files (the one opening attachments in an external window.)
* Check if "inline" msg part is actually referred to
If there's no reference to it in a sibling HTML part then we handle it
as a classic attachment (which is shown as downloadable).
* Fetch all msg headers also for images to always get Content-Location
Previously all headers were only fetched for message/rfc822, or
if the Content-Type's "name" parameter was set, or if a Content-ID was
set.
The RFC doesn't require neither the "name" parameter nor a Content-ID
for using Content-Location, though, so we shouldn't depend on those.
Instead now all headers are also fetched if the main part of the
Content-Type is "image", to catch more cases.
* Parse HTML for references only on demand
* Typos and comment formatting
* Don't skip test anymore
We want it tested!
* More MR tests with images
* Remove early special handling for "inline" images
We decide later, which attachment is considered "inline" and which
isn't.
* Remove early resolving of references in TNEF parts
* Testing message rendering of TNEF emails
* Don't use image disposition, it's unreliable
* Split adding raw parts and attachments
* Fix renaming variable
* Rename file to make its test be run
* Remove outdated script
* Annotate test cases with GitHub issue numbers
* Fix test case class name
* remove comment
* Test inline image message rendering
* Rename test file to reflect cases better
* Reduce image used in test email
It doesn't change much, but there's also no sense in decoding big images
that we don't use.
* Remove unused variable initialisation
* Fix displaying message/rfc822 parts
The previous code contained a simple error that assigned the body part
to the $headers variable (which then couldn't be parsed and got
discarded).
* Test rendering of attached message/rfc822 parts
* Revert "Get rid of phpstan/phpstan-strict-rules"
This reverts commit ff59ade31a.
* drop phpstan baseline
* fix foreach phpstan issue
* adjust for rebase
* fix method call case
* ignore one phpstan error even after isset
* Install requited locale in container image
One of the IMAP tests curiuosly ran successfully on Github-runners, but
failed locally. This is the pre-condition for a fix.
* Explicitly require mandatory locale for test
This test works only if executed with LC_COLLATE=en_US
* Schedule to rebuild testrunner image each week
* vcard: Fix whitespace handling in line cont's
Previously, multiple whitespace characters at the start of a
continuation line would all be dropped, instead of only the first one.
Also,
- restrict line continuation characters to SPACE and TAB.
Note that, like before, this identifies the CR (`\r`) character with the
empty string, and thereby notably does not require a CRLF (`\r\n`)
sequence (which is mandated by RFCs 2426, 2425) for line termination
(i.e., `\n` suffices).
Fixes: Bug 1 of issue #9593.
* vcard: Add test for #9593/1
* Fix coding style
* Fix downloading files in tests with new Chromiums
Newer versions of chromium apparently need these flags to download files
without prompting the user.
* Expose port to watch remote browser
This allows to watch the remote controlled browser in your browser at
<http://localhost:7900/?autoconnect=1&resize=scale&password=secret>
(you have to comment out the `--headless` argument in TestCase::driver()
before).
* More ignore-patterns in eslint config
So we don't have to specify them on the command line when we check
codestyle locally.
* Test setup for local and CI using containers
It uses standalone containers for the greenmail IMAP server and the
standalone browser.
A testrunner image is built in the CI (for `linux/amd64` only, because
Github doesn't support multi-platform building on their default
runners and we don't have our own.)
This setup helps to run the tests (reproduceably) also locally.
Previously, on my machine, they produced varying results.
It also reduces the dependencies for running the browser test.
Local execution only depends on `docker compose`, no other tools
(previously it required `sudo`, `java`, and some more.)
The previous solution should still work, if you want it.
The scripts are stored in a directory called `.ci` to hide them a little
and avoid confusion with the container images from the
`roundcubemail-docker` repo.
* Fix UI tests by waiting for element before using it
This only was a flaky problem only occurring sometimes.
* Force a new IMAP connection in plugin tests, too
In other code the initial connection is forced. Doing this here, too,
fixes occasional problems with lost imap connections.
* Make waiting for zipfile's content more robust
* CI: Run tests from script on Windows, too
* CI: Do start local chrome if no connect URL is given
* Move compose.yml to tests/
This way it's less easy mistaken as usable for running Roundcubemail in
production.
* Move compose.yml to .ci/