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

[Search][FTR] Fix / Improve tests #197264

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ export function SvlSearchElasticsearchStartPageProvider({ getService }: FtrProvi
},
async expectO11yTrialLink() {
await testSubjects.existOrFail('startO11yTrialBtn');
expect(await testSubjects.getAttribute('startO11yTrialBtn', 'href')).equal(
'https://fake-cloud.elastic.co/projects/create/observability/start'
expect(await testSubjects.getAttribute('startO11yTrialBtn', 'href')).match(
/^https?\:\/\/.*\/projects\/create\/observability\/start/
);
expect(await testSubjects.getAttribute('startO11yTrialBtn', 'target')).equal('_blank');
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export function SvlSearchIndexDetailPageProvider({ getService }: FtrProviderCont
},
async expectConnectionDetails() {
await testSubjects.existOrFail('connectionDetailsEndpoint', { timeout: 2000 });
expect(await (await testSubjects.find('connectionDetailsEndpoint')).getVisibleText()).to.be(
'https://fakeprojectid.es.fake-domain.cld.elstc.co:443'
expect(await (await testSubjects.find('connectionDetailsEndpoint')).getVisibleText()).match(
/^https?\:\/\/.*(\:\d+)?/
);
},
async expectQuickStats() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
};

describe('Elasticsearch Start [Onboarding Empty State]', function () {
// fails on MKI, see https://github.com/elastic/kibana/issues/196981
this.tags(['failsOnMKI']);

describe('developer', function () {
before(async () => {
await pageObjects.svlCommonPage.loginWithRole('developer');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

describe('getting started', function () {
before(async () => {
await pageObjects.svlCommonPage.loginAsAdmin();
await pageObjects.svlCommonPage.loginWithRole('developer');
});

it('has serverless side nav', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,6 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
await solutionNavigation.breadcrumbs.expectBreadcrumbExists({
deepLinkId: 'dashboards',
});
// check Other tools
// > Maps
await solutionNavigation.sidenav.clickLink({
deepLinkId: 'maps',
});
await solutionNavigation.sidenav.expectLinkActive({
deepLinkId: 'maps',
});
await solutionNavigation.breadcrumbs.expectBreadcrumbExists({ text: 'Other tools' });
await solutionNavigation.breadcrumbs.expectBreadcrumbExists({
text: 'Maps',
});
await solutionNavigation.breadcrumbs.expectBreadcrumbExists({
deepLinkId: 'maps',
});

// check Getting Started
await solutionNavigation.sidenav.clickLink({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const indexName = 'test-my-index';

describe('Search index detail page', function () {
// fails on MKI, see https://github.com/elastic/kibana/issues/196981
this.tags(['failsOnMKI']);

before(async () => {
await pageObjects.svlCommonPage.loginWithRole('developer');
await pageObjects.svlApiKeys.deleteAPIKeys();
Expand Down Expand Up @@ -120,16 +117,16 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
await svlSearchNavigation.navigateToIndexDetailPage(indexName);
});
it('should have index documents', async () => {
await pageObjects.svlSearchIndexDetailPage.expectHasIndexDocuments();
});
it('menu action item should be replaced with playground', async () => {
await pageObjects.svlSearchIndexDetailPage.expectActionItemReplacedWhenHasDocs();
});
it('should have link to API reference doc link in options menu', async () => {
await pageObjects.svlSearchIndexDetailPage.clickMoreOptionsActionsButton();
await pageObjects.svlSearchIndexDetailPage.expectAPIReferenceDocLinkExistsInMoreOptions();
});
it('should have index documents', async () => {
await pageObjects.svlSearchIndexDetailPage.expectHasIndexDocuments();
});
it('should have one document in quick stats', async () => {
await pageObjects.svlSearchIndexDetailPage.expectQuickStatsToHaveDocumentCount(1);
});
Expand Down