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

[Onboarding] fix skipped api key tests #195911

Merged
merged 10 commits into from
Oct 16, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
describe('developer', function () {
before(async () => {
await pageObjects.svlCommonPage.loginWithRole('developer');
await pageObjects.svlApiKeys.deleteAPIKeys();
});
after(async () => {
await deleteAllTestIndices();
});
beforeEach(async () => {
await deleteAllTestIndices();
await pageObjects.svlApiKeys.deleteAPIKeys();
await svlSearchNavigation.navigateToElasticsearchStartPage();
});

Expand Down Expand Up @@ -92,8 +92,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await pageObjects.svlSearchElasticsearchStartPage.expectCreateIndexUIView();
});

// Failing: See https://github.com/elastic/kibana/issues/194673
it.skip('should show the api key in code view', async () => {
it('should show the api key in code view', async () => {
await pageObjects.svlSearchElasticsearchStartPage.expectToBeOnStartPage();
await pageObjects.svlSearchElasticsearchStartPage.clickCodeViewButton();
await pageObjects.svlApiKeys.expectAPIKeyAvailable();
Expand Down Expand Up @@ -131,8 +130,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await pageObjects.svlApiKeys.expectAPIKeyAvailable();
});

// Failing: See https://github.com/elastic/kibana/issues/194673
it.skip('Same API Key should be present on start page and index detail view', async () => {
it('Same API Key should be present on start page and index detail view', async () => {
await pageObjects.svlSearchElasticsearchStartPage.clickCodeViewButton();
await pageObjects.svlApiKeys.expectAPIKeyAvailable();
const apiKeyUI = await pageObjects.svlApiKeys.getAPIKeyFromUI();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await pageObjects.svlSearchIndexDetailPage.expectConnectionDetails();
});

it('should show api key', async () => {
await pageObjects.svlApiKeys.deleteAPIKeys();
await svlSearchNavigation.navigateToIndexDetailPage(indexName);
await pageObjects.svlApiKeys.expectAPIKeyAvailable();
const apiKey = await pageObjects.svlApiKeys.getAPIKeyFromUI();
await pageObjects.svlSearchIndexDetailPage.expectAPIKeyToBeVisibleInCodeBlock(apiKey);
});

it('should have quick stats', async () => {
await pageObjects.svlSearchIndexDetailPage.expectQuickStats();
await pageObjects.svlSearchIndexDetailPage.expectQuickStatsAIMappings();
Expand Down Expand Up @@ -89,13 +97,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await pageObjects.embeddedConsole.clickEmbeddedConsoleControlBar();
});

// Failing: See https://github.com/elastic/kibana/issues/194673
it.skip('should show api key', async () => {
await pageObjects.svlApiKeys.expectAPIKeyAvailable();
const apiKey = await pageObjects.svlApiKeys.getAPIKeyFromUI();
await pageObjects.svlSearchIndexDetailPage.expectAPIKeyToBeVisibleInCodeBlock(apiKey);
});

describe('With data', () => {
before(async () => {
await es.index({
Expand Down