Skip to content

Commit

Permalink
[8.8] [Guided onboarding] Fix the missing help link (#156399) (#156550)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.8`:
- [[Guided onboarding] Fix the missing help link
(#156399)](#156399)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Yulia
Čech","email":"6585477+yuliacech@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-05-03T14:00:09Z","message":"[Guided
onboarding] Fix the missing help link (#156399)\n\n##
Summary\r\n\r\nThis PR fixes a bug introduced
in\r\nhttps://github.com//pull/155065/ that I noticed
when\r\ntesting guided onboarding for v8.9.0: the help link was missing
from the\r\nhelp menu. I added a functional test for the help link but
we also need\r\na test that the link is hidden when the user doesn't
have access to\r\nguided onboarding (opened an issue for
that\r\n[here](https://github.com/elastic/kibana/issues/156410)).\r\n\r\n###
How to test\r\n1. Add xpack.cloud.id: 'testID' to
/config/kibana.dev.yml\r\n2. Start ES with yarn es snapshot and Kibana
with `yarn start``\r\n3. Check that the help link \"Setup guides\" is
displayed in the help menu\r\n\r\n### Screenshot \r\n<img width=\"336\"
alt=\"Screenshot 2023-05-02 at 17 27
20\"\r\nsrc=\"https://user-images.githubusercontent.com/6585477/235712599-812b422d-3092-45b3-a726-37f6b90e81c1.png\">","sha":"d00e2a366f872d80b5cd598765f8a5aee50cc399","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:Journey/Onboarding","v8.8.0","v8.9.0"],"number":156399,"url":"https://github.com/elastic/kibana/pull/156399","mergeCommit":{"message":"[Guided
onboarding] Fix the missing help link (#156399)\n\n##
Summary\r\n\r\nThis PR fixes a bug introduced
in\r\nhttps://github.com//pull/155065/ that I noticed
when\r\ntesting guided onboarding for v8.9.0: the help link was missing
from the\r\nhelp menu. I added a functional test for the help link but
we also need\r\na test that the link is hidden when the user doesn't
have access to\r\nguided onboarding (opened an issue for
that\r\n[here](https://github.com/elastic/kibana/issues/156410)).\r\n\r\n###
How to test\r\n1. Add xpack.cloud.id: 'testID' to
/config/kibana.dev.yml\r\n2. Start ES with yarn es snapshot and Kibana
with `yarn start``\r\n3. Check that the help link \"Setup guides\" is
displayed in the help menu\r\n\r\n### Screenshot \r\n<img width=\"336\"
alt=\"Screenshot 2023-05-02 at 17 27
20\"\r\nsrc=\"https://user-images.githubusercontent.com/6585477/235712599-812b422d-3092-45b3-a726-37f6b90e81c1.png\">","sha":"d00e2a366f872d80b5cd598765f8a5aee50cc399"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156399","number":156399,"mergeCommit":{"message":"[Guided
onboarding] Fix the missing help link (#156399)\n\n##
Summary\r\n\r\nThis PR fixes a bug introduced
in\r\nhttps://github.com//pull/155065/ that I noticed
when\r\ntesting guided onboarding for v8.9.0: the help link was missing
from the\r\nhelp menu. I added a functional test for the help link but
we also need\r\na test that the link is hidden when the user doesn't
have access to\r\nguided onboarding (opened an issue for
that\r\n[here](https://github.com/elastic/kibana/issues/156410)).\r\n\r\n###
How to test\r\n1. Add xpack.cloud.id: 'testID' to
/config/kibana.dev.yml\r\n2. Start ES with yarn es snapshot and Kibana
with `yarn start``\r\n3. Check that the help link \"Setup guides\" is
displayed in the help menu\r\n\r\n### Screenshot \r\n<img width=\"336\"
alt=\"Screenshot 2023-05-02 at 17 27
20\"\r\nsrc=\"https://user-images.githubusercontent.com/6585477/235712599-812b422d-3092-45b3-a726-37f6b90e81c1.png\">","sha":"d00e2a366f872d80b5cd598765f8a5aee50cc399"}}]}]
BACKPORT-->

Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
  • Loading branch information
kibanamachine and yuliacech authored May 3, 2023
1 parent d61043f commit a5921f0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/cloud_integrations/cloud_links/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"optionalPlugins": [
"cloud",
"security",
"guided_onboarding"
"guidedOnboarding"
]
}
}
20 changes: 16 additions & 4 deletions x-pack/test/functional_cloud/tests/cloud_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,22 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.header.waitUntilLoadingHasFinished();
});

it('The button "Setup guides" is loaded', async () => {
expect(await find.byCssSelector('[data-test-subj="guideButtonRedirect"]')).to.not.be(null);
const cloudLink = await find.byLinkText('Setup guides');
expect(cloudLink).to.not.be(null);
describe('Guided onboarding', () => {
it('The button "Setup guides" is loaded', async () => {
expect(await find.byCssSelector('[data-test-subj="guideButtonRedirect"]')).to.not.be(null);
const cloudLink = await find.byLinkText('Setup guides');
expect(cloudLink).to.not.be(null);
});

it('The help link "Setup guides" is added', async () => {
await PageObjects.common.clickAndValidate(
'helpMenuButton',
'cloudOnboardingSetupGuideLink'
);
expect(
await find.byCssSelector('[data-test-subj="cloudOnboardingSetupGuideLink"]')
).to.not.be(null);
});
});

it('"Manage this deployment" is appended to the nav list', async () => {
Expand Down

0 comments on commit a5921f0

Please sign in to comment.