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

[Lens] Add serverless functional tests #164798

Merged
merged 48 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8646ed2
cleanup ftr services, page objects and tests
nickofthyme Aug 25, 2023
f0827aa
add lens smoke test suites for serverless
nickofthyme Aug 25, 2023
00b978e
add convert to lens tests for agg based with fixtures
nickofthyme Aug 25, 2023
60bdee7
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Aug 25, 2023
566488c
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Aug 25, 2023
44ff92b
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Aug 25, 2023
645eb55
cleanup aggs-based tests, fix typo and db routing
nickofthyme Aug 29, 2023
83439c4
add convert to lens tsvb test suites
nickofthyme Aug 29, 2023
4a7343a
fix dashboard tsvb tests, remove test deps
nickofthyme Aug 30, 2023
e9588c3
add tsvb dashboard test suite
nickofthyme Aug 30, 2023
2da7064
Merge branch 'main' into lens-serverless-fnt
nickofthyme Aug 30, 2023
6ab40ed
Merge remote-tracking branch 'origin/lens-serverless-fnt' into lens-s…
nickofthyme Aug 30, 2023
b8bd7fe
add codeowners for new test dirs
nickofthyme Aug 30, 2023
e38da18
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Aug 30, 2023
5ddf6f6
Merge branch 'main' into lens-serverless-fnt
stratoula Aug 31, 2023
117290d
move tests to common/ and rename to visualizations
nickofthyme Sep 6, 2023
35bfd76
Merge branch 'main' into lens-serverless-fnt
nickofthyme Sep 6, 2023
2edd281
simplify svrl test suite configs
nickofthyme Sep 6, 2023
3ec04e8
Merge branch 'main' into lens-serverless-fnt
stratoula Sep 7, 2023
bd31218
Merge branch 'main' into lens-serverless-fnt
stratoula Sep 8, 2023
d7710fd
Merge branch 'main' into lens-serverless-fnt
nickofthyme Sep 11, 2023
dcce39a
Merge branch 'main' into lens-serverless-fnt
stratoula Sep 13, 2023
8f366bb
Merge branch 'main' into lens-serverless-fnt
stratoula Sep 18, 2023
ce4dcc3
fix method typo
nickofthyme Sep 18, 2023
28d4f0f
Merge branch 'main' into lens-serverless-fnt
nickofthyme Sep 18, 2023
475d6ff
Merge branch 'main' into lens-serverless-fnt
nickofthyme Sep 18, 2023
9587a47
Merge branch 'main' into lens-serverless-fnt
nickofthyme Sep 20, 2023
2db637b
Merge branch 'main' into lens-serverless-fnt
stratoula Sep 25, 2023
692344e
Merge branch 'main' into lens-serverless-fnt
stratoula Sep 25, 2023
c739cad
Merge branch 'main' into lens-serverless-fnt
stratoula Sep 25, 2023
917898a
Merge branch 'main' into lens-serverless-fnt
stratoula Sep 25, 2023
122718f
Merge branch 'main' into lens-serverless-fnt
stratoula Sep 26, 2023
b866c3f
restore skipped tsdb tests
nickofthyme Sep 27, 2023
2e6e34c
fix dataStreams service error
nickofthyme Sep 27, 2023
328caf8
Merge branch 'main' into lens-serverless-fnt
nickofthyme Sep 30, 2023
1db6ed4
add additional group configs
nickofthyme Sep 30, 2023
6b199e8
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Sep 30, 2023
151bd38
add group configs to ftr config
nickofthyme Sep 30, 2023
4da1af2
Merge branch 'main' into lens-serverless-fnt
stratoula Oct 3, 2023
80464d0
Merge branch 'main' into lens-serverless-fnt
stratoula Oct 3, 2023
7318b4c
Fixes types failure
stratoula Oct 3, 2023
d21b15d
Fix failing FTs
stratoula Oct 3, 2023
38c2783
login before all visualizations svl tests
nickofthyme Oct 4, 2023
c1a0028
Merge branch 'main' into lens-serverless-fnt
nickofthyme Oct 4, 2023
e27c9ec
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Oct 4, 2023
3dc8a86
fix flaky dataview selection
nickofthyme Oct 4, 2023
99281fd
Merge branch 'main' into lens-serverless-fnt
nickofthyme Oct 4, 2023
075a542
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Oct 4, 2023
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
3 changes: 3 additions & 0 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,13 +412,16 @@ enabled:
- x-pack/test_serverless/functional/test_suites/observability/config.ts
- x-pack/test_serverless/functional/test_suites/observability/config.examples.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group2.ts
- x-pack/test_serverless/functional/test_suites/search/config.ts
- x-pack/test_serverless/functional/test_suites/search/config.examples.ts
- x-pack/test_serverless/functional/test_suites/search/config.screenshots.ts
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group2.ts
- x-pack/test_serverless/functional/test_suites/security/config.ts
- x-pack/test_serverless/functional/test_suites/security/config.examples.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group2.ts
- x-pack/performance/journeys/ecommerce_dashboard.ts
- x-pack/performance/journeys/ecommerce_dashboard_map_only.ts
- x-pack/performance/journeys/flight_dashboard.ts
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,8 @@ packages/kbn-yarn-lock-validator @elastic/kibana-operations
/test/functional/apps/visualize/ @elastic/kibana-visualizations
/x-pack/test/functional/apps/graph @elastic/kibana-visualizations
/test/api_integration/apis/event_annotations @elastic/kibana-visualizations
/x-pack/test_serverless/functional/test_suites/common/visualizations/ @elastic/kibana-visualizations
/x-pack/test_serverless/functional/fixtures/kbn_archiver/lens/ @elastic/kibana-visualizations

