-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db5ff40
commit c7aa20c
Showing
4 changed files
with
77 additions
and
4 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
x-pack/test/cloud_security_posture_functional/cloud_tests/benchmark_sanity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import expect from '@kbn/expect'; | ||
import { FtrProviderContext } from '../ftr_provider_context'; | ||
|
||
// eslint-disable-next-line import/no-default-export | ||
export default ({ getPageObjects, getService }: FtrProviderContext) => { | ||
const pageObjects = getPageObjects(['common', 'benchmark']); | ||
|
||
describe('Benchmark Page', function () { | ||
this.tags(['cloud_security_posture_ui_sanity']); | ||
let benchmark: typeof pageObjects.benchmark; | ||
|
||
before(async () => { | ||
benchmark = pageObjects.benchmark; | ||
await benchmark.navigateToBenchnmarkPage(); | ||
await benchmark.waitForPluginInitialized(); | ||
}); | ||
|
||
it('Benchmark table exists', async () => { | ||
expect(await benchmark.benchmarkPage.doesBenchmarkTableExists()); | ||
}); | ||
|
||
it('Benchmarks count is more than 0', async () => { | ||
const benchmarksRows = await benchmark.benchmarkPage.getBenchmarkTableRows(); | ||
expect(benchmarksRows.length).to.be.greaterThan(0); | ||
}); | ||
|
||
it('For each benchmark, evaluation and complience are not empty', async () => { | ||
const benchmarksRows = await benchmark.benchmarkPage.getBenchmarkTableRows(); | ||
for (const row of benchmarksRows) { | ||
const benchmarkName = await benchmark.benchmarkPage.getCisNameCellData(row); | ||
const evaluated = await benchmark.benchmarkPage.getEvaluatedCellData(row); | ||
const compliance = await benchmark.benchmarkPage.getComplianceCellData(row); | ||
expect(await evaluated).to.not.contain( | ||
'Add', | ||
`The ${benchmarkName} does not have evaluated data` | ||
); | ||
expect(await compliance).to.not.contain( | ||
'No', | ||
`The ${benchmarkName} does not have compliance data` | ||
); | ||
} | ||
}); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters