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

[DPDV-3505] [DPDV-3507] Fix failing Playwright e2e tests and add-on name #87

Merged
merged 2 commits into from
Sep 29, 2023
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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Since Splunk does not have [Docker image for Apple Sillicon](https://github.com/

To clean up container run `docker container rm splunk` command

## Install Security Data Lake Add-On for Splunk to running Docker container
## Install Singularity Data Lake Add-On for Splunk to running Docker container
Assuming application was previously built

### From existing release
Expand Down
4 changes: 2 additions & 2 deletions TA_dataset/app.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": "2.0.0",
"info": {
"title": "Security Data Lake Add-On for Splunk",
"title": "Singularity Data Lake Add-On for Splunk",
"id": {
"group": null,
"name": "TA_dataset",
Expand All @@ -15,7 +15,7 @@
}
],
"releaseDate": null,
"description": "The Security Data Lake Add-On for Splunk provides integration with DataSet by SentinelOne.",
"description": "The Singularity Data Lake Add-On for Splunk provides integration with DataSet by SentinelOne.",
"classification": {
"intendedAudience": "IT",
"categories": [
Expand Down
21 changes: 17 additions & 4 deletions e2e/deploy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {setTimeout} from 'timers/promises';
test('Verify SDL addon is deployed properly', async ({page}) => {
await page.goto('/');
await page.screenshot({ path: 'playwright-screenshots/splunk-launcher-page.png', fullPage: true });
const sdlAddonLinks = page.getByLabel('Navigate to Security Data Lake Add-On for Splunk app');
const sdlAddonLinks = page.getByLabel('Navigate to Singularity Data Lake Add-On for Splunk app');
await expect(sdlAddonLinks).toHaveCount(1);

console.log("Go to DataSet page")
Expand All @@ -17,10 +17,23 @@ test('Verify SDL addon is deployed properly', async ({page}) => {
const configLinks = page.getByRole('link', {name: 'Configuration'});
await expect(configLinks).toHaveCount(1);
await expect(configLinks.first()).toHaveAttribute('href','/en-US/app/TA_dataset/configuration');
const exampleLinks = page.getByRole('link', {name: 'DataSet by Example'});
await expect(exampleLinks).toHaveCount(1);
await expect(exampleLinks.first()).toHaveAttribute('href','/en-US/app/TA_dataset/dataset_by_example');

// Now that add-on contains multiple dashboards, they don't show under main menu item anymore, but
// under "Dashboards" meni item which on click opens a new menu bar
const dashboardsLinks = page.getByRole('link', {name: 'Dashboards'});
await expect(dashboardsLinks).toHaveCount(1);

const searchLinks = page.getByRole('link', {name: 'Search'});
await expect(searchLinks).toHaveCount(1);
await expect(searchLinks.first()).toHaveAttribute('href','/en-US/app/TA_dataset/search');

// Verify all built-in dashboards are present
console.log("Go to Dashboards page");
await page.goto('/app/TA_dataset/dashboards');

await expect(page.getByRole('link', {name: 'Ingestion Summary'})).toHaveCount(1);
await expect(page.getByRole('link', {name: 'SentinelOne Use Case Query Examples'})).toHaveCount(1);
await expect(page.getByRole('link', {name: 'Singularity Data Lake by Example'})).toHaveCount(1);
await expect(page.getByRole('link', {name: 'SOC Search Examples'})).toHaveCount(1);
await expect(page.getByRole('link', {name: 'Splunk App Usage'})).toHaveCount(1);
});
5 changes: 2 additions & 3 deletions e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ export async function goToDataSetConfigurationPage(page: Page) {

export async function goToDataSetExamplesPage(page: Page) {
console.log("Go to DataSet example page");
await page.goto('/app/TA_dataset/dataset_by_example');
await page.getByRole('link', { name: "DataSet by Example" }).click();
await page.goto('/app/TA_dataset/sdl_by_example');

await expect(page).toHaveTitle(/DataSet by Example/);
await expect(page).toHaveTitle(/Singularity Data Lake by Example/);

await expectWithoutErrors(page);
}
Expand Down
2 changes: 1 addition & 1 deletion globalConfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"meta": {
"name": "TA_dataset",
"displayName": "Security Data Lake Add-On for Splunk",
"displayName": "Singularity Data Lake Add-On for Splunk",
"version": "2.0.45-SNAPSHOT",
"restRoot": "TA_dataset",
"schemaVersion": "0.0.3"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dataset-addon-for-splunk",
"version": "1.0.0",
"description": "The Security Data Lake Add-On for Splunk provides integration with [DataSet](https://www.dataset.com) and [XDR](https://www.sentinelone.com/platform/xdr-ingestion) by [SentinelOne](https://sentinelone.com). The key functions allow two-way integration: - SPL custom command to query directly from the Splunk UI. - Inputs to index alerts as CIM-compliant, or any user-defined query results. - Alert action to send events from Splunk.",
"description": "The Singularity Data Lake Add-On for Splunk provides integration with [DataSet](https://www.dataset.com) and [XDR](https://www.sentinelone.com/platform/xdr-ingestion) by [SentinelOne](https://sentinelone.com). The key functions allow two-way integration: - SPL custom command to query directly from the Splunk UI. - Inputs to index alerts as CIM-compliant, or any user-defined query results. - Alert action to send events from Splunk.",
"main": "index.js",
"scripts": {
"playwright": "playwright test",
Expand Down