# Global Experience

Expand Down
2 changes: 1 addition & 1 deletion test/functional/page_objects/dashboard_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ export class DashboardPageObject extends FtrService {

await this.gotoDashboardLandingPage();

await this.listingTable.searchForItemWithName(dashboardName);
await this.listingTable.searchForItemWithName(dashboardName, { escape: false });
nickofthyme marked this conversation as resolved.
Show resolved Hide resolved
await this.retry.try(async () => {
await this.listingTable.clickItemLink('dashboard', dashboardName);
await this.header.waitUntilLoadingHasFinished();
Expand Down
2 changes: 1 addition & 1 deletion test/functional/page_objects/visualize_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class VisualizePageObject extends FtrService {
await this.waitForVisualizationSelectPage();
}

public async navigateToLensFromAnotherVisulization() {
public async navigateToLensFromAnotherVisualization() {
nickofthyme marked this conversation as resolved.
Show resolved Hide resolved
const button = await this.testSubjects.find('visualizeEditInLensButton');
await button.click();
}
Expand Down
2 changes: 1 addition & 1 deletion test/functional/services/common/test_subjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class TestSubjects extends FtrService {
* `retry.waitFor()` loops.
*
* When `options.timeout` is not passed the `timeouts.waitForExists` config is used as
* the timeout. The default value for that config is currently 2.5 seconds.
* the timeout. The default value for that config is currently 2.5 seconds (in ms).
*
* If the element is hidden it is not treated as "existing", unless `options.allowHidden`
* is set to `true`.
Expand Down
18 changes: 15 additions & 3 deletions test/functional/services/dashboard/panel_actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,25 @@ export class DashboardPanelActionsService extends FtrService {
throw new Error(`No action matching text "${text}"`);
}

async convertToLens(parent?: WebElementWrapper) {
this.log.debug('convertToLens');
async canConvertToLens(parent?: WebElementWrapper) {
this.log.debug('canConvertToLens');
await this.openContextMenu(parent);
const isActionVisible = await this.testSubjects.exists(CONVERT_TO_LENS_TEST_SUBJ);
if (!isActionVisible) await this.clickContextMenuMoreItem();
const isPanelActionVisible = await this.testSubjects.exists(CONVERT_TO_LENS_TEST_SUBJ);
if (!isPanelActionVisible) await this.clickContextMenuMoreItem();
await this.testSubjects.click(CONVERT_TO_LENS_TEST_SUBJ);
return await this.testSubjects.exists(CONVERT_TO_LENS_TEST_SUBJ, { timeout: 500 });
}

async convertToLens(parent?: WebElementWrapper) {
this.log.debug('convertToLens');

await this.retry.try(async () => {
if (!(await this.canConvertToLens(parent))) {
throw new Error('Convert to Lens option not found');
}

await this.testSubjects.click(CONVERT_TO_LENS_TEST_SUBJ);
});
}
}
2 changes: 0 additions & 2 deletions test/functional/services/listing_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export class ListingTableService extends FtrService {
private readonly log = this.ctx.getService('log');
private readonly retry = this.ctx.getService('retry');
private readonly common = this.ctx.getPageObject('common');
private readonly header = this.ctx.getPageObject('header');

private readonly tagPopoverToggle = this.ctx.getService('menuToggle').create({
name: 'Tag Popover',
Expand Down Expand Up @@ -89,7 +88,6 @@ export class ListingTableService extends FtrService {
} else {
throw new Error('Waiting');
}
await this.header.waitUntilLoadingHasFinished();
nickofthyme marked this conversation as resolved.
Show resolved Hide resolved
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

it('should convert to Lens', async () => {
await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('gaugeChart');
});

Expand All @@ -49,7 +49,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.selectField('machine.ram', 'metrics');
await visEditor.clickGo();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('gaugeChart');

expect(await lens.getLayerCount()).to.be(1);
Expand Down Expand Up @@ -101,7 +101,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

await visEditor.clickGo();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('gaugeChart');

expect(await lens.getLayerCount()).to.be(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

it('should convert to Lens', async () => {
await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('mtrVis');
const data = await lens.getMetricVisualizationData();
expect(data.length).to.be.equal(1);
Expand All @@ -61,7 +61,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.selectField('machine.ram', 'metrics');
await visEditor.clickGo();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('mtrVis');

expect(await lens.getLayerCount()).to.be(1);
Expand Down Expand Up @@ -91,7 +91,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.selectAggregation('Max Bucket', 'metrics');
await visEditor.clickGo();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('mtrVis');

expect(await lens.getLayerCount()).to.be(1);
Expand Down Expand Up @@ -134,7 +134,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

await visEditor.clickGo();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('mtrVis');

expect(await lens.getLayerCount()).to.be(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.selectField('machine.os.raw');
await visEditor.clickGo();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('heatmapChart');
const debugState = await lens.getCurrentChartDebugState('heatmapChart');

Expand Down Expand Up @@ -90,7 +90,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.selectField('machine.os.raw');
await visEditor.clickGo();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('heatmapChart');
const debugState = await lens.getCurrentChartDebugState('heatmapChart');

Expand All @@ -114,7 +114,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.clickGo();
await visChart.waitForVisualizationRenderingStabilized();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('heatmapChart');
const debugState = await lens.getCurrentChartDebugState('heatmapChart');

Expand Down Expand Up @@ -174,7 +174,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.clickGo();
await visChart.waitForVisualizationRenderingStabilized();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('heatmapChart');
const debugState = await lens.getCurrentChartDebugState('heatmapChart');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

it('should convert to Lens', async () => {
await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('mtrVis');
const data = await lens.getMetricVisualizationData();
expect(data.length).to.be.equal(1);
Expand All @@ -62,7 +62,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.selectField('machine.ram', 'metrics');
await visEditor.clickGo();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('mtrVis');

expect(await lens.getLayerCount()).to.be(1);
Expand Down Expand Up @@ -91,7 +91,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.selectAggregation('Max Bucket', 'metrics');
await visEditor.clickGo();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('mtrVis');

expect(await lens.getLayerCount()).to.be(1);
Expand Down Expand Up @@ -146,7 +146,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await backgroundButton.click();
await visEditor.clickGo();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('mtrVis');

expect(await lens.getLayerCount()).to.be(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

it('should let the user return back to Visualize if no changes were made', async () => {
await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('xyVisChart');

await retry.try(async () => {
Expand All @@ -43,7 +43,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

it('should let the user return back to Visualize but show a warning modal if changes happened in Lens', async () => {
await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('xyVisChart');

await retry.try(async () => {
Expand Down Expand Up @@ -72,7 +72,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

it('should let the user return back to Visualize with no modal if changes have been saved in Lens', async () => {
await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('xyVisChart');

await retry.try(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.clickGo();
await header.waitUntilLoadingHasFinished();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('partitionVisChart');

expect(await lens.getLayerCount()).to.be(1);
Expand All @@ -97,7 +97,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.clickGo(isNewChartsLibraryEnabled);
await header.waitUntilLoadingHasFinished();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('partitionVisChart');

const sliceByText = await lens.getDimensionTriggerText('lnsPie_sliceByDimensionPanel', 0);
Expand All @@ -119,7 +119,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.clickGo(isNewChartsLibraryEnabled);
await header.waitUntilLoadingHasFinished();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('partitionVisChart');

let chartSwitcher = await testSubjects.find('lnsChartSwitchPopover');
Expand All @@ -135,7 +135,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.clickGo(isNewChartsLibraryEnabled);
await header.waitUntilLoadingHasFinished();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('partitionVisChart');

chartSwitcher = await testSubjects.find('lnsChartSwitchPopover');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.clickGo();
await header.waitUntilLoadingHasFinished();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('lnsDataTable');

expect(await lens.getLayerCount()).to.be(1);
Expand All @@ -75,7 +75,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.clickGo();
await header.waitUntilLoadingHasFinished();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('lnsDataTable');

expect(await lens.getLayerCount()).to.be(1);
Expand All @@ -95,7 +95,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.clickGo();
await header.waitUntilLoadingHasFinished();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('lnsDataTable');

expect(await lens.getLayerCount()).to.be(1);
Expand All @@ -117,7 +117,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.clickGo();
await header.waitUntilLoadingHasFinished();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('lnsDataTable');

expect(await lens.getLayerCount()).to.be(1);
Expand All @@ -140,7 +140,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.clickGo();
await header.waitUntilLoadingHasFinished();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('lnsDataTable');

expect(await lens.getLayerCount()).to.be(1);
Expand All @@ -162,7 +162,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await visEditor.clickGo();
await header.waitUntilLoadingHasFinished();

await visualize.navigateToLensFromAnotherVisulization();
await visualize.navigateToLensFromAnotherVisualization();
await lens.waitForVisualization('lnsDataTable');

expect(await lens.getLayerCount()).to.be(1);
Expand Down
Loading
Loading