V14 QA Updated Dashboard acceptance tests (#15787)

* Added tests for Examine Management tab

* Added tests for Heath Check

* Added tests for Models Builder

* Added tests for Profiling

* Added tests for Published Status

* Bumped version

* Added tests for Welcome Dashboard

* Updated test name

* Bumped version of test helper

* Bumped version of test helpers

* Replace " with '

* Fixed comments

* Bumped version of test helper
This commit is contained in:
Nhu Dinh
2024-02-29 13:26:17 +07:00
committed by GitHub
parent 664473d8eb
commit 9448854942
5 changed files with 39 additions and 33 deletions

View File

@@ -8,7 +8,7 @@
"hasInstallScript": true,
"dependencies": {
"@umbraco/json-models-builders": "^2.0.1 ",
"@umbraco/playwright-testhelpers": "^2.0.0-beta.20",
"@umbraco/playwright-testhelpers": "^2.0.0-beta.21",
"camelize": "^1.0.0",
"dotenv": "^16.3.1",
"faker": "^4.1.0",
@@ -146,9 +146,9 @@
"integrity": "sha512-9tCqYEDHI5RYFQigXFwF1hnCwcWCOJl/hmll0lr5D2Ljjb0o4wphb69wikeJDz5qCEzXCoPvG6ss5SDP6IfOdg=="
},
"node_modules/@umbraco/playwright-testhelpers": {
"version": "2.0.0-beta.20",
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-2.0.0-beta.20.tgz",
"integrity": "sha512-XFkKr1TyEp2l1Nb9hlwODkYK1PAzsdHmtn6yRPu72gWhN5AO8/JTeKWrfhJZIgXPYCo4AhS2Rn9r/1PiXreKNw==",
"version": "2.0.0-beta.21",
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-2.0.0-beta.21.tgz",
"integrity": "sha512-XGjx0vDL+0qAsRh7WWMAUugmT4B2P10SRWRmxKe9F2U6bbB+ZFkgGu1rdLcVZANxW32R+m/dWkP8LqZp4DFPzA==",
"dependencies": {
"@umbraco/json-models-builders": "2.0.1",
"camelize": "^1.0.0",

View File

@@ -21,7 +21,7 @@
},
"dependencies": {
"@umbraco/json-models-builders": "^2.0.1 ",
"@umbraco/playwright-testhelpers": "^2.0.0-beta.20",
"@umbraco/playwright-testhelpers": "^2.0.0-beta.21",
"camelize": "^1.0.0",
"dotenv": "^16.3.1",
"faker": "^4.1.0",

View File

@@ -24,22 +24,25 @@ test.describe('Examine Management Dashboard tests', () => {
test('can view the details of an index', async ({umbracoApi, umbracoUi}) => {
// Arrange
const allIndexersData = await umbracoApi.indexer.getAll();
const indexName = allIndexersData.items[0].name;
const indexData = await umbracoApi.indexer.getByIndexName(indexName);
for (const index of allIndexersData.items) {
const indexName = index.name;
const indexData = await umbracoApi.indexer.getByIndexName(indexName);
// Act
await umbracoUi.examineManagement.clickIndexByName(indexName);
// Act
await umbracoUi.examineManagement.clickIndexByName(indexName);
// Assert
await umbracoUi.examineManagement.doesIndexHaveHealthStatus(indexName, indexData.healthStatus);
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('documentCount', indexData.documentCount.toString());
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('fieldCount', indexData.fieldCount.toString());
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('CommitCount', indexData.providerProperties.CommitCount.toString());
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('DefaultAnalyzer', indexData.providerProperties.DefaultAnalyzer);
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('LuceneDirectory', indexData.providerProperties.LuceneDirectory);
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('LuceneIndexFolder', indexData.providerProperties.LuceneIndexFolder);
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('DirectoryFactory', indexData.providerProperties.DirectoryFactory);
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('EnableDefaultEventHandler', indexData.providerProperties.EnableDefaultEventHandler.toString());
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('PublishedValuesOnly', indexData.providerProperties.PublishedValuesOnly.toString());
// Assert
await umbracoUi.examineManagement.doesIndexHaveHealthStatus(indexName, indexData.healthStatus);
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('documentCount', indexData.documentCount.toString());
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('fieldCount', indexData.fieldCount.toString());
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('CommitCount', indexData.providerProperties.CommitCount.toString());
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('DefaultAnalyzer', indexData.providerProperties.DefaultAnalyzer);
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('LuceneDirectory', indexData.providerProperties.LuceneDirectory);
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('LuceneIndexFolder', indexData.providerProperties.LuceneIndexFolder);
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('DirectoryFactory', indexData.providerProperties.DirectoryFactory);
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('EnableDefaultEventHandler', indexData.providerProperties.EnableDefaultEventHandler.toString());
await umbracoUi.examineManagement.doesIndexPropertyHaveValue('PublishedValuesOnly', indexData.providerProperties.PublishedValuesOnly.toString());
await umbracoUi.goBackPage();
}
});
});

View File

@@ -41,16 +41,19 @@ test.describe('Health Check Dashboard tests', () => {
// Arrange
const allHealthChecksData = await umbracoApi.healthCheck.getAll();
if (allHealthChecksData !== undefined) {
const healthCheckName = allHealthChecksData.items[0].name;
const healthCheckData = await umbracoApi.healthCheck.getByName(healthCheckName);
// Act
await umbracoUi.healthCheck.clickHeathCheckGroupByName(healthCheckName);
// Assert
for (const check of healthCheckData.checks) {
await umbracoUi.healthCheck.isCheckNameVisible(check.name);
await umbracoUi.healthCheck.isCheckDescriptionVisible(check.description);
for (const healthCheck of allHealthChecksData.items) {
const healthCheckName = healthCheck.name;
const healthCheckData = await umbracoApi.healthCheck.getByName(healthCheckName);
// Act
await umbracoUi.healthCheck.clickHeathCheckGroupByName(healthCheckName);
// Assert
for (const check of healthCheckData.checks) {
await umbracoUi.healthCheck.isCheckNameVisible(check.name);
await umbracoUi.healthCheck.isCheckDescriptionVisible(check.description);
}
await umbracoUi.goBackPage();
}
}
});

View File

@@ -8,17 +8,17 @@ test.describe('Published Status Dashboard tests', () => {
await umbracoUi.publishedStatus.clickPublishedStatusTab();
});
test('can view and refresh published cache status', async ({umbracoApi, umbracoUi}) => {
test('can refresh published cache status', async ({umbracoApi, umbracoUi}) => {
// Arrange
const expectedStatus = await umbracoApi.publishedCache.getStatus();
const expectedStatus = await umbracoApi.publishedCache.getStatus();
// Act
await umbracoUi.publishedStatus.clickRefreshStatusButton();
// TODO: create a content item, and check if the ContentStore contains the content or not.
// Assert
await umbracoUi.publishedStatus.isSuccessButtonWithTextVisible('Refresh Status');
await umbracoUi.publishedStatus.isPublishedCacheStatusVisible(expectedStatus);
});
test('can reload the memory cache', async ({umbracoUi}) => {