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 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .buildkite/pipelines/pull_request/scout_ui_tests.yml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a temporary fix to prevent the CI from timing out, I've started a discussion on slack to come up with a long term solution.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ steps:
- command: .buildkite/scripts/steps/functional/scout_ui_tests.sh
label: 'Scout UI Tests'
agents:
machineType: n2-standard-4
machineType: n2-standard-8
preemptible: true
depends_on:
- build
Expand All @@ -11,7 +11,7 @@ steps:
- linting
- linting_with_types
- check_types
timeout_in_minutes: 30
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
Expand Down
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
38 changes: 21 additions & 17 deletions .buildkite/scripts/steps/functional/scout_ui_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,33 @@ 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"
)
run_tests() {
local suit_name=$1
local config_path=$2
local run_mode=$3

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

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"
echo "--- $suit_name ($run_mode) UI Tests"
if ! node scripts/scout run-tests "$run_mode" --config "$config_path" --kibana-install-dir "$KIBANA_DIR"; then
echo "$suit_name: failed"
EXIT_CODE=1
else
echo "$TEST_NAME: passed"
echo "$suit_name: passed"
fi
}

EXIT_CODE=0

# Discovery Enhanced
for run_mode in "--stateful" "--serverless=es" "--serverless=oblt" "--serverless=security"; do
run_tests "Discovery Enhanced" "x-pack/platform/plugins/private/discover_enhanced/ui_tests/playwright.config.ts" "$run_mode"
done

# Observability Onboarding
for run_mode in "--stateful" "--serverless=oblt"; do
run_tests "Observability Onboarding" "x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts" "$run_mode"
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