[7.3] Change data-test-subj selector logic to support value with spaces (#43682) (#45509)

* Change data-test-subj selector logic to support value with spaces (#43682)

* update test-subj-selector

* update locators

* adjust whitespaces removal

* fix another locator

* fix ML test locators

* fix merge leftovers

* more fixes

* update loocator
This commit is contained in:
Dmitry Lemeshko 2019-09-13 10:32:41 +02:00 committed by GitHub
parent f2a5ddb287
commit f603ec1e1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 264 additions and 244 deletions

View file

@ -19,12 +19,20 @@
function selectorToTerms(selector) {
return selector
.replace(/\s*&\s*/g, '&') // remove all whitespace around joins
.split(/\s+/);
.replace(/\s*~\s*/g, '~') // css locator with '~' operator cannot contain spaces
.replace(/\s*>\s*/g, '>') // remove all whitespace around joins >
.replace(/\s*&\s*/g, '&') // remove all whitespace around joins &
.split(/>+/);
}
function termToCssSelector(term) {
return term ? '[data-test-subj~="' + term + '"]' : '';
if (term) {
return term.startsWith('~')
? '[data-test-subj~="' + term.substring(1).replace(/\s/g, '') + '"]'
: '[data-test-subj="' + term + '"]';
} else {
return '';
}
}
module.exports = function testSubjSelector(selector) {

View file

@ -22,8 +22,15 @@ const expect = require('@kbn/expect');
describe('testSubjSelector()', function() {
it('converts subjectSelectors to cssSelectors', function() {
expect(testSubjSelector('foo bar')).to.eql('[data-test-subj~="foo"] [data-test-subj~="bar"]');
expect(testSubjSelector('foo&bar')).to.eql('[data-test-subj~="foo"][data-test-subj~="bar"]');
expect(testSubjSelector('foo & bar')).to.eql('[data-test-subj~="foo"][data-test-subj~="bar"]');
expect(testSubjSelector('foo bar')).to.eql('[data-test-subj="foo bar"]');
expect(testSubjSelector('foo > bar')).to.eql('[data-test-subj="foo"] [data-test-subj="bar"]');
expect(testSubjSelector('foo > bar baz')).to.eql(
'[data-test-subj="foo"] [data-test-subj="bar baz"]'
);
expect(testSubjSelector('foo> ~bar')).to.eql('[data-test-subj="foo"] [data-test-subj~="bar"]');
expect(testSubjSelector('~ foo')).to.eql('[data-test-subj~="foo"]');
expect(testSubjSelector('~foo & ~ bar')).to.eql(
'[data-test-subj~="foo"][data-test-subj~="bar"]'
);
});
});

View file

@ -56,7 +56,7 @@ export function SettingsPageProvider({ getService, getPageObjects }) {
// check for the index pattern info flyout that covers the
// create index pattern button on smaller screens
if (await testSubjects.exists('CreateIndexPatternPrompt')) {
await testSubjects.click('CreateIndexPatternPrompt euiFlyoutCloseButton');
await testSubjects.click('CreateIndexPatternPrompt > euiFlyoutCloseButton');
}
}
@ -208,21 +208,21 @@ export function SettingsPageProvider({ getService, getPageObjects }) {
}
async getFieldNames() {
const fieldNameCells = await testSubjects.findAll('editIndexPattern indexedFieldName');
const fieldNameCells = await testSubjects.findAll('editIndexPattern > indexedFieldName');
return await mapAsync(fieldNameCells, async cell => {
return (await cell.getVisibleText()).trim();
});
}
async getFieldTypes() {
const fieldNameCells = await testSubjects.findAll('editIndexPattern indexedFieldType');
const fieldNameCells = await testSubjects.findAll('editIndexPattern > indexedFieldType');
return await mapAsync(fieldNameCells, async cell => {
return (await cell.getVisibleText()).trim();
});
}
async getScriptedFieldLangs() {
const fieldNameCells = await testSubjects.findAll('editIndexPattern scriptedFieldLang');
const fieldNameCells = await testSubjects.findAll('editIndexPattern > scriptedFieldLang');
return await mapAsync(fieldNameCells, async cell => {
return (await cell.getVisibleText()).trim();
});

View file

@ -596,26 +596,26 @@ export function VisualizePageProvider({ getService, getPageObjects, updateBaseli
}
async setSize(newValue, aggId) {
const dataTestSubj = aggId ? `aggregationEditor${aggId} sizeParamEditor` : 'sizeParamEditor';
const dataTestSubj = aggId ? `aggregationEditor${aggId} > sizeParamEditor` : 'sizeParamEditor';
await testSubjects.setValue(dataTestSubj, String(newValue));
}
async toggleDisabledAgg(agg) {
await testSubjects.click(`aggregationEditor${agg} disableAggregationBtn`);
await testSubjects.click(`aggregationEditor${agg} > disableAggregationBtn`);
await PageObjects.header.waitUntilLoadingHasFinished();
}
async toggleAggregationEditor(agg) {
await testSubjects.click(`aggregationEditor${agg} toggleEditor`);
await testSubjects.click(`aggregationEditor${agg} > toggleEditor`);
await PageObjects.header.waitUntilLoadingHasFinished();
}
async toggleOtherBucket(agg = 2) {
return await testSubjects.click(`aggregationEditor${agg} otherBucketSwitch`);
return await testSubjects.click(`aggregationEditor${agg} > otherBucketSwitch`);
}
async toggleMissingBucket(agg = 2) {
return await testSubjects.click(`aggregationEditor${agg} missingBucketSwitch`);
return await testSubjects.click(`aggregationEditor${agg} > missingBucketSwitch`);
}
async isApplyEnabled() {

View file

@ -164,11 +164,11 @@ export function ComboBoxProvider({ getService, getPageObjects }: FtrProviderCont
const menu = await retry.try(async () => {
await testSubjects.click(comboBoxSelector);
await this.waitForOptionsListLoading(comboBox);
const isOptionsListOpen = await testSubjects.exists('comboBoxOptionsList');
const isOptionsListOpen = await testSubjects.exists('~comboBoxOptionsList');
if (!isOptionsListOpen) {
throw new Error('Combo box options list did not open on click');
}
return await testSubjects.find('comboBoxOptionsList');
return await testSubjects.find('~comboBoxOptionsList');
});
const optionsText = await menu.getVisibleText();
await this.closeOptionsList(comboBox);
@ -240,7 +240,7 @@ export function ComboBoxProvider({ getService, getPageObjects }: FtrProviderCont
* @param comboBoxElement element that wraps up EuiComboBox
*/
public async closeOptionsList(comboBoxElement: WebElementWrapper): Promise<void> {
const isOptionsListOpen = await testSubjects.exists('comboBoxOptionsList');
const isOptionsListOpen = await testSubjects.exists('~comboBoxOptionsList');
if (isOptionsListOpen) {
const input = await comboBoxElement.findByTagName('input');
await input.pressKeys(browser.keys.ESCAPE);
@ -253,7 +253,7 @@ export function ComboBoxProvider({ getService, getPageObjects }: FtrProviderCont
* @param comboBoxElement element that wraps up EuiComboBox
*/
public async openOptionsList(comboBoxElement: WebElementWrapper): Promise<void> {
const isOptionsListOpen = await testSubjects.exists('comboBoxOptionsList');
const isOptionsListOpen = await testSubjects.exists('~comboBoxOptionsList');
if (!isOptionsListOpen) {
const toggleBtn = await comboBoxElement.findByCssSelector(
'[data-test-subj="comboBoxToggleListButton"]'

View file

@ -37,7 +37,7 @@ export function DocTableProvider({ getService, getPageObjects }: FtrProviderCont
public async getRowsText() {
const table = await this.getTable();
const $ = await table.parseDomContent();
return $.findTestSubjects('docTableRow')
return $.findTestSubjects('~docTableRow')
.toArray()
.map((row: any) =>
$(row)
@ -96,7 +96,7 @@ export function DocTableProvider({ getService, getPageObjects }: FtrProviderCont
public async getFields(options: { isAnchorRow: boolean } = { isAnchorRow: false }) {
const table = await this.getTable();
const $ = await table.parseDomContent();
const rowLocator = options.isAnchorRow ? 'docTableAnchorRow' : 'docTableRow';
const rowLocator = options.isAnchorRow ? '~docTableAnchorRow' : '~docTableRow';
const rows = $.findTestSubjects(rowLocator).toArray();
const fields = rows.map((row: any) =>
$(row)
@ -110,7 +110,7 @@ export function DocTableProvider({ getService, getPageObjects }: FtrProviderCont
public async getHeaderFields(): Promise<string[]> {
const table = await this.getTable();
const $ = await table.parseDomContent();
return $.findTestSubjects('docTableHeaderField')
return $.findTestSubjects('~docTableHeaderField')
.toArray()
.map((field: any) =>
$(field)

View file

@ -34,8 +34,8 @@ export function FilterBarProvider({ getService, getPageObjects }: FtrProviderCon
*/
public async hasFilter(key: string, value: string, enabled: boolean = true): Promise<boolean> {
const filterActivationState = enabled ? 'enabled' : 'disabled';
return await testSubjects.exists(
`filter & filter-key-${key} & filter-value-${value} & filter-${filterActivationState}`,
return testSubjects.exists(
`filter filter-${filterActivationState} filter-key-${key} filter-value-${value}`,
{
allowHidden: true,
}
@ -48,7 +48,7 @@ export function FilterBarProvider({ getService, getPageObjects }: FtrProviderCon
* @param key field name
*/
public async removeFilter(key: string): Promise<void> {
await testSubjects.click(`filter & filter-key-${key}`);
await testSubjects.click(`~filter & ~filter-key-${key}`);
await testSubjects.click(`deleteFilter`);
await PageObjects.header.awaitGlobalLoadingIndicatorHidden();
}
@ -69,19 +69,19 @@ export function FilterBarProvider({ getService, getPageObjects }: FtrProviderCon
* @param key field name
*/
public async toggleFilterEnabled(key: string): Promise<void> {
await testSubjects.click(`filter & filter-key-${key}`);
await testSubjects.click(`~filter & ~filter-key-${key}`);
await testSubjects.click(`disableFilter`);
await PageObjects.header.awaitGlobalLoadingIndicatorHidden();
}
public async toggleFilterPinned(key: string): Promise<void> {
await testSubjects.click(`filter & filter-key-${key}`);
await testSubjects.click(`~filter & ~filter-key-${key}`);
await testSubjects.click(`pinFilter`);
await PageObjects.header.awaitGlobalLoadingIndicatorHidden();
}
public async getFilterCount(): Promise<number> {
const filters = await testSubjects.findAll('filter');
const filters = await testSubjects.findAll('~filter');
return filters.length;
}
@ -138,7 +138,7 @@ export function FilterBarProvider({ getService, getPageObjects }: FtrProviderCon
* @param value field value
*/
public async clickEditFilter(key: string, value: string): Promise<void> {
await testSubjects.click(`filter & filter-key-${key} & filter-value-${value}`);
await testSubjects.click(`~filter & ~filter-key-${key} & ~filter-value-${value}`);
await testSubjects.click(`editFilter`);
await PageObjects.header.awaitGlobalLoadingIndicatorHidden();
}
@ -147,7 +147,7 @@ export function FilterBarProvider({ getService, getPageObjects }: FtrProviderCon
* Returns available phrases in the filter
*/
public async getFilterEditorSelectedPhrases(): Promise<string[]> {
return await comboBox.getComboBoxSelectedOptions('filterParamsComboBox');
return await comboBox.getComboBoxSelectedOptions('~filterParamsComboBox');
}
/**

View file

@ -25,11 +25,11 @@ export function GlobalNavProvider({ getService }: FtrProviderContext) {
class GlobalNav {
public async moveMouseToLogo(): Promise<void> {
await testSubjects.moveMouseTo('headerGlobalNav logo');
await testSubjects.moveMouseTo('headerGlobalNav > logo');
}
public async clickLogo(): Promise<void> {
return await testSubjects.click('headerGlobalNav logo');
return await testSubjects.click('headerGlobalNav > logo');
}
public async exists(): Promise<boolean> {
@ -37,11 +37,15 @@ export function GlobalNavProvider({ getService }: FtrProviderContext) {
}
public async getFirstBreadcrumb(): Promise<string> {
return await testSubjects.getVisibleText('headerGlobalNav breadcrumbs first&breadcrumb');
return await testSubjects.getVisibleText(
'headerGlobalNav > breadcrumbs > ~breadcrumb & ~first'
);
}
public async getLastBreadcrumb(): Promise<string> {
return await testSubjects.getVisibleText('headerGlobalNav breadcrumbs last&breadcrumb');
return await testSubjects.getVisibleText(
'headerGlobalNav > breadcrumbs > ~breadcrumb & ~last'
);
}
public async badgeExistsOrFail(expectedLabel: string): Promise<void> {

View file

@ -37,7 +37,7 @@ describe('LogEntryActionsMenu component', () => {
elementWrapper.update();
expect(
elementWrapper.find(`a${testSubject('uptimeLogEntryActionsMenuItem')}`).prop('href')
elementWrapper.find(`a${testSubject('~uptimeLogEntryActionsMenuItem')}`).prop('href')
).toMatchInlineSnapshot(`"/app/uptime#/?search=(host.ip:HOST_IP)"`);
});
@ -65,7 +65,7 @@ describe('LogEntryActionsMenu component', () => {
elementWrapper.update();
expect(
elementWrapper.find(`a${testSubject('uptimeLogEntryActionsMenuItem')}`).prop('href')
elementWrapper.find(`a${testSubject('~uptimeLogEntryActionsMenuItem')}`).prop('href')
).toMatchInlineSnapshot(`"/app/uptime#/?search=(container.id:CONTAINER_ID)"`);
});
@ -93,7 +93,7 @@ describe('LogEntryActionsMenu component', () => {
elementWrapper.update();
expect(
elementWrapper.find(`a${testSubject('uptimeLogEntryActionsMenuItem')}`).prop('href')
elementWrapper.find(`a${testSubject('~uptimeLogEntryActionsMenuItem')}`).prop('href')
).toMatchInlineSnapshot(`"/app/uptime#/?search=(kubernetes.pod.uid:POD_UID)"`);
});
@ -125,7 +125,7 @@ describe('LogEntryActionsMenu component', () => {
elementWrapper.update();
expect(
elementWrapper.find(`a${testSubject('uptimeLogEntryActionsMenuItem')}`).prop('href')
elementWrapper.find(`a${testSubject('~uptimeLogEntryActionsMenuItem')}`).prop('href')
).toMatchInlineSnapshot(
`"/app/uptime#/?search=(container.id:CONTAINER_ID OR host.ip:HOST_IP OR kubernetes.pod.uid:POD_UID)"`
);
@ -156,7 +156,7 @@ describe('LogEntryActionsMenu component', () => {
expect(
elementWrapper
.find(`button${testSubject('uptimeLogEntryActionsMenuItem')}`)
.find(`button${testSubject('~uptimeLogEntryActionsMenuItem')}`)
.prop('disabled')
).toEqual(true);
});
@ -187,7 +187,7 @@ describe('LogEntryActionsMenu component', () => {
elementWrapper.update();
expect(
elementWrapper.find(`a${testSubject('apmLogEntryActionsMenuItem')}`).prop('href')
elementWrapper.find(`a${testSubject('~apmLogEntryActionsMenuItem')}`).prop('href')
).toMatchInlineSnapshot(
`"/app/apm#/traces?kuery=${encodeURIComponent(
'trace.id:1234567'
@ -223,7 +223,7 @@ describe('LogEntryActionsMenu component', () => {
elementWrapper.update();
expect(
elementWrapper.find(`a${testSubject('apmLogEntryActionsMenuItem')}`).prop('href')
elementWrapper.find(`a${testSubject('~apmLogEntryActionsMenuItem')}`).prop('href')
).toMatchInlineSnapshot(
`"/app/apm#/traces?kuery=${encodeURIComponent(
'trace.id:1234567'
@ -255,7 +255,7 @@ describe('LogEntryActionsMenu component', () => {
elementWrapper.update();
expect(
elementWrapper.find(`button${testSubject('apmLogEntryActionsMenuItem')}`).prop('disabled')
elementWrapper.find(`button${testSubject('~apmLogEntryActionsMenuItem')}`).prop('disabled')
).toEqual(true);
});
});

View file

@ -16,7 +16,7 @@ export default function canvasSmokeTest({ getService, getPageObjects }) {
describe('smoke test', function () {
this.tags('smoke');
const workpadListSelector = 'canvasWorkpadLoaderTable canvasWorkpadLoaderWorkpad';
const workpadListSelector = 'canvasWorkpadLoaderTable > canvasWorkpadLoaderWorkpad';
const testWorkpadId = 'workpad-1705f884-6224-47de-ba49-ca224fe6ec31';
before(async () => {
@ -58,7 +58,7 @@ export default function canvasSmokeTest({ getService, getPageObjects }) {
await retry.try(async () => {
// check for elements on the page
const elements = await testSubjects.findAll(
'canvasWorkpadPage canvasWorkpadPageElementContent'
'canvasWorkpadPage > canvasWorkpadPageElementContent'
);
expect(elements).to.have.length(4);

View file

@ -25,7 +25,7 @@ export default function codeIntelligenceFunctionalTests({
// FAILING: https://github.com/elastic/kibana/issues/36480
describe.skip('Code Intelligence', () => {
describe('Code intelligence in source view page', () => {
const repositoryListSelector = 'codeRepositoryList codeRepositoryItem';
const repositoryListSelector = 'codeRepositoryList > codeRepositoryItem';
const testGoToDefinition = async () => {
await retry.try(async () => {
expect(await testSubjects.exists('codeSourceViewer')).to.be(true);

View file

@ -26,7 +26,7 @@ export default function exploreRepositoryFunctionalTests({
describe('Explore Repository', function() {
this.tags('smoke');
describe('Explore a repository', () => {
const repositoryListSelector = 'codeRepositoryList codeRepositoryItem';
const repositoryListSelector = 'codeRepositoryList > codeRepositoryItem';
before(async () => {
// Navigate to the code app.

View file

@ -25,7 +25,7 @@ export default function manageRepositoriesFunctionalTests({
// FLAKY: https://github.com/elastic/kibana/issues/36495
describe.skip('History', () => {
const repositoryListSelector = 'codeRepositoryList codeRepositoryItem';
const repositoryListSelector = 'codeRepositoryList > codeRepositoryItem';
describe('browser history can go back while exploring code app', () => {
let driver: any;

View file

@ -19,7 +19,7 @@ export default function manageRepositoriesFunctionalTests({
const PageObjects = getPageObjects(['common', 'header', 'security', 'code', 'home']);
describe('Manage Repositories', () => {
const repositoryListSelector = 'codeRepositoryList codeRepositoryItem';
const repositoryListSelector = 'codeRepositoryList > codeRepositoryItem';
describe('Manage Repositories', () => {
before(async () => {

View file

@ -17,10 +17,11 @@ export default function searchFunctonalTests({ getService, getPageObjects }: Tes
describe('Search', function() {
this.tags('smoke');
const symbolTypeaheadListSelector = 'codeTypeaheadList-symbol codeTypeaheadItem';
const fileTypeaheadListSelector = 'codeTypeaheadList-file codeTypeaheadItem';
const searchResultListSelector = 'codeSearchResultList codeSearchResultFileItem';
const languageFilterListSelector = 'codeSearchLanguageFilterList codeSearchLanguageFilterItem';
const symbolTypeaheadListSelector = 'codeTypeaheadList-symbol > codeTypeaheadItem';
const fileTypeaheadListSelector = 'codeTypeaheadList-file > codeTypeaheadItem';
const searchResultListSelector = 'codeSearchResultList > codeSearchResultFileItem';
const languageFilterListSelector =
'codeSearchLanguageFilterList > codeSearchLanguageFilterItem';
describe('Code Search', () => {
before(async () => {

View file

@ -16,7 +16,7 @@ export default function testWithSecurity({ getService, getPageObjects }: TestInv
const dummyPassword = '123321';
const codeAdmin = 'codeAdmin';
const codeUser = 'codeUser';
const repositoryListSelector = 'codeRepositoryList codeRepositoryItem';
const repositoryListSelector = 'codeRepositoryList > codeRepositoryItem';
const manageButtonSelectors = ['indexRepositoryButton', 'deleteRepositoryButton'];
const log = getService('log');
const security = getService('security');

View file

@ -157,7 +157,7 @@ export default function ({ getService, getPageObjects }) {
.to.be(`${tableData[index].alertIcon} ${tableData[index].alertText}`);
});
await PageObjects.monitoring.clickBreadcrumb('breadcrumbClusters');
await PageObjects.monitoring.clickBreadcrumb('~breadcrumbClusters');
});
});
@ -183,7 +183,7 @@ export default function ({ getService, getPageObjects }) {
await alertAction.click();
expect(await indices.isOnListing()).to.be(true);
await PageObjects.monitoring.clickBreadcrumb('breadcrumbClusters');
await PageObjects.monitoring.clickBreadcrumb('~breadcrumbClusters');
});
it('with alert on listing table page', async () => {
@ -194,7 +194,7 @@ export default function ({ getService, getPageObjects }) {
await alertAction.click();
expect(await indices.isOnListing()).to.be(true);
await PageObjects.monitoring.clickBreadcrumb('breadcrumbClusters');
await PageObjects.monitoring.clickBreadcrumb('~breadcrumbClusters');
});
});

View file

@ -131,7 +131,7 @@ export default function ({ getService, getPageObjects }) {
expect(await clusterOverview.isOnClusterOverview()).to.be(true);
expect(await clusterOverview.getClusterName()).to.be('production');
await PageObjects.monitoring.clickBreadcrumb('breadcrumbClusters'); // reset for next test
await PageObjects.monitoring.clickBreadcrumb('~breadcrumbClusters'); // reset for next test
});
});

View file

@ -16,7 +16,7 @@ export default function ({ getService, getPageObjects }) {
describe('Elasticsearch index detail', () => {
afterEach(async () => {
await PageObjects.monitoring.clickBreadcrumb('breadcrumbEsIndices'); // return back for next test
await PageObjects.monitoring.clickBreadcrumb('~breadcrumbEsIndices'); // return back for next test
await indicesList.clearFilter();
});

View file

@ -33,7 +33,7 @@ export default function ({ getService, getPageObjects }) {
});
afterEach(async () => {
await PageObjects.monitoring.clickBreadcrumb('breadcrumbEsNodes'); // return back for next test
await PageObjects.monitoring.clickBreadcrumb('~breadcrumbEsNodes'); // return back for next test
});
it('should show node summary of master node with 20 indices and 38 shards', async () => {

View file

@ -31,7 +31,7 @@ export default function ({ getService, getPageObjects }) {
describe('Shard Allocation Per Node', () => {
before(async () => {
// start on cluster overview
await PageObjects.monitoring.clickBreadcrumb('breadcrumbClusters');
await PageObjects.monitoring.clickBreadcrumb('~breadcrumbClusters');
await PageObjects.header.waitUntilLoadingHasFinished();
@ -41,7 +41,7 @@ export default function ({ getService, getPageObjects }) {
});
afterEach(async () => {
await PageObjects.monitoring.clickBreadcrumb('breadcrumbEsNodes'); // return back for next test
await PageObjects.monitoring.clickBreadcrumb('~breadcrumbEsNodes'); // return back for next test
});
it('master-data node with 20 indices and 38 shards', async () => {
@ -98,7 +98,7 @@ export default function ({ getService, getPageObjects }) {
describe('Shard Allocation Per Index', () => {
before(async () => {
// start on cluster overview
await PageObjects.monitoring.clickBreadcrumb('breadcrumbClusters');
await PageObjects.monitoring.clickBreadcrumb('~breadcrumbClusters');
// go to indices listing
await overview.clickEsIndices();
@ -106,7 +106,7 @@ export default function ({ getService, getPageObjects }) {
});
afterEach(async () => {
await PageObjects.monitoring.clickBreadcrumb('breadcrumbEsIndices'); // return back for next test
await PageObjects.monitoring.clickBreadcrumb('~breadcrumbEsIndices'); // return back for next test
});
it('green status index with full shard allocation', async () => {

View file

@ -500,7 +500,7 @@ export function GisPageProvider({ getService, getPageObjects }) {
}
async openInspectorMapView() {
await inspector.openInspectorView('inspectorViewChooserMap');
await inspector.openInspectorView('~inspectorViewChooserMap');
}
// Method should only be used when multiple requests are expected

View file

@ -157,7 +157,7 @@ export function ReportingPageProvider({ getService, getPageObjects }) {
});
// Close toast so it doesn't obscure the UI.
if (isToastPresent) {
await testSubjects.click('completeReportSuccess toastCloseButton');
await testSubjects.click('completeReportSuccess > toastCloseButton');
}
return isToastPresent;

View file

@ -14,13 +14,13 @@ export function GrokDebuggerProvider({ getService }) {
// test subject selectors
const SUBJ_CONTAINER = 'grokDebugger';
const SUBJ_UI_ACE_EVENT_INPUT = `${SUBJ_CONTAINER} aceEventInput codeEditorContainer`;
const SUBJ_UI_ACE_PATTERN_INPUT = `${SUBJ_CONTAINER} acePatternInput codeEditorContainer`;
const SUBJ_UI_ACE_CUSTOM_PATTERNS_INPUT = `${SUBJ_CONTAINER} aceCustomPatternsInput codeEditorContainer`;
const SUBJ_UI_ACE_EVENT_OUTPUT = `${SUBJ_CONTAINER} aceEventOutput codeEditorContainer`;
const SUBJ_UI_ACE_EVENT_INPUT = `${SUBJ_CONTAINER} > aceEventInput > codeEditorContainer`;
const SUBJ_UI_ACE_PATTERN_INPUT = `${SUBJ_CONTAINER} > acePatternInput > codeEditorContainer`;
const SUBJ_UI_ACE_CUSTOM_PATTERNS_INPUT = `${SUBJ_CONTAINER} > aceCustomPatternsInput > codeEditorContainer`;
const SUBJ_UI_ACE_EVENT_OUTPUT = `${SUBJ_CONTAINER} > aceEventOutput > codeEditorContainer`;
const SUBJ_BTN_TOGGLE_CUSTOM_PATTERNS_INPUT = `${SUBJ_CONTAINER} btnToggleCustomPatternsInput`;
const SUBJ_BTN_SIMULATE = `${SUBJ_CONTAINER} btnSimulate`;
const SUBJ_BTN_TOGGLE_CUSTOM_PATTERNS_INPUT = `${SUBJ_CONTAINER} > btnToggleCustomPatternsInput`;
const SUBJ_BTN_SIMULATE = `${SUBJ_CONTAINER} > btnSimulate`;
return new class GrokDebugger {
async clickSimulate() {

View file

@ -13,19 +13,19 @@ export function InfraLogStreamProvider({ getService }: KibanaFunctionalTestDefau
return {
async getColumnHeaderLabels(): Promise<string[]> {
const columnHeaderElements: WebElementWrapper[] = await testSubjects.findAll(
'logColumnHeader'
'~logColumnHeader'
);
return await Promise.all(columnHeaderElements.map(element => element.getVisibleText()));
},
async getStreamEntries(): Promise<WebElementWrapper[]> {
return await testSubjects.findAll('streamEntry');
return await testSubjects.findAll('~streamEntry');
},
async getLogColumnsOfStreamEntry(
entryElement: WebElementWrapper
): Promise<WebElementWrapper[]> {
return await testSubjects.findAllDescendant('logColumn', entryElement);
return await testSubjects.findAllDescendant('~logColumn', entryElement);
},
};
}

View file

@ -66,10 +66,10 @@ export function InfraSourceConfigurationFlyoutProvider({
await (await this.getAddLogColumnButton()).click();
const popover = await this.getAddLogColumnPopover();
await (await testSubjects.findDescendant('fieldSearchInput', popover)).type(fieldName);
await (await testSubjects.findDescendant(`addFieldLogColumn:${fieldName}`, popover)).click();
await (await testSubjects.findDescendant(`~addFieldLogColumn:${fieldName}`, popover)).click();
},
async getLogColumnPanels(): Promise<WebElementWrapper[]> {
return await testSubjects.findAllDescendant('logColumnPanel', await this.getFlyout());
return await testSubjects.findAllDescendant('~logColumnPanel', await this.getFlyout());
},
async removeLogColumn(columnIndex: number) {
const logColumnPanel = (await this.getLogColumnPanels())[columnIndex];

View file

@ -10,19 +10,19 @@ export function MonitoringBeatDetailProvider({ getService }) {
const SUBJ_DETAIL_PAGE = 'beatDetailPage';
const SUBJ_SUMMARY_01 = 'beatSummaryStatus01';
const SUBJ_SUMMARY_NAME = `${SUBJ_SUMMARY_01} name`;
const SUBJ_SUMMARY_VERSION = `${SUBJ_SUMMARY_01} version`;
const SUBJ_SUMMARY_TYPE = `${SUBJ_SUMMARY_01} type`;
const SUBJ_SUMMARY_HOST = `${SUBJ_SUMMARY_01} host`;
const SUBJ_SUMMARY_OUTPUT = `${SUBJ_SUMMARY_01} output`;
const SUBJ_SUMMARY_CONFIG_RELOADS = `${SUBJ_SUMMARY_01} configReloads`;
const SUBJ_SUMMARY_UPTIME = `${SUBJ_SUMMARY_01} uptime`;
const SUBJ_SUMMARY_NAME = `${SUBJ_SUMMARY_01} > name`;
const SUBJ_SUMMARY_VERSION = `${SUBJ_SUMMARY_01} > version`;
const SUBJ_SUMMARY_TYPE = `${SUBJ_SUMMARY_01} > type`;
const SUBJ_SUMMARY_HOST = `${SUBJ_SUMMARY_01} > host`;
const SUBJ_SUMMARY_OUTPUT = `${SUBJ_SUMMARY_01} > output`;
const SUBJ_SUMMARY_CONFIG_RELOADS = `${SUBJ_SUMMARY_01} > configReloads`;
const SUBJ_SUMMARY_UPTIME = `${SUBJ_SUMMARY_01} > uptime`;
const SUBJ_SUMMARY_02 = 'beatSummaryStatus02';
const SUBJ_SUMMARY_EVENTS_TOTAL = `${SUBJ_SUMMARY_02} eventsTotal`;
const SUBJ_SUMMARY_EVENTS_EMITTED = `${SUBJ_SUMMARY_02} eventsEmitted`;
const SUBJ_SUMMARY_EVENTS_DROPPED = `${SUBJ_SUMMARY_02} eventsDropped`;
const SUBJ_SUMMARY_BYTES_WRITTEN = `${SUBJ_SUMMARY_02} bytesWritten`;
const SUBJ_SUMMARY_EVENTS_TOTAL = `${SUBJ_SUMMARY_02} > eventsTotal`;
const SUBJ_SUMMARY_EVENTS_EMITTED = `${SUBJ_SUMMARY_02} > eventsEmitted`;
const SUBJ_SUMMARY_EVENTS_DROPPED = `${SUBJ_SUMMARY_02} > eventsDropped`;
const SUBJ_SUMMARY_BYTES_WRITTEN = `${SUBJ_SUMMARY_02} > bytesWritten`;
return new class BeatDetail {

View file

@ -14,8 +14,8 @@ export function MonitoringBeatsListingProvider({ getService, getPageObjects }) {
const SUBJ_NO_RECENT_ACTIVITY_MESSAGE = 'noRecentActivityMessage';
const SUBJ_TABLE_CONTAINER = 'beatsTableContainer';
const SUBJ_SEARCH_BAR = `${SUBJ_TABLE_CONTAINER} monitoringTableToolBar`;
const SUBJ_INDEX_LINK_PREFIX = `${SUBJ_TABLE_CONTAINER} beatLink-`;
const SUBJ_SEARCH_BAR = `${SUBJ_TABLE_CONTAINER} > monitoringTableToolBar`;
const SUBJ_INDEX_LINK_PREFIX = `${SUBJ_TABLE_CONTAINER} > beatLink-`;
return new class BeatsListing {

View file

@ -8,10 +8,10 @@ export function MonitoringBeatsSummaryStatusProvider({ getService }) {
const testSubjects = getService('testSubjects');
const SUBJ_SUMMARY = 'beatsSummaryStatus';
const SUBJ_TYPES_COUNTS = `${SUBJ_SUMMARY} typeCount`;
const SUBJ_TYPES_COUNTS = `${SUBJ_SUMMARY} > typeCount`;
const SUBJ_TOTAL_EVENTS = `${SUBJ_SUMMARY} totalEvents`;
const SUBJ_BYTES_SENT = `${SUBJ_SUMMARY} bytesSent`;
const SUBJ_TOTAL_EVENTS = `${SUBJ_SUMMARY} > totalEvents`;
const SUBJ_BYTES_SENT = `${SUBJ_SUMMARY} > bytesSent`;
return new class BeatsSummaryStatus {

View file

@ -19,14 +19,14 @@ export function MonitoringClusterAlertsProvider({ getService, getPageObjects })
const SUBJ_OVERVIEW_ICONS =
`[data-test-subj="${SUBJ_OVERVIEW_CLUSTER_ALERTS}"] ` +
`[data-test-subj="topAlertItem"] .euiCallOutHeader__title`;
const SUBJ_OVERVIEW_TEXTS = `${SUBJ_OVERVIEW_CLUSTER_ALERTS} alertText`;
const SUBJ_OVERVIEW_ACTIONS = `${SUBJ_OVERVIEW_CLUSTER_ALERTS} alertAction`;
const SUBJ_OVERVIEW_VIEW_ALL = `${SUBJ_OVERVIEW_CLUSTER_ALERTS} viewAllAlerts`;
const SUBJ_OVERVIEW_TEXTS = `${SUBJ_OVERVIEW_CLUSTER_ALERTS} > alertText`;
const SUBJ_OVERVIEW_ACTIONS = `${SUBJ_OVERVIEW_CLUSTER_ALERTS} > alertAction`;
const SUBJ_OVERVIEW_VIEW_ALL = `${SUBJ_OVERVIEW_CLUSTER_ALERTS} > viewAllAlerts`;
const SUBJ_TABLE_BODY = 'alertsTableContainer';
const SUBJ_TABLE_ICONS = `${SUBJ_TABLE_BODY} alertIcon`;
const SUBJ_TABLE_TEXTS = `${SUBJ_TABLE_BODY} alertText`;
const SUBJ_TABLE_ACTIONS = `${SUBJ_TABLE_BODY} alertAction`;
const SUBJ_TABLE_ICONS = `${SUBJ_TABLE_BODY} > alertIcon`;
const SUBJ_TABLE_TEXTS = `${SUBJ_TABLE_BODY} > alertText`;
const SUBJ_TABLE_ACTIONS = `${SUBJ_TABLE_BODY} > alertAction`;
return new class ClusterAlerts {
@ -56,7 +56,7 @@ export function MonitoringClusterAlertsProvider({ getService, getPageObjects })
*/
getOverviewAlerts() {
return testSubjects.findAll(`${SUBJ_OVERVIEW_CLUSTER_ALERTS} topAlertItem`);
return testSubjects.findAll(`${SUBJ_OVERVIEW_CLUSTER_ALERTS} > topAlertItem`);
}
async getOverviewAlertsAll() {

View file

@ -10,10 +10,10 @@ export function MonitoringClusterListProvider({ getService, getPageObjects }) {
const PageObjects = getPageObjects(['monitoring']);
const SUBJ_TABLE_CONTAINER = 'clusterTableContainer';
const SUBJ_TABLE_NO_DATA = `${SUBJ_TABLE_CONTAINER} monitoringTableNoData`;
const SUBJ_SEARCH_BAR = `${SUBJ_TABLE_CONTAINER} monitoringTableToolBar`;
const SUBJ_TABLE_NO_DATA = `${SUBJ_TABLE_CONTAINER} > monitoringTableNoData`;
const SUBJ_SEARCH_BAR = `${SUBJ_TABLE_CONTAINER} > monitoringTableToolBar`;
const SUBJ_CLUSTER_ROW_PREFIX = `${SUBJ_TABLE_CONTAINER} clusterRow_`;
const SUBJ_CLUSTER_ROW_PREFIX = `${SUBJ_TABLE_CONTAINER} > clusterRow_`;
return new class ClusterList {
@ -42,31 +42,31 @@ export function MonitoringClusterListProvider({ getService, getPageObjects }) {
}
getClusterLink(clusterUuid) {
return testSubjects.find(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} clusterLink`);
return testSubjects.find(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} > clusterLink`);
}
getClusterName(clusterUuid) {
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} clusterLink`);
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} > clusterLink`);
}
getClusterStatus(clusterUuid) {
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} alertsStatus`);
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} > alertsStatus`);
}
getClusterNodesCount(clusterUuid) {
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} nodesCount`);
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} > nodesCount`);
}
getClusterIndicesCount(clusterUuid) {
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} indicesCount`);
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} > indicesCount`);
}
getClusterDataSize(clusterUuid) {
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} dataSize`);
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} > dataSize`);
}
getClusterLogstashCount(clusterUuid) {
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} logstashCount`);
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} > logstashCount`);
}
getClusterKibanaCount(clusterUuid) {
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} kibanaCount`);
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} > kibanaCount`);
}
getClusterLicense(clusterUuid) {
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} clusterLicense`);
return testSubjects.getVisibleText(`${SUBJ_CLUSTER_ROW_PREFIX}${clusterUuid} > clusterLicense`);
}
};
}

View file

@ -12,46 +12,46 @@ export function MonitoringClusterOverviewProvider({ getService }) {
const SUBJ_CLUSTER_ALERTS = `clusterAlertsContainer`;
const SUBJ_CLUSTER_OVERVIEW = 'clusterOverviewContainer';
const SUBJ_CLUSTER_NAME = `${SUBJ_CLUSTER_OVERVIEW} clusterName`;
const SUBJ_CLUSTER_NAME = `${SUBJ_CLUSTER_OVERVIEW} > clusterName`;
const SUBJ_ES_PANEL = `clusterItemContainerElasticsearch`;
const SUBJ_ES_STATUS = `${SUBJ_ES_PANEL} statusIcon`;
const SUBJ_ES_VERSION = `${SUBJ_ES_PANEL} esVersion`;
const SUBJ_ES_UPTIME = `${SUBJ_ES_PANEL} esUptime`;
const SUBJ_ES_OVERVIEW = `${SUBJ_ES_PANEL} esOverview`;
const SUBJ_ES_NUMBER_OF_NODES = `${SUBJ_ES_PANEL} esNumberOfNodes`;
const SUBJ_ES_DISK_AVAILABLE = `${SUBJ_ES_PANEL} esDiskAvailable`;
const SUBJ_ES_JVM_HEAP = `${SUBJ_ES_PANEL} esJvmHeap`;
const SUBJ_ES_NUMBER_OF_INDICES = `${SUBJ_ES_PANEL} esNumberOfIndices`;
const SUBJ_ES_DOCUMENTS_COUNT = `${SUBJ_ES_PANEL} esDocumentsCount`;
const SUBJ_ES_DISK_USAGE = `${SUBJ_ES_PANEL} esDiskUsage`;
const SUBJ_ES_PRIMARY_SHARDS = `${SUBJ_ES_PANEL} esPrimaryShards`;
const SUBJ_ES_REPLICA_SHARDS = `${SUBJ_ES_PANEL} esReplicaShards`;
const SUBJ_ES_ML_JOBS = `${SUBJ_ES_PANEL} esMlJobs`;
const SUBJ_ES_STATUS = `${SUBJ_ES_PANEL} > statusIcon`;
const SUBJ_ES_VERSION = `${SUBJ_ES_PANEL} > esVersion`;
const SUBJ_ES_UPTIME = `${SUBJ_ES_PANEL} > esUptime`;
const SUBJ_ES_OVERVIEW = `${SUBJ_ES_PANEL} > esOverview`;
const SUBJ_ES_NUMBER_OF_NODES = `${SUBJ_ES_PANEL} > esNumberOfNodes`;
const SUBJ_ES_DISK_AVAILABLE = `${SUBJ_ES_PANEL} > esDiskAvailable`;
const SUBJ_ES_JVM_HEAP = `${SUBJ_ES_PANEL} > esJvmHeap`;
const SUBJ_ES_NUMBER_OF_INDICES = `${SUBJ_ES_PANEL} > esNumberOfIndices`;
const SUBJ_ES_DOCUMENTS_COUNT = `${SUBJ_ES_PANEL} > esDocumentsCount`;
const SUBJ_ES_DISK_USAGE = `${SUBJ_ES_PANEL} > esDiskUsage`;
const SUBJ_ES_PRIMARY_SHARDS = `${SUBJ_ES_PANEL} > esPrimaryShards`;
const SUBJ_ES_REPLICA_SHARDS = `${SUBJ_ES_PANEL} > esReplicaShards`;
const SUBJ_ES_ML_JOBS = `${SUBJ_ES_PANEL} > esMlJobs`;
const SUBJ_KBN_PANEL = `clusterItemContainerKibana`;
const SUBJ_KBN_STATUS = `${SUBJ_KBN_PANEL} statusIcon`;
const SUBJ_KBN_REQUESTS = `${SUBJ_KBN_PANEL} kbnRequests`;
const SUBJ_KBN_MAX_RESPONSE_TIME = `${SUBJ_KBN_PANEL} kbnMaxResponseTime`;
const SUBJ_KBN_CONNECTIONS = `${SUBJ_KBN_PANEL} kbnConnections`;
const SUBJ_KBN_MEMORY_USAGE = `${SUBJ_KBN_PANEL} kbnMemoryUsage`;
const SUBJ_KBN_OVERVIEW = `${SUBJ_KBN_PANEL} kbnOverview`;
const SUBJ_KBN_INSTANCES = `${SUBJ_KBN_PANEL} kbnInstances`;
const SUBJ_KBN_STATUS = `${SUBJ_KBN_PANEL} > statusIcon`;
const SUBJ_KBN_REQUESTS = `${SUBJ_KBN_PANEL} > kbnRequests`;
const SUBJ_KBN_MAX_RESPONSE_TIME = `${SUBJ_KBN_PANEL} > kbnMaxResponseTime`;
const SUBJ_KBN_CONNECTIONS = `${SUBJ_KBN_PANEL} > kbnConnections`;
const SUBJ_KBN_MEMORY_USAGE = `${SUBJ_KBN_PANEL} > kbnMemoryUsage`;
const SUBJ_KBN_OVERVIEW = `${SUBJ_KBN_PANEL} > kbnOverview`;
const SUBJ_KBN_INSTANCES = `${SUBJ_KBN_PANEL} > kbnInstances`;
const SUBJ_LS_PANEL = `clusterItemContainerLogstash`;
const SUBJ_LS_EVENTS_RECEIVED = `${SUBJ_LS_PANEL} lsEventsReceived`;
const SUBJ_LS_EVENTS_EMITTED = `${SUBJ_LS_PANEL} lsEventsEmitted`;
const SUBJ_LS_NODES = `${SUBJ_LS_PANEL} lsNodes`;
const SUBJ_LS_UPTIME = `${SUBJ_LS_PANEL} lsUptime`;
const SUBJ_LS_JVM_HEAP = `${SUBJ_LS_PANEL} lsJvmHeap`;
const SUBJ_LS_PIPELINES = `${SUBJ_LS_PANEL} lsPipelines`;
const SUBJ_LS_EVENTS_RECEIVED = `${SUBJ_LS_PANEL} > lsEventsReceived`;
const SUBJ_LS_EVENTS_EMITTED = `${SUBJ_LS_PANEL} > lsEventsEmitted`;
const SUBJ_LS_NODES = `${SUBJ_LS_PANEL} > lsNodes`;
const SUBJ_LS_UPTIME = `${SUBJ_LS_PANEL} > lsUptime`;
const SUBJ_LS_JVM_HEAP = `${SUBJ_LS_PANEL} > lsJvmHeap`;
const SUBJ_LS_PIPELINES = `${SUBJ_LS_PANEL} > lsPipelines`;
const SUBJ_BEATS_PANEL = `clusterItemContainerBeats`;
const SUBJ_BEATS_OVERVIEW = `${SUBJ_BEATS_PANEL} beatsOverview`;
const SUBJ_BEATS_TOTAL_EVENTS = `${SUBJ_BEATS_PANEL} beatsTotalEvents`;
const SUBJ_BEATS_BYTES_SENT = `${SUBJ_BEATS_PANEL} beatsBytesSent`;
const SUBJ_BEATS_LISTING = `${SUBJ_BEATS_PANEL} beatsListing`;
const SUBJ_BEATS_TYPES_COUNTS = `${SUBJ_BEATS_PANEL} beatTypeCount`;
const SUBJ_BEATS_OVERVIEW = `${SUBJ_BEATS_PANEL} > beatsOverview`;
const SUBJ_BEATS_TOTAL_EVENTS = `${SUBJ_BEATS_PANEL} > beatsTotalEvents`;
const SUBJ_BEATS_BYTES_SENT = `${SUBJ_BEATS_PANEL} > beatsBytesSent`;
const SUBJ_BEATS_LISTING = `${SUBJ_BEATS_PANEL} > beatsListing`;
const SUBJ_BEATS_TYPES_COUNTS = `${SUBJ_BEATS_PANEL} > beatTypeCount`;
return new class ClusterOverview {
@ -186,7 +186,7 @@ export function MonitoringClusterOverviewProvider({ getService }) {
return testSubjects.getVisibleText(SUBJ_BEATS_BYTES_SENT);
}
async getBeatsListingDetail() {
const total = await testSubjects.getVisibleText(SUBJ_BEATS_LISTING + ' beatsTotal');
const total = await testSubjects.getVisibleText(SUBJ_BEATS_LISTING + '> beatsTotal');
const counts = await testSubjects.getAttributeAll(SUBJ_BEATS_TYPES_COUNTS, 'data-test-beat-type-count');
const countsByType = counts.reduce((accum, text) => {

View file

@ -8,12 +8,12 @@ export function MonitoringElasticsearchIndexDetailProvider({ getService }) {
const testSubjects = getService('testSubjects');
const SUBJ_SUMMARY = 'elasticsearchIndexDetailStatus';
const SUBJ_SUMMARY_DATA_SIZE = `${SUBJ_SUMMARY} dataSize`;
const SUBJ_SUMMARY_DATA_SIZE_PRIMARIES = `${SUBJ_SUMMARY} dataSizePrimaries`;
const SUBJ_SUMMARY_DOCUMENT_COUNT = `${SUBJ_SUMMARY} documentCount`;
const SUBJ_SUMMARY_TOTAL_SHARDS = `${SUBJ_SUMMARY} totalShards`;
const SUBJ_SUMMARY_UNASSIGNED_SHARDS = `${SUBJ_SUMMARY} unassignedShards`;
const SUBJ_SUMMARY_HEALTH = `${SUBJ_SUMMARY} statusIcon`;
const SUBJ_SUMMARY_DATA_SIZE = `${SUBJ_SUMMARY} > dataSize`;
const SUBJ_SUMMARY_DATA_SIZE_PRIMARIES = `${SUBJ_SUMMARY} > dataSizePrimaries`;
const SUBJ_SUMMARY_DOCUMENT_COUNT = `${SUBJ_SUMMARY} > documentCount`;
const SUBJ_SUMMARY_TOTAL_SHARDS = `${SUBJ_SUMMARY} > totalShards`;
const SUBJ_SUMMARY_UNASSIGNED_SHARDS = `${SUBJ_SUMMARY} > unassignedShards`;
const SUBJ_SUMMARY_HEALTH = `${SUBJ_SUMMARY} > statusIcon`;
return new class ElasticsearchIndexDetail {

View file

@ -14,20 +14,20 @@ export function MonitoringElasticsearchIndicesProvider({ getService, getPageObje
const SUBJ_LISTING_PAGE = 'elasticsearchIndicesListingPage';
const SUBJ_TABLE_CONTAINER = 'elasticsearchIndicesTableContainer';
const SUBJ_TABLE_NO_DATA = `${SUBJ_TABLE_CONTAINER} monitoringTableNoData`;
const SUBJ_SEARCH_BAR = `${SUBJ_TABLE_CONTAINER} monitoringTableToolBar`;
const SUBJ_TABLE_NO_DATA = `${SUBJ_TABLE_CONTAINER} > monitoringTableNoData`;
const SUBJ_SEARCH_BAR = `${SUBJ_TABLE_CONTAINER} > monitoringTableToolBar`;
const SUBJ_TABLE_SORT_SEARCH_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_search_rate_5`;
const SUBJ_INDICES_NAMES = `${SUBJ_TABLE_CONTAINER} name`;
const SUBJ_INDICES_STATUSES = `${SUBJ_TABLE_CONTAINER} statusIcon`;
const SUBJ_INDICES_DOCUMENT_COUNTS = `${SUBJ_TABLE_CONTAINER} documentCount`;
const SUBJ_INDICES_DATA_SIZES = `${SUBJ_TABLE_CONTAINER} dataSize`;
const SUBJ_INDICES_INDEX_RATES = `${SUBJ_TABLE_CONTAINER} indexRate`;
const SUBJ_INDICES_SEARCH_RATES = `${SUBJ_TABLE_CONTAINER} searchRate`;
const SUBJ_INDICES_UNASSIGNED_SHARD_COUNTS = `${SUBJ_TABLE_CONTAINER} unassignedShards`;
const SUBJ_INDICES_NAMES = `${SUBJ_TABLE_CONTAINER} > name`;
const SUBJ_INDICES_STATUSES = `${SUBJ_TABLE_CONTAINER} > statusIcon`;
const SUBJ_INDICES_DOCUMENT_COUNTS = `${SUBJ_TABLE_CONTAINER} > documentCount`;
const SUBJ_INDICES_DATA_SIZES = `${SUBJ_TABLE_CONTAINER} > dataSize`;
const SUBJ_INDICES_INDEX_RATES = `${SUBJ_TABLE_CONTAINER} > indexRate`;
const SUBJ_INDICES_SEARCH_RATES = `${SUBJ_TABLE_CONTAINER} > searchRate`;
const SUBJ_INDICES_UNASSIGNED_SHARD_COUNTS = `${SUBJ_TABLE_CONTAINER} > unassignedShards`;
const SUBJ_INDEX_LINK_PREFIX = `${SUBJ_TABLE_CONTAINER} indexLink-`;
const SUBJ_INDEX_LINK_PREFIX = `${SUBJ_TABLE_CONTAINER} > indexLink-`;
return new class ElasticsearchIndices {
async isOnListing() {

View file

@ -8,15 +8,15 @@ export function MonitoringElasticsearchNodeDetailProvider({ getService }) {
const testSubjects = getService('testSubjects');
const SUBJ_SUMMARY = 'elasticsearchNodeDetailStatus';
const SUBJ_SUMMARY_TRANSPORT_ADDRESS = `${SUBJ_SUMMARY} transportAddress`;
const SUBJ_SUMMARY_JVM_HEAP = `${SUBJ_SUMMARY} jvmHeap`;
const SUBJ_SUMMARY_FREE_DISK_SPACE = `${SUBJ_SUMMARY} freeDiskSpace`;
const SUBJ_SUMMARY_DOCUMENT_COUNT = `${SUBJ_SUMMARY} documentCount`;
const SUBJ_SUMMARY_DATA_SIZE = `${SUBJ_SUMMARY} dataSize`;
const SUBJ_SUMMARY_INDICES_COUNT = `${SUBJ_SUMMARY} indicesCount`;
const SUBJ_SUMMARY_SHARDS_COUNT = `${SUBJ_SUMMARY} shardsCount`;
const SUBJ_SUMMARY_NODE_TYPE = `${SUBJ_SUMMARY} nodeType`;
const SUBJ_SUMMARY_STATUS = `${SUBJ_SUMMARY} statusIcon`;
const SUBJ_SUMMARY_TRANSPORT_ADDRESS = `${SUBJ_SUMMARY} > transportAddress`;
const SUBJ_SUMMARY_JVM_HEAP = `${SUBJ_SUMMARY} > jvmHeap`;
const SUBJ_SUMMARY_FREE_DISK_SPACE = `${SUBJ_SUMMARY} > freeDiskSpace`;
const SUBJ_SUMMARY_DOCUMENT_COUNT = `${SUBJ_SUMMARY} > documentCount`;
const SUBJ_SUMMARY_DATA_SIZE = `${SUBJ_SUMMARY} > dataSize`;
const SUBJ_SUMMARY_INDICES_COUNT = `${SUBJ_SUMMARY} > indicesCount`;
const SUBJ_SUMMARY_SHARDS_COUNT = `${SUBJ_SUMMARY} > shardsCount`;
const SUBJ_SUMMARY_NODE_TYPE = `${SUBJ_SUMMARY} > nodeType`;
const SUBJ_SUMMARY_STATUS = `${SUBJ_SUMMARY} > statusIcon`;
return new class ElasticsearchNodeDetail {

View file

@ -14,27 +14,27 @@ export function MonitoringElasticsearchNodesProvider({ getService, getPageObject
const SUBJ_LISTING_PAGE = 'elasticsearchNodesListingPage';
const SUBJ_TABLE_CONTAINER = 'elasticsearchNodesTableContainer';
const SUBJ_TABLE_NO_DATA = `${SUBJ_TABLE_CONTAINER} monitoringTableNoData`;
const SUBJ_SEARCH_BAR = `${SUBJ_TABLE_CONTAINER} monitoringTableToolBar`;
const SUBJ_TABLE_NO_DATA = `${SUBJ_TABLE_CONTAINER} > monitoringTableNoData`;
const SUBJ_SEARCH_BAR = `${SUBJ_TABLE_CONTAINER} > monitoringTableToolBar`;
const SUBJ_TABLE_SORT_NAME_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_name_0`;
const SUBJ_TABLE_SORT_STATUS_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_isOnline_1`;
const SUBJ_TABLE_SORT_SHARDS_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_shardCount_2`;
const SUBJ_TABLE_SORT_CPU_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_node_cpu_utilization_3`;
const SUBJ_TABLE_SORT_LOAD_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_node_load_average_4`;
const SUBJ_TABLE_SORT_MEM_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_node_jvm_mem_percent_5`;
const SUBJ_TABLE_SORT_DISK_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_node_free_space_6`;
const SUBJ_TABLE_SORT_NAME_COL = `${SUBJ_TABLE_CONTAINER} > tableHeaderCell_name_0`;
const SUBJ_TABLE_SORT_STATUS_COL = `${SUBJ_TABLE_CONTAINER} > tableHeaderCell_isOnline_1`;
const SUBJ_TABLE_SORT_SHARDS_COL = `${SUBJ_TABLE_CONTAINER} > tableHeaderCell_shardCount_2`;
const SUBJ_TABLE_SORT_CPU_COL = `${SUBJ_TABLE_CONTAINER} > tableHeaderCell_node_cpu_utilization_3`;
const SUBJ_TABLE_SORT_LOAD_COL = `${SUBJ_TABLE_CONTAINER} > tableHeaderCell_node_load_average_4`;
const SUBJ_TABLE_SORT_MEM_COL = `${SUBJ_TABLE_CONTAINER} > tableHeaderCell_node_jvm_mem_percent_5`;
const SUBJ_TABLE_SORT_DISK_COL = `${SUBJ_TABLE_CONTAINER} > tableHeaderCell_node_free_space_6`;
const SUBJ_TABLE_BODY = 'elasticsearchNodesTableContainer';
const SUBJ_NODES_NAMES = `${SUBJ_TABLE_BODY} name`;
const SUBJ_NODES_STATUSES = `${SUBJ_TABLE_BODY} statusIcon`;
const SUBJ_NODES_CPUS = `${SUBJ_TABLE_BODY} cpuUsage`;
const SUBJ_NODES_LOADS = `${SUBJ_TABLE_BODY} loadAverage`;
const SUBJ_NODES_MEMS = `${SUBJ_TABLE_BODY} jvmMemory`;
const SUBJ_NODES_DISKS = `${SUBJ_TABLE_BODY} diskFreeSpace`;
const SUBJ_NODES_SHARDS = `${SUBJ_TABLE_BODY} shards`;
const SUBJ_NODES_NAMES = `${SUBJ_TABLE_BODY} > name`;
const SUBJ_NODES_STATUSES = `${SUBJ_TABLE_BODY} > statusIcon`;
const SUBJ_NODES_CPUS = `${SUBJ_TABLE_BODY} > cpuUsage`;
const SUBJ_NODES_LOADS = `${SUBJ_TABLE_BODY} > loadAverage`;
const SUBJ_NODES_MEMS = `${SUBJ_TABLE_BODY} > jvmMemory`;
const SUBJ_NODES_DISKS = `${SUBJ_TABLE_BODY} > diskFreeSpace`;
const SUBJ_NODES_SHARDS = `${SUBJ_TABLE_BODY} > shards`;
const SUBJ_NODE_LINK_PREFIX = `${SUBJ_TABLE_BODY} nodeLink-`;
const SUBJ_NODE_LINK_PREFIX = `${SUBJ_TABLE_BODY} > nodeLink-`;
return new class ElasticsearchIndices {
async isOnListing() {

View file

@ -27,10 +27,10 @@ const classificationsAndTooltipsReducer = (classifications, tooltips) => {
export function MonitoringElasticsearchShardsProvider({ getService }) {
const testSubjects = getService('testSubjects');
const SUBJ_UNASSIGNED_SHARDS = `clusterView-Unassigned shardIcon`;
const SUBJ_UNASSIGNED_SHARDS = `clusterView-Unassigned > shardIcon`;
const SUBJ_ASSIGNED_CONTAINER_PREFIX = 'clusterView-Assigned-';
const SUBJ_SHOW_SYSTEM_INDICES = 'shardShowSystemIndices';
const getAssignedShardsSelector = parent => parent + ' shardIcon'; // will be used in a descendant search starting with SUBJ_ASSIGNED_CONTAINER
const getAssignedShardsSelector = parent => parent + '> shardIcon'; // will be used in a descendant search starting with SUBJ_ASSIGNED_CONTAINER
return new class ElasticsearchShards {

View file

@ -8,14 +8,14 @@ export function MonitoringElasticsearchSummaryStatusProvider({ getService }) {
const testSubjects = getService('testSubjects');
const SUBJ_SUMMARY = 'elasticsearchClusterStatus';
const SUBJ_SUMMARY_NODES_COUNT = `${SUBJ_SUMMARY} nodesCount`;
const SUBJ_SUMMARY_INDICES_COUNT = `${SUBJ_SUMMARY} indicesCount`;
const SUBJ_SUMMARY_MEMORY = `${SUBJ_SUMMARY} memory`;
const SUBJ_SUMMARY_TOTAL_SHARDS = `${SUBJ_SUMMARY} totalShards`;
const SUBJ_SUMMARY_UNASSIGNED_SHARDS = `${SUBJ_SUMMARY} unassignedShards`;
const SUBJ_SUMMARY_DOCUMENT_COUNT = `${SUBJ_SUMMARY} documentCount`;
const SUBJ_SUMMARY_DATA_SIZE = `${SUBJ_SUMMARY} dataSize`;
const SUBJ_SUMMARY_HEALTH = `${SUBJ_SUMMARY} statusIcon`;
const SUBJ_SUMMARY_NODES_COUNT = `${SUBJ_SUMMARY} > nodesCount`;
const SUBJ_SUMMARY_INDICES_COUNT = `${SUBJ_SUMMARY} > indicesCount`;
const SUBJ_SUMMARY_MEMORY = `${SUBJ_SUMMARY} > memory`;
const SUBJ_SUMMARY_TOTAL_SHARDS = `${SUBJ_SUMMARY} > totalShards`;
const SUBJ_SUMMARY_UNASSIGNED_SHARDS = `${SUBJ_SUMMARY} > unassignedShards`;
const SUBJ_SUMMARY_DOCUMENT_COUNT = `${SUBJ_SUMMARY} > documentCount`;
const SUBJ_SUMMARY_DATA_SIZE = `${SUBJ_SUMMARY} > dataSize`;
const SUBJ_SUMMARY_HEALTH = `${SUBJ_SUMMARY} > statusIcon`;
return new class ElasticsearchSummaryStatus {

View file

@ -11,11 +11,11 @@ export function MonitoringKibanaInstanceProvider({ getService }) {
const SUBJ_INSTANCE_PAGE = 'kibanaInstancePage';
const SUBJ_SUMMARY = 'kibanaDetailStatus';
const SUBJ_SUMMARY_TRANSPORT_ADDRESS = `${SUBJ_SUMMARY} transportAddress`;
const SUBJ_SUMMARY_OS_FREE_MEMORY = `${SUBJ_SUMMARY} osFreeMemory`;
const SUBJ_SUMMARY_VERSION = `${SUBJ_SUMMARY} version`;
const SUBJ_SUMMARY_UPTIME = `${SUBJ_SUMMARY} uptime`;
const SUBJ_SUMMARY_HEALTH = `${SUBJ_SUMMARY} statusIcon`;
const SUBJ_SUMMARY_TRANSPORT_ADDRESS = `${SUBJ_SUMMARY} > transportAddress`;
const SUBJ_SUMMARY_OS_FREE_MEMORY = `${SUBJ_SUMMARY} > osFreeMemory`;
const SUBJ_SUMMARY_VERSION = `${SUBJ_SUMMARY} > version`;
const SUBJ_SUMMARY_UPTIME = `${SUBJ_SUMMARY} > uptime`;
const SUBJ_SUMMARY_HEALTH = `${SUBJ_SUMMARY} > statusIcon`;
return new class KibanaInstance {

View file

@ -11,7 +11,7 @@ export function MonitoringKibanaInstancesProvider({ getService }) {
const SUBJ_INSTANCES_PAGE = 'kibanaInstancesPage';
const SUBJ_TABLE_BODY = 'kibanaInstancesTableContainer';
const SUBJ_INDEX_LINK_PREFIX = `${SUBJ_TABLE_BODY} kibanaLink-`;
const SUBJ_INDEX_LINK_PREFIX = `${SUBJ_TABLE_BODY} > kibanaLink-`;
return new class KibanaInstances {

View file

@ -8,12 +8,12 @@ export function MonitoringKibanaSummaryStatusProvider({ getService }) {
const testSubjects = getService('testSubjects');
const SUBJ_SUMMARY = 'kibanaClusterStatus';
const SUBJ_SUMMARY_INSTANCES = `${SUBJ_SUMMARY} instances`;
const SUBJ_SUMMARY_MEMORY = `${SUBJ_SUMMARY} memory`;
const SUBJ_SUMMARY_REQUESTS = `${SUBJ_SUMMARY} requests`;
const SUBJ_SUMMARY_CONNECTIONS = `${SUBJ_SUMMARY} connections`;
const SUBJ_SUMMARY_MAX_RESPONSE_TIME = `${SUBJ_SUMMARY} maxResponseTime`;
const SUBJ_SUMMARY_HEALTH = `${SUBJ_SUMMARY} statusIcon`;
const SUBJ_SUMMARY_INSTANCES = `${SUBJ_SUMMARY} > instances`;
const SUBJ_SUMMARY_MEMORY = `${SUBJ_SUMMARY} > memory`;
const SUBJ_SUMMARY_REQUESTS = `${SUBJ_SUMMARY} > requests`;
const SUBJ_SUMMARY_CONNECTIONS = `${SUBJ_SUMMARY} > connections`;
const SUBJ_SUMMARY_MAX_RESPONSE_TIME = `${SUBJ_SUMMARY} > maxResponseTime`;
const SUBJ_SUMMARY_HEALTH = `${SUBJ_SUMMARY} > statusIcon`;
return new class KibanaSummaryStatus {

View file

@ -14,14 +14,14 @@ export function MonitoringLogstashPipelinesProvider({ getService, getPageObjects
const SUBJ_LISTING_PAGE = 'logstashPipelinesListing';
const SUBJ_TABLE_CONTAINER = 'monitoringLogstashPipelinesTableContainer';
const SUBJ_TABLE_NO_DATA = `${SUBJ_TABLE_CONTAINER} monitoringTableNoData`;
const SUBJ_SEARCH_BAR = `${SUBJ_TABLE_CONTAINER} monitoringTableToolBar`;
const SUBJ_TABLE_NO_DATA = `${SUBJ_TABLE_CONTAINER} > monitoringTableNoData`;
const SUBJ_SEARCH_BAR = `${SUBJ_TABLE_CONTAINER} > monitoringTableToolBar`;
const SUBJ_TABLE_SORT_EVENTS_EMITTED_RATE_COL = `${SUBJ_TABLE_CONTAINER} tableHeaderCell_latestThroughput_1`;
const SUBJ_TABLE_SORT_EVENTS_EMITTED_RATE_COL = `${SUBJ_TABLE_CONTAINER} > tableHeaderCell_latestThroughput_1`;
const SUBJ_PIPELINES_IDS = `${SUBJ_TABLE_CONTAINER} id`;
const SUBJ_PIPELINES_EVENTS_EMITTED_RATES = `${SUBJ_TABLE_CONTAINER} eventsEmittedRate`;
const SUBJ_PIPELINES_NODE_COUNTS = `${SUBJ_TABLE_CONTAINER} nodeCount`;
const SUBJ_PIPELINES_IDS = `${SUBJ_TABLE_CONTAINER} > id`;
const SUBJ_PIPELINES_EVENTS_EMITTED_RATES = `${SUBJ_TABLE_CONTAINER} > eventsEmittedRate`;
const SUBJ_PIPELINES_NODE_COUNTS = `${SUBJ_TABLE_CONTAINER} > nodeCount`;
return new class LogstashPipelines {
async isOnListing() {

View file

@ -8,10 +8,10 @@ export function MonitoringLogstashSummaryStatusProvider({ getService }) {
const testSubjects = getService('testSubjects');
const SUBJ_SUMMARY = 'logstashClusterStatus';
const SUBJ_SUMMARY_NODE_COUNT = `${SUBJ_SUMMARY} node_count`;
const SUBJ_SUMMARY_MEMORY_USED = `${SUBJ_SUMMARY} memory_used`;
const SUBJ_SUMMARY_EVENTS_IN_TOTAL = `${SUBJ_SUMMARY} events_in_total`;
const SUBJ_SUMMARY_EVENTS_OUT_TOTAL = `${SUBJ_SUMMARY} events_out_total`;
const SUBJ_SUMMARY_NODE_COUNT = `${SUBJ_SUMMARY} > node_count`;
const SUBJ_SUMMARY_MEMORY_USED = `${SUBJ_SUMMARY} > memory_used`;
const SUBJ_SUMMARY_EVENTS_IN_TOTAL = `${SUBJ_SUMMARY} > events_in_total`;
const SUBJ_SUMMARY_EVENTS_OUT_TOTAL = `${SUBJ_SUMMARY} > events_out_total`;
return new class LogstashSummaryStatus {

View file

@ -12,23 +12,23 @@ export function PipelineEditorProvider({ getService }) {
const testSubjects = getService('testSubjects');
// test subject selectors
const SUBJ_CONTAINER = 'pipelineEdit';
const getContainerSubjForId = id => `pipelineEdit-${id}`;
const SUBJ_INPUT_ID = 'pipelineEdit inputId';
const SUBJ_INPUT_DESCRIPTION = 'pipelineEdit inputDescription';
const SUBJ_UI_ACE_PIPELINE = 'pipelineEdit acePipeline';
const SUBJ_CONTAINER = '~pipelineEdit';
const getContainerSubjForId = id => `~pipelineEdit-${id}`;
const SUBJ_INPUT_ID = '~pipelineEdit > inputId';
const SUBJ_INPUT_DESCRIPTION = '~pipelineEdit > inputDescription';
const SUBJ_UI_ACE_PIPELINE = '~pipelineEdit > acePipeline';
const SUBJ_INPUT_WORKERS = 'pipelineEdit inputWorkers';
const SUBJ_INPUT_BATCH_SIZE = 'pipelineEdit inputBatchSize';
const SUBJ_SELECT_QUEUE_TYPE = 'pipelineEdit selectQueueType';
const SUBJ_INPUT_QUEUE_MAX_BYTES_NUMBER = 'pipelineEdit inputQueueMaxBytesNumber';
const SUBJ_SELECT_QUEUE_MAX_BYTES_UNITS = 'pipelineEdit selectQueueMaxBytesUnits';
const SUBJ_INPUT_QUEUE_CHECKPOINT_WRITES = 'pipelineEdit inputQueueCheckpointWrites';
const SUBJ_INPUT_WORKERS = '~pipelineEdit > inputWorkers';
const SUBJ_INPUT_BATCH_SIZE = '~pipelineEdit > inputBatchSize';
const SUBJ_SELECT_QUEUE_TYPE = '~pipelineEdit > selectQueueType';
const SUBJ_INPUT_QUEUE_MAX_BYTES_NUMBER = '~pipelineEdit > inputQueueMaxBytesNumber';
const SUBJ_SELECT_QUEUE_MAX_BYTES_UNITS = '~pipelineEdit > selectQueueMaxBytesUnits';
const SUBJ_INPUT_QUEUE_CHECKPOINT_WRITES = '~pipelineEdit > inputQueueCheckpointWrites';
const SUBJ_BTN_SAVE = 'pipelineEdit btnSavePipeline';
const SUBJ_BTN_CANCEL = 'pipelineEdit btnCancel';
const SUBJ_BTN_DELETE = 'pipelineEdit btnDeletePipeline';
const SUBJ_LNK_BREADCRUMB_MANAGEMENT = 'breadcrumbs lnkBreadcrumb0';
const SUBJ_BTN_SAVE = '~pipelineEdit > btnSavePipeline';
const SUBJ_BTN_CANCEL = '~pipelineEdit > btnCancel';
const SUBJ_BTN_DELETE = '~pipelineEdit > btnDeletePipeline';
const SUBJ_LNK_BREADCRUMB_MANAGEMENT = 'breadcrumbs > lnkBreadcrumb0';
const SUBJ_CONFIRM_MODAL_TEXT = 'confirmModalBodyText';
const DEFAULT_INPUT_VALUES = {

View file

@ -11,13 +11,13 @@ export function PipelineListProvider({ getService }) {
// test subject selectors
const SUBJ_CONTAINER = `pipelineList`;
const SUBJ_BTN_ADD = `pipelineList btnAdd`;
const SUBJ_BTN_DELETE = `pipelineList btnDeletePipeline`;
const getCloneLinkSubjForId = id => `pipelineList lnkPipelineClone-${id}`;
const SUBJ_FILTER = `pipelineList filter`;
const SUBJ_SELECT_ALL = `pipelineList pipelineTable checkboxSelectAll`;
const getSelectCheckbox = id => `pipelineList pipelineTable checkboxSelectRow-${id}`;
const SUBJ_BTN_NEXT_PAGE = `pipelineList pagination-button-next`;
const SUBJ_BTN_ADD = `pipelineList > btnAdd`;
const SUBJ_BTN_DELETE = `pipelineList > btnDeletePipeline`;
const getCloneLinkSubjForId = id => `pipelineList > lnkPipelineClone-${id}`;
const SUBJ_FILTER = `pipelineList > filter`;
const SUBJ_SELECT_ALL = `pipelineList > pipelineTable > checkboxSelectAll`;
const getSelectCheckbox = id => `pipelineList > pipelineTable > checkboxSelectRow-${id}`;
const SUBJ_BTN_NEXT_PAGE = `pipelineList > pagination-button-next`;
const INNER_SUBJ_ROW = `row`;
const INNER_SUBJ_CELL_ID = `cellId`;
@ -25,7 +25,7 @@ export function PipelineListProvider({ getService }) {
const INNER_SUBJ_CELL_LAST_MODIFIED = `cellLastModified`;
const INNER_SUBJ_CELL_USERNAME = `cellUsername`;
const SUBJ_CELL_ID = `${SUBJ_CONTAINER} ${INNER_SUBJ_ROW} ${INNER_SUBJ_CELL_ID}`;
const SUBJ_CELL_ID = `${SUBJ_CONTAINER} > ${INNER_SUBJ_ROW} > ${INNER_SUBJ_CELL_ID}`;
return new class PipelineList {
/**

View file

@ -11,12 +11,12 @@ export function UserMenuProvider({ getService }) {
return new class UserMenu {
async clickLogoutButton() {
await this._ensureMenuOpen();
await testSubjects.click('userMenu logoutLink');
await testSubjects.click('userMenu > logoutLink');
}
async clickProvileLink() {
await this._ensureMenuOpen();
await testSubjects.click('userMenu profileLink');
await testSubjects.click('userMenu > profileLink');
}
async logoutLinkExists() {
@ -25,7 +25,7 @@ export function UserMenuProvider({ getService }) {
}
await this._ensureMenuOpen();
return await testSubjects.exists('userMenu logoutLink');
return await testSubjects.exists('userMenu > logoutLink');
}
async closeMenu() {