Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V14 QA Updated Dashboard acceptance tests #15787

Merged
merged 19 commits into from Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/Umbraco.Tests.AcceptanceTest/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/Umbraco.Tests.AcceptanceTest/package.json
Expand Up @@ -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",
Expand Down
Expand Up @@ -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();
}
});
});
Expand Up @@ -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();
}
}
});
Expand Down
Expand Up @@ -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}) => {
Expand Down