Skip to content

Commit

Permalink
add functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed May 21, 2022
1 parent 19e422e commit 2316d84
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,11 @@ export const RelationshipsTable = ({
);

const search = {
query,
onChange: handleOnChange,
// query,
// onChange: handleOnChange,
box: {
incremental: true,
schema: {
fields: { 'meta.title': { type: 'string' } },
},
schema: true,
},
filters: [
{
Expand Down
1 change: 1 addition & 0 deletions test/functional/apps/management/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
loadTestFile(require.resolve('./_test_huge_fields'));
loadTestFile(require.resolve('./_handle_alias'));
loadTestFile(require.resolve('./_handle_version_conflict'));
loadTestFile(require.resolve('./_data_view_relationships'));
});
}
12 changes: 12 additions & 0 deletions test/functional/page_objects/settings_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,13 @@ export class SettingsPageObject extends FtrService {
});
}

async getRelationshipsTabCount() {
return await this.retry.try(async () => {
const text = await this.testSubjects.getVisibleText('tab-relationships');
return text.split(' ')[1].replace(/\((.*)\)/, '$1');
});
}

async getFieldNames() {
const fieldNameCells = await this.testSubjects.findAll('editIndexPattern > indexedFieldName');
return await Promise.all(
Expand Down Expand Up @@ -562,6 +569,11 @@ export class SettingsPageObject extends FtrService {
await this.testSubjects.click('tab-sourceFilters');
}

async clickRelationshipsTab() {
this.log.debug('click Relationships tab');
await this.testSubjects.click('tab-relationships');
}

async editScriptedField(name: string) {
await this.filterField(name);
await this.find.clickByCssSelector('.euiTableRowCell--hasActions button:first-child');
Expand Down

0 comments on commit 2316d84

Please sign in to comment.