Orchard Core goes to Oxford, fake video capture source in Lombiq UI Testing Toolbox - This week in Orchard (28/04/2023)

Fix background task description is no longer editable, add validation type for Validation Summary Part, demo about fake video capture source in Lombiq UI Testing Toolbox, and announce that Orchard Core goes to Oxford! Check out our post for the details!

Orchard Core updates

Fix background task description is no longer editable

There was an issue with the Description of the background tasks were not editable. If you navigate to the admin UI of Orchard Core and head to Configuration -> Features and enable the Background Tasks feature, you can manage your background tasks under Configuration -> Tasks -> Background Tasks.

The Orchard Core solution contains a module called OrchardCore.Demo. If you add it as a project reference to the OrchardCore.Application.Cms.Core.Targets project, you can utilize this module, which contains a test background task. The Lombiq Training Demo for the Orchard Core module also contains a sample of how you can implement your own background task.

Edit background task description

Add Validation type for Validation Summary Part

In the Validation Summary widget, it is useful to be able to specify the type of summary we want to show. By default, we can show all errors. However, in some cases, we may only want to show a model-level error instead of all.

This improvement is about simply adding an option that would allow the user to determine the type of summary to add to the form. By default, it would be all errors.

To utilize this feature, you must enable the Forms feature, which provides widgets to implement forms. Now, if you edit a content item with the Flow Part attached (for example, the Page content item coming from the Blog recipe), you can build a simple form. We added a Form widget to this Page with some other widgets, and of course, with the updated Validation Summary widget. As you can see, now there is a Show Model Only Error checkbox, which you can use to decide to only display model-level errors or all errors.

Add validation type for Validation Summary Part

Demos

Fake video capture source in Lombiq UI Testing Toolbox

Maybe you have already heard about the Lombiq UI Testing Toolbox, our web UI testing toolbox mostly for Orchard Core applications. Everything you need to do UI testing with Selenium for an Orchard app is here. We wrote about it several times here as well, first when we open-sourced it, when we added some Orchard Core Features tests to it, when we added the automated monkey testing feature to it, or when we introduced the Visual verification testing. At the end of last year, we showed you the latest updates about integrating UI testing into Orchard Core and the way how you can use WebApplicationFactory. This time, we will check out a slightly different topic!

Imagine you have an application that uses video sources to access visual information from the user or the environment using Media Capture and Streams API. The goal can be QR or bar code scanning, user identification, or other computer vision applications. To make sure that future changes to the code do not break anything, we need a way to automate testing. Here, the fake video capture source comes into play.

If you check out the documentation, you can see that you can use y4m or mjpeg video files as a fake video capture source in the Chrome browser.

Fake video capture source readme

In the demo, you can see a virtual business card service where the front end is built by Vue.js, and the back end is of course Orchard Core. If you show a QR code for the application, the back end gives you back a content item, which is a Business Card. This sample can be found in the Lombiq Vue.js module for Orchard Core under the Samples folder. Both of these modules are included in Lombiq's Open-Source Orchard Core Extensions solution, so we will open this solution and find the BehaviorVueTests class where you can find two tests, called QrCardScanShouldWorkAsync and QrCardScanShouldReportNotFoundAsync.

QrCard UI Tests

The ConfigureFakeVideoSourceForPositiveTest and ConfigureFakeVideoSourceForNegativeTest extension methods are responsible to retrieve mjpeg files, which are embedded resources that we can utilize for these tests. If you run the QrCardScanShouldWorkAsync test, you will see that the test retrieves the information from the QR code and displays the card's content based on the card ID, which can be found in the QR code.

Video source test

And as always, if you want to know more about this new addition to the Lombiq UI Testing Toolbox for Orchard Core, check out this recording on YouTube!

News from the community

Orchard Core goes to Oxford

Zoltán Lehóczky will give an Orchard Core intro at .NET Oxford on the 16th of May. .NET Oxford is an Oxford-based .NET meetup/user group. It'll be online, so you can join from anywhere if you're just learning about Orchard! Check it out here!

Orchard Core Meetup .NET Oxford

Orchard Harvest Online

As many of you know, we have been working hard over the past months to organize the next Orchard Harvest in Las Vegas after the last Harvest in 2017. Unfortunately, based on the current economic situation and personal feedback, Las Vegas won’t work this year. Not to mention that unfortunately Microsoft Build, announced after we decided on our dates, also falls in line with the original dates we chose. So, a date change was also necessary.

However, we did not want to let go of this opportunity to meet completely. Therefore, we are pleased to inform you that we will be holding our first online Orchard Harvest starting on the 31st of May at 13:00 UTC. You can start your registration for the event right now.

Of course, we are still looking for speakers. You can apply to present by 12 May at the following link: https://forms.office.com/e/pfiExtEUuZ. Jump into the following GitHub discussion for the details!

Orchard Harvest online

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 446 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course.

Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here!

If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!