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

Migrate onboarding Cypress tests to Scout #205482

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,6 @@ const getPipeline = (filename: string, removeSteps = true) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/inventory_cypress.yml'));
}

if (
(await doAnyChangesMatch([
/^x-pack\/solutions\/observability\/plugins\/observability_onboarding/,
/^x-pack\/platform\/plugins\/shared\/fleet/,
])) ||
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
) {
pipeline.push(
getPipeline('.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml')
);
}

if (
(await doAnyChangesMatch([/^x-pack\/solutions\/observability\/plugins\/profiling/])) ||
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
Expand Down Expand Up @@ -392,6 +380,7 @@ const getPipeline = (filename: string, removeSteps = true) => {
if (
(await doAnyChangesMatch([
/^x-pack\/platform\/plugins\/private\/discover_enhanced\/ui_tests/,
/^x-pack\/solutions\/observability\/plugins\/observability_onboarding/,
/^packages\/kbn-scout/,
])) ||
GITHUB_PR_LABELS.includes('ci:scout-ui-tests')
Expand Down
56 changes: 36 additions & 20 deletions .buildkite/scripts/steps/functional/scout_ui_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,45 @@ source .buildkite/scripts/steps/functional/common.sh

export JOB=kibana-scout-ui-tests

TEST_CONFIG="x-pack/platform/plugins/private/discover_enhanced/ui_tests/playwright.config.ts"
KIBANA_DIR="$KIBANA_BUILD_LOCATION"

declare -A TESTS=(
["Stateful"]="--stateful"
["Serverless Elasticsearch"]="--serverless=es"
["Serverless Observability"]="--serverless=oblt"
["Serverless Security"]="--serverless=security"
declare -A TEST_CONFIGS=(
["Discovery Enhanced"]="x-pack/platform/plugins/private/discover_enhanced/ui_tests/playwright.config.ts"
["Observability Onboarding"]="x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts"
)

ORDER=("Stateful" "Serverless Elasticsearch" "Serverless Observability" "Serverless Security")

RUN_MODES_ORDER=("Stateful" "Serverless Elasticsearch" "Serverless Observability" "Serverless Security")
KIBANA_DIR="$KIBANA_BUILD_LOCATION"
EXIT_CODE=0

for TEST_NAME in "${ORDER[@]}"; do
RUN_MODE="${TESTS[$TEST_NAME]}"
echo "--- $TEST_NAME: 'discover_enhanced' plugin UI Tests"
if ! node scripts/scout run-tests "$RUN_MODE" --config "$TEST_CONFIG" --kibana-install-dir "$KIBANA_DIR"; then
echo "$TEST_NAME: failed"
EXIT_CODE=1
else
echo "$TEST_NAME: passed"
fi
for SUITE_NAME in "${!TEST_CONFIGS[@]}"; do
CONFIG_PATH="${TEST_CONFIGS[$SUITE_NAME]}"

for RUN_MODE_NAME in "${RUN_MODES_ORDER[@]}"; do
case "$RUN_MODE_NAME" in
"Stateful")
RUN_MODE="--stateful"
;;
"Serverless Elasticsearch")
RUN_MODE="--serverless=es"
;;
"Serverless Observability")
RUN_MODE="--serverless=oblt"
;;
"Serverless Security")
RUN_MODE="--serverless=security"
;;
*)
echo "Unknown run mode: $RUN_MODE_NAME"
exit 1
;;
esac

echo "--- $SUITE_NAME ($RUN_MODE_NAME) UI Tests"
if ! node scripts/scout run-tests "$RUN_MODE" --config "$CONFIG_PATH" --kibana-install-dir "$KIBANA_DIR"; then
echo "$SUITE_NAME: failed"
EXIT_CODE=1
else
echo "$SUITE_NAME: passed"
fi
done
done

exit $EXIT_CODE
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,6 @@ x-pack/solutions/observability/plugins/observability_ai_assistant_app @elastic/o
x-pack/solutions/observability/plugins/observability_ai_assistant_management @elastic/obs-ai-assistant
x-pack/solutions/observability/plugins/observability_logs_explorer @elastic/obs-ux-logs-team
x-pack/solutions/observability/plugins/observability_onboarding @elastic/obs-ux-logs-team
x-pack/solutions/observability/plugins/observability_onboarding/e2e @elastic/obs-ux-logs-team
x-pack/solutions/observability/plugins/observability_shared @elastic/observability-ui
x-pack/solutions/observability/plugins/observability_solution/entities_data_access @elastic/obs-entities
x-pack/solutions/observability/plugins/observability_solution/entity_manager_app @elastic/obs-entities
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,6 @@
"@kbn/manifest": "link:packages/kbn-manifest",
"@kbn/mock-idp-plugin": "link:packages/kbn-mock-idp-plugin",
"@kbn/mock-idp-utils": "link:packages/kbn-mock-idp-utils",
"@kbn/observability-onboarding-e2e": "link:x-pack/solutions/observability/plugins/observability_onboarding/e2e",
"@kbn/openapi-bundler": "link:packages/kbn-openapi-bundler",
"@kbn/openapi-generator": "link:packages/kbn-openapi-generator",
"@kbn/optimizer": "link:packages/kbn-optimizer",
Expand Down
2 changes: 0 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -1342,8 +1342,6 @@
"@kbn/observability-logs-explorer-plugin/*": ["x-pack/solutions/observability/plugins/observability_logs_explorer/*"],
"@kbn/observability-logs-overview": ["x-pack/platform/packages/shared/observability/logs_overview"],
"@kbn/observability-logs-overview/*": ["x-pack/platform/packages/shared/observability/logs_overview/*"],
"@kbn/observability-onboarding-e2e": ["x-pack/solutions/observability/plugins/observability_onboarding/e2e"],
"@kbn/observability-onboarding-e2e/*": ["x-pack/solutions/observability/plugins/observability_onboarding/e2e/*"],
"@kbn/observability-onboarding-plugin": ["x-pack/solutions/observability/plugins/observability_onboarding"],
"@kbn/observability-onboarding-plugin/*": ["x-pack/solutions/observability/plugins/observability_onboarding/*"],
"@kbn/observability-plugin": ["x-pack/solutions/observability/plugins/observability"],
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading