Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/ftr_security_serverless_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ disabled:
- x-pack/test/security_solution_cypress/ai4dsoc_serverless_config.ts

# Playwright
- x-pack/test/security_solution_playwright/serverless_config.ts
- x-pack/solutions/security/test/security_solution_playwright/serverless_config.ts

# MKI only configs files
- x-pack/test_serverless/functional/test_suites/security/config.mki_only.ts
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/ftr_security_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ disabled:
- x-pack/test/security_solution_cypress/config.ts

# Playwright
- x-pack/test/security_solution_playwright/playwright.config.ts
- x-pack/solutions/security/test/security_solution_playwright/playwright.config.ts

# Gen AI Evals run weekly via their own pipeline
- x-pack/test/security_solution_api_integration/test_suites/genai/evaluations/trial_license_complete_tier/configs/ess.config.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- SERVERLESS - Security Solution Playwright Tests"

cd x-pack/test/security_solution_playwright
cd x-pack/solutions/security/test/security_solution_playwright

yarn run:serverless; exit_code=$?; exit $exit_code
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- ESS - Security Solution Playwright Tests"

cd x-pack/test/security_solution_playwright
cd x-pack/solutions/security/test/security_solution_playwright

yarn run:ess; exit_code=$?; exit $exit_code
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2448,7 +2448,7 @@ x-pack/test/security_solution_api_integration/test_suites/sources @elastic/secur
/x-pack/test/security_solution_cypress/cypress/tasks/login.ts @elastic/security-engineering-productivity
/x-pack/test/security_solution_cypress/cypress/tasks/api_calls/common.ts @elastic/security-engineering-productivity
/x-pack/test/security_solution_cypress/es_archives @elastic/security-engineering-productivity
/x-pack/test/security_solution_playwright @elastic/security-engineering-productivity
/x-pack/solutions/security/test/security_solution_playwright @elastic/security-engineering-productivity
/x-pack/solutions/security/plugins/security_solution/scripts/run_cypress @MadameSheema @patrykkopycinski @maximpn @banderror

## Security Solution sub teams - Cloud Security Posture
Expand Down
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ oas_docs/output/kibana.new.yaml
oas_docs/output/kibana.serverless.new.yaml

# Security Solution Playwright
x-pack/test/security_solution_playwright/test-results/
x-pack/test/security_solution_playwright/playwright-report/
x-pack/test/security_solution_playwright/blob-report/
x-pack/test/security_solution_playwright/playwright/.cache/
x-pack/test/security_solution_playwright/.auth/
x-pack/test/security_solution_playwright/.env
x-pack/solutions/security/test/security_solution_playwright/test-results/
x-pack/solutions/security/test/security_solution_playwright/playwright-report/
x-pack/solutions/security/test/security_solution_playwright/blob-report/
x-pack/solutions/security/test/security_solution_playwright/playwright/.cache/
x-pack/solutions/security/test/security_solution_playwright/.auth/
x-pack/solutions/security/test/security_solution_playwright/.env
.codeql
.dependency-graph-log.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,35 @@ import {
DETECTION_ENGINE_RULES_BULK_ACTION,
DETECTION_ENGINE_RULES_URL,
} from '@kbn/security-solution-plugin/common/constants';
import type { QueryRuleCreateProps } from '@kbn/security-solution-plugin/common/api/detection_engine';

import { APIRequestContext } from '@playwright/test';
import { getRuleForAlertTesting } from '../../common/utils/security_solution';
import { getCommonHeadersWithApiVersion } from './headers';

/**
* This is a typical signal testing rule that is easy for most basic testing of output of alerts.
* It starts out in an enabled true state. The 'from' is set very far back to test the basics of signal
* creation and testing by getting all the alerts at once.
* @param ruleId The optional ruleId which is rule-1 by default.
* @param enabled Enables the rule on creation or not. Defaulted to true.
*/
export const getRuleForAlertTesting = (
index: string[],
ruleId = 'rule-1',
enabled = true
): QueryRuleCreateProps => ({
name: 'Alert Testing Query',
description: 'Tests a simple query',
enabled,
risk_score: 1,
rule_id: ruleId,
severity: 'high',
index,
type: 'query',
query: '*:*',
from: '1900-01-01T00:00:00.000Z',
});

const indexes = [
'apm-*-transaction*',
'auditbeat-*',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"author": "Elastic",
"name": "security_solution_playwright",
"version": "1.0.0",
"private": true,
"license": "Elastic License 2.0",
"scripts": {
"playwright:open": "node ../../plugins/security_solution/scripts/run_playwright/start_playwright open --config-file ../../test/security_solution_playwright/playwright.config.ts",
"playwright:run": "node ../../plugins/security_solution/scripts/run_playwright/start_playwright run --config-file ../../test/security_solution_playwright/playwright.config.ts",
"open:ess": "npm run playwright:open -- --ftr-config-file ../../../../test/security_solution_cypress/cli_config",
"run:ess": "npm run playwright:run -- --ftr-config-file ../../../../test/security_solution_cypress/cli_config",
"open:serverless": "npm run playwright:open -- --ftr-config-file ../../../../test/security_solution_cypress/serverless_config",
"run:serverless": "npm run playwright:run -- --ftr-config-file ../../../../test/security_solution_cypress/serverless_config"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"types": ["node"],
"outDir": "target/types"
},
"include": ["index.d.ts"],
"kbn_references": [],
"exclude": [
"target/**/*"
]
}
1 change: 1 addition & 0 deletions x-pack/solutions/security/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@
"@kbn/core-saved-objects-server",
"@kbn/session-view-plugin",
"@kbn/repo-info",
"@kbn/es-archiver",
]
}
15 changes: 0 additions & 15 deletions x-pack/test/security_solution_playwright/package.json

This file was deleted.

17 changes: 0 additions & 17 deletions x-pack/test/security_solution_playwright/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions x-pack/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"@kbn/spaces-plugin",
"@kbn/task-manager-plugin",
"@kbn/test",
"@kbn/repo-info",
"@kbn/tooling-log",
"@kbn/dev-utils",
"@kbn/ftr-common-functional-services",
Expand All @@ -40,8 +39,6 @@
"@kbn/rule-data-utils",
"@kbn/test-subj-selector",
"@kbn/rison",
"@kbn/data-views-plugin",
"@kbn/es-archiver",
"@kbn/es-query",
"@kbn/core-http-common",
"@kbn/dataset-quality-plugin",
Expand Down