-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Stack Monitoring] functional tests - properly set test-subj attribute #114491
Conversation
Pinging @elastic/stack-monitoring (Team:Monitoring) |
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
Here's the full diff of all the tweaks I have going, just incase I got something wrong: diff --git a/x-pack/plugins/monitoring/server/config.ts b/x-pack/plugins/monitoring/server/config.ts
index 5c2bdc1424f..ddbfd480a9f 100644
--- a/x-pack/plugins/monitoring/server/config.ts
+++ b/x-pack/plugins/monitoring/server/config.ts
@@ -51,7 +51,7 @@ export const configSchema = schema.object({
}),
min_interval_seconds: schema.number({ defaultValue: 10 }),
show_license_expiration: schema.boolean({ defaultValue: true }),
- render_react_app: schema.boolean({ defaultValue: false }),
+ render_react_app: schema.boolean({ defaultValue: true }),
}),
kibana: schema.object({
collection: schema.object({
diff --git a/x-pack/test/functional/apps/monitoring/index.js b/x-pack/test/functional/apps/monitoring/index.js
index 213007c7b71..9a65a6bd9cc 100644
--- a/x-pack/test/functional/apps/monitoring/index.js
+++ b/x-pack/test/functional/apps/monitoring/index.js
@@ -8,24 +8,24 @@
export default function ({ loadTestFile }) {
describe('Monitoring app', function () {
this.tags('ciGroup1');
- loadTestFile(require.resolve('./feature_controls'));
-
- loadTestFile(require.resolve('./cluster/list'));
- loadTestFile(require.resolve('./cluster/overview'));
- // loadTestFile(require.resolve('./cluster/license'));
-
- loadTestFile(require.resolve('./elasticsearch/overview'));
- loadTestFile(require.resolve('./elasticsearch/overview_mb'));
- loadTestFile(require.resolve('./elasticsearch/nodes'));
- loadTestFile(require.resolve('./elasticsearch/nodes_mb'));
- loadTestFile(require.resolve('./elasticsearch/node_detail'));
- loadTestFile(require.resolve('./elasticsearch/node_detail_mb'));
- loadTestFile(require.resolve('./elasticsearch/indices'));
- loadTestFile(require.resolve('./elasticsearch/indices_mb'));
- loadTestFile(require.resolve('./elasticsearch/index_detail'));
- loadTestFile(require.resolve('./elasticsearch/index_detail_mb'));
- loadTestFile(require.resolve('./elasticsearch/shards'));
- // loadTestFile(require.resolve('./elasticsearch/shard_activity'));
+ // loadTestFile(require.resolve('./feature_controls'));
+
+ // loadTestFile(require.resolve('./cluster/list'));
+ // loadTestFile(require.resolve('./cluster/overview'));
+ // // loadTestFile(require.resolve('./cluster/license'));
+
+ // loadTestFile(require.resolve('./elasticsearch/overview'));
+ // loadTestFile(require.resolve('./elasticsearch/overview_mb'));
+ // loadTestFile(require.resolve('./elasticsearch/nodes'));
+ // loadTestFile(require.resolve('./elasticsearch/nodes_mb'));
+ // loadTestFile(require.resolve('./elasticsearch/node_detail'));
+ // loadTestFile(require.resolve('./elasticsearch/node_detail_mb'));
+ // loadTestFile(require.resolve('./elasticsearch/indices'));
+ // loadTestFile(require.resolve('./elasticsearch/indices_mb'));
+ // loadTestFile(require.resolve('./elasticsearch/index_detail'));
+ // loadTestFile(require.resolve('./elasticsearch/index_detail_mb'));
+ // loadTestFile(require.resolve('./elasticsearch/shards'));
+ // // loadTestFile(require.resolve('./elasticsearch/shard_activity'));
loadTestFile(require.resolve('./kibana/overview'));
loadTestFile(require.resolve('./kibana/overview_mb'));
@@ -34,22 +34,22 @@ export default function ({ loadTestFile }) {
loadTestFile(require.resolve('./kibana/instance'));
loadTestFile(require.resolve('./kibana/instance_mb'));
- // loadTestFile(require.resolve('./logstash/overview'));
- // loadTestFile(require.resolve('./logstash/nodes'));
- // loadTestFile(require.resolve('./logstash/node'));
+ // // loadTestFile(require.resolve('./logstash/overview'));
+ // // loadTestFile(require.resolve('./logstash/nodes'));
+ // // loadTestFile(require.resolve('./logstash/node'));
- loadTestFile(require.resolve('./logstash/pipelines'));
- loadTestFile(require.resolve('./logstash/pipelines_mb'));
+ // loadTestFile(require.resolve('./logstash/pipelines'));
+ // loadTestFile(require.resolve('./logstash/pipelines_mb'));
- loadTestFile(require.resolve('./beats/cluster'));
- loadTestFile(require.resolve('./beats/overview'));
- loadTestFile(require.resolve('./beats/listing'));
- loadTestFile(require.resolve('./beats/beat_detail'));
+ // loadTestFile(require.resolve('./beats/cluster'));
+ // loadTestFile(require.resolve('./beats/overview'));
+ // loadTestFile(require.resolve('./beats/listing'));
+ // loadTestFile(require.resolve('./beats/beat_detail'));
- // loadTestFile(require.resolve('./time_filter'));
- loadTestFile(require.resolve('./enable_monitoring'));
+ // // loadTestFile(require.resolve('./time_filter'));
+ // loadTestFile(require.resolve('./enable_monitoring'));
- loadTestFile(require.resolve('./setup/metricbeat_migration'));
- loadTestFile(require.resolve('./setup/metricbeat_migration_mb'));
+ // loadTestFile(require.resolve('./setup/metricbeat_migration'));
+ // loadTestFile(require.resolve('./setup/metricbeat_migration_mb'));
});
}
diff --git a/x-pack/test/functional/config.js b/x-pack/test/functional/config.js
index 04622c5f21f..05fc895b8f4 100644
--- a/x-pack/test/functional/config.js
+++ b/x-pack/test/functional/config.js
@@ -23,44 +23,44 @@ export default async function ({ readConfigFile }) {
return {
// list paths to the files that contain your plugins tests
testFiles: [
- resolve(__dirname, './apps/advanced_settings'),
- resolve(__dirname, './apps/canvas'),
- resolve(__dirname, './apps/graph'),
+ // resolve(__dirname, './apps/advanced_settings'),
+ // resolve(__dirname, './apps/canvas'),
+ // resolve(__dirname, './apps/graph'),
resolve(__dirname, './apps/monitoring'),
- resolve(__dirname, './apps/watcher'),
- resolve(__dirname, './apps/dashboard'),
- resolve(__dirname, './apps/discover'),
- resolve(__dirname, './apps/security'),
- resolve(__dirname, './apps/spaces'),
- resolve(__dirname, './apps/logstash'),
- resolve(__dirname, './apps/grok_debugger'),
- resolve(__dirname, './apps/infra'),
- resolve(__dirname, './apps/ml'),
- resolve(__dirname, './apps/rollup_job'),
- resolve(__dirname, './apps/maps'),
- resolve(__dirname, './apps/status_page'),
- resolve(__dirname, './apps/upgrade_assistant'),
- resolve(__dirname, './apps/visualize'),
- resolve(__dirname, './apps/uptime'),
- resolve(__dirname, './apps/saved_objects_management'),
- resolve(__dirname, './apps/dev_tools'),
- resolve(__dirname, './apps/apm'),
- resolve(__dirname, './apps/api_keys'),
- resolve(__dirname, './apps/index_patterns'),
- resolve(__dirname, './apps/index_management'),
- resolve(__dirname, './apps/index_lifecycle_management'),
- resolve(__dirname, './apps/ingest_pipelines'),
- resolve(__dirname, './apps/snapshot_restore'),
- resolve(__dirname, './apps/cross_cluster_replication'),
- resolve(__dirname, './apps/remote_clusters'),
- resolve(__dirname, './apps/transform'),
- resolve(__dirname, './apps/reporting_management'),
- resolve(__dirname, './apps/management'),
- resolve(__dirname, './apps/reporting'),
- resolve(__dirname, './apps/lens'), // smokescreen tests cause flakiness in other tests
-
- // This license_management file must be last because it is destructive.
- resolve(__dirname, './apps/license_management'),
+ // resolve(__dirname, './apps/watcher'),
+ // resolve(__dirname, './apps/dashboard'),
+ // resolve(__dirname, './apps/discover'),
+ // resolve(__dirname, './apps/security'),
+ // resolve(__dirname, './apps/spaces'),
+ // resolve(__dirname, './apps/logstash'),
+ // resolve(__dirname, './apps/grok_debugger'),
+ // resolve(__dirname, './apps/infra'),
+ // resolve(__dirname, './apps/ml'),
+ // resolve(__dirname, './apps/rollup_job'),
+ // resolve(__dirname, './apps/maps'),
+ // resolve(__dirname, './apps/status_page'),
+ // resolve(__dirname, './apps/upgrade_assistant'),
+ // resolve(__dirname, './apps/visualize'),
+ // resolve(__dirname, './apps/uptime'),
+ // resolve(__dirname, './apps/saved_objects_management'),
+ // resolve(__dirname, './apps/dev_tools'),
+ // resolve(__dirname, './apps/apm'),
+ // resolve(__dirname, './apps/api_keys'),
+ // resolve(__dirname, './apps/index_patterns'),
+ // resolve(__dirname, './apps/index_management'),
+ // resolve(__dirname, './apps/index_lifecycle_management'),
+ // resolve(__dirname, './apps/ingest_pipelines'),
+ // resolve(__dirname, './apps/snapshot_restore'),
+ // resolve(__dirname, './apps/cross_cluster_replication'),
+ // resolve(__dirname, './apps/remote_clusters'),
+ // resolve(__dirname, './apps/transform'),
+ // resolve(__dirname, './apps/reporting_management'),
+ // resolve(__dirname, './apps/management'),
+ // resolve(__dirname, './apps/reporting'),
+ // resolve(__dirname, './apps/lens'), // smokescreen tests cause flakiness in other tests
+
+ // // This license_management file must be last because it is destructive.
+ // resolve(__dirname, './apps/license_management'),
],
services,
diff --git a/x-pack/test/functional/services/monitoring/cluster_overview.js b/x-pack/test/functional/services/monitoring/cluster_overview.js
index 7e888d6233f..2c41edf90f8 100644
--- a/x-pack/test/functional/services/monitoring/cluster_overview.js
+++ b/x-pack/test/functional/services/monitoring/cluster_overview.js
@@ -76,7 +76,7 @@ export function MonitoringClusterOverviewProvider({ getService }) {
}
closeAlertsModal() {
- return testSubjects.click('alerts-modal-remind-later-button');
+ // return testSubjects.click('alerts-modal-remind-later-button');
}
acceptAlertsModal() { |
@elasticmachine merge upstream |
You shouldn't have to do all that commenting, you can just run:
You will still need to set the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passed when running on MBP. Not sure why my linux attempt didn't work. Can also observe failures around debg Find.findByCssSelector('[data-test-subj="clusterItemContainerKibana"] [data-test-subj="kbnOverview"]') with timeout=10000
with similar adjustments to master.
LGTM! Hoping I can come up with a better way of running these things over time :)
@simianhacker Saw this --grep argument somewhere but got misled by the naming, thought it would filter logs but turns out it's executing tests with a matching description. Should've read the --help command :) From mocha documentation
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
#114491) (#115137) * properly set test-subj attribute * fix prettier error * Fixing ESLinting issue Co-authored-by: Chris Cowan <[email protected]> Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kevin Lacabane <[email protected]> Co-authored-by: Chris Cowan <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Summary
Fixes #114487
Nothing broke, just a couple of misplaced
test-subj
attributes.Testing
Disabled closeAlertsModal and ran
./kibana/*
tests. One test is currently skipped, I'll check if it can be enabled separately.render_react_app
to true https://github.com/elastic/kibana/blob/master/x-pack/plugins/monitoring/server/config.ts#L54comment out non-monitoring tests in test config - should that be a glob argument ?comment out non-kibana tests in monitoring confignode scripts/functional_tests_server --config x-pack/test/functional/config.js
node scripts/functional_test_runner.js --config x-pack/test/functional/config.js --grep "Monitoring app Kibana"