Skip to content

Commit

Permalink
Added link to account management
Browse files Browse the repository at this point in the history
  • Loading branch information
thomheymann committed Nov 10, 2020
1 parent dad4664 commit aeb0662
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,20 @@ export const EmptyPrompt: React.FunctionComponent<Props> = ({
<p>
<FormattedMessage
id="xpack.security.management.apiKeys.table.emptyPromptDescription"
defaultMessage="You can create an {link} from Console."
values={{
link: (
<EuiLink href={`${docLinks.getCreateApiKeyDocUrl()}`} target="_blank">
<FormattedMessage
id="xpack.security.management.apiKeys.table.emptyPromptDocsLinkMessage"
defaultMessage="API key"
/>
</EuiLink>
),
}}
defaultMessage="You can create an API key from your account."
/>
</p>
</Fragment>
}
actions={
<EuiButton
type="primary"
onClick={() => navigateToApp('dev_tools')}
data-test-subj="goToConsoleButton"
onClick={() => navigateToApp('security_account', { path: 'api-keys' })}
data-test-subj="goToAccountButton"
>
<FormattedMessage
id="xpack.security.management.apiKeys.table.emptyPromptConsoleButtonMessage"
defaultMessage="Go to Console"
defaultMessage="Go to your account"
/>
</EuiButton>
}
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/functional/apps/api_keys/home_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
const headers = await testSubjects.findAll('noApiKeysHeader');
if (headers.length > 0) {
expect(await headers[0].getVisibleText()).to.be('No API keys');
const goToConsoleButton = await pageObjects.apiKeys.getGoToConsoleButton();
expect(await goToConsoleButton.isDisplayed()).to.be(true);
const goToAccountButton = await pageObjects.apiKeys.getGoToAccountButton();
expect(await goToAccountButton.isDisplayed()).to.be(true);
} else {
// page may already contain EiTable with data, then check API Key Admin text
const description = await pageObjects.apiKeys.getApiKeyAdminDesc();
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/functional/page_objects/api_keys_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export function ApiKeysPageProvider({ getService }: FtrProviderContext) {
return await testSubjects.getVisibleText('apiKeyAdminDescriptionCallOut');
},

async getGoToConsoleButton() {
return await testSubjects.find('goToConsoleButton');
async getGoToAccountButton() {
return await testSubjects.find('goToAccountButton');
},

async apiKeysPermissionDeniedMessage() {
Expand Down

0 comments on commit aeb0662

Please sign in to comment.