Skip to content

Commit

Permalink
Update filter ratio setting numerator denominator function
Browse files Browse the repository at this point in the history
  • Loading branch information
DianaDerevyankina committed Jul 12, 2021
1 parent 107cb2b commit eb187af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
6 changes: 2 additions & 4 deletions test/functional/apps/visualize/_tsvb_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it('should display correct values for filter ratio aggregation with numerator and denominator', async () => {
const EXPECTED = 'OS Filter Ratio\nwin 8 2\nwin xp 0\nwin 7 3\nios 0\nosx 0';
await visualBuilder.selectAggType('Filter Ratio');
await visualBuilder.setFilterRatioNumeratorDenominator(
'extension.raw : "css"',
'bytes <= 3000'
);
await visualBuilder.setFilterRatioNumerator('extension.raw : "css"');
await visualBuilder.setFilterRatioDenominator('bytes <= 3000');
await visChart.waitForVisualizationRenderingStabilized();

const tableData = await visualBuilder.getViewTable();
Expand Down
13 changes: 8 additions & 5 deletions test/functional/page_objects/visual_builder_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -728,14 +728,17 @@ export class VisualBuilderPageObject extends FtrService {
});
}

public async setFilterRatioNumeratorDenominator(
numerator: string = '',
denominator: string = ''
) {
const [numeratorInput, denominatorInput] = await this.find.allByCssSelector(
public async setFilterRatioNumerator(numerator: string) {
const numeratorInput = await this.find.byCssSelector(
'.tvbAggRow [data-test-subj="queryInput"]'
);
await numeratorInput.type(numerator);
}

public async setFilterRatioDenominator(denominator: string) {
const [, denominatorInput] = await this.find.allByCssSelector(
'.tvbAggRow [data-test-subj="queryInput"]'
);
await denominatorInput.type(denominator);
}
}

0 comments on commit eb187af

Please sign in to comment.