* Moved to centralized nuget packages * Handle JsonSchema * Change PackageReference to PackageVersion * Opt out of central package management for mangement api (at least for versions less than 14) and the UI project * ManagePackageVersionsCentrally = false * Change folder acceptance tests are build, to avoid reading the test Directory.Packages.props * Change folder acceptance tests are build, to avoid reading the test Directory.Packages.props * change working directory * workingDirectory * Force the template to use local nuget packages * Force the template to use local nuget packages * clean up * added wait on * added wait on
Umbraco Acceptance Tests
Prerequisites
- NodeJS 16+
- A running installed Umbraco on url: https://localhost:44331 (Default development port)
- Install using a
SqlServer/LocalDbas the tests execute too fast forSqliteto handle.
- Install using a
Getting started
The tests are located in the project/folder as Umbraco.Tests.AcceptanceTests. Make sure you run npm ci & npx playwright install in that folder, or let your IDE do that.
The script will ask you to enter the username and password for a superadmin user of your Umbraco CMS.
Executing tests
There are two npm scripts that can be used to execute the test:
npm run test- Executes the tests headless.
npm run ui- Executes the tests in a browser handled by a playwright application.
In case of errors it is recommended to use await page.pause() so you can step through your test.
Environment Configuration
The environment configuration is begin setup by the npm installation script.
This results in the creation of this file: .env.
This file is already added to .gitignore and can contain values that are different for each developer machine.
The file has the following content:
UMBRACO_USER_LOGIN=email for superadmin
UMBRACO_USER_PASSWORD=password for superadmin
URL=https://localhost:44331
You can change this if you like or run the config script to reset the values, type "npm run config" in your terminal.