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

Make welcome screen disabling first action in loginIfPrompted #68238

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

pheyos
Copy link
Member

@pheyos pheyos commented Jun 4, 2020

This PR moves the welcome screen disabling in loginIfPrompted to the first position.

The original changes introduced in #66713 didn't work as intended in some situations, where some page loading was already done and the welcome screen disabling came in too late.

@pheyos pheyos self-assigned this Jun 4, 2020
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@pheyos pheyos added release_note:skip Skip the PR/issue when compiling release notes test_ui_functional v7.8.0 v7.9.0 v8.0.0 labels Jun 4, 2020
@pheyos pheyos requested a review from dmlemeshko June 4, 2020 14:50
@pheyos pheyos marked this pull request as ready for review June 4, 2020 14:50
// Disable the welcome screen. This is relevant for environments
// which don't allow to use the yml setting, e.g. cloud production.
// It is done here so it applies to logins but also to a login re-use.
await browser.setLocalStorageItem('home:welcome:show', 'false');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a problem only for the case of login? Maybe it is better to set it up after driver instance is created?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking if the Kibana home page can have some attribute stating it is running on cloud..

Copy link
Member Author

@pheyos pheyos Jun 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My first idea was to put this logic into beforeTestSuite, which would be similar to a setup after driver instance creation. But at that stage the browser storage can't be set:

Storage is disabled inside 'data:' URLs.

So we basically need some actual URL loaded before we can set this, which makes it harder to find a good place for this logic as the entry points can be very different.
The login page seemed to be a good place as cloud testing always involves a login. But
a) we have two different page objects handling the login page. This could be handled by adding the logic to both of them.
b) tests that start with the navigation to an app will re-use an existing login and don't involve the login page. But the browser storage is still cleared between test suites, so the welcome screen is enabled again.

Not sure if an attribute to identify cloud usage on the welcome page solves the issues, since we still need to handle it and there are a lot of pathes that could lead to a displayed welcome page. IMO having something like closeWelcomePageIfNeeded and calling it from all relevant places would be a better solution than trying to disable the page via the browser storage. But calling it from all relevant places is the tricky part here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, let's keep it this way for now

@dmlemeshko dmlemeshko self-requested a review June 5, 2020 13:16
Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking into account there is no way to do it better right now, let's do it.

@pheyos pheyos merged commit fd1ad4c into elastic:master Jun 5, 2020
@pheyos pheyos deleted the adjust_welcome_screen_disabling branch June 5, 2020 15:39
pheyos added a commit to pheyos/kibana that referenced this pull request Jun 5, 2020
…c#68238)

This PR moves the welcome screen disabling in loginIfPrompted to the first position.
pheyos added a commit to pheyos/kibana that referenced this pull request Jun 5, 2020
…c#68238)

This PR moves the welcome screen disabling in loginIfPrompted to the first position.
pheyos added a commit that referenced this pull request Jun 5, 2020
#68401)

This PR moves the welcome screen disabling in loginIfPrompted to the first position.
pheyos added a commit that referenced this pull request Jun 5, 2020
#68402)

This PR moves the welcome screen disabling in loginIfPrompted to the first position.
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jun 8, 2020
* master: (57 commits)
  Add app arch team as owner of datemath package (elastic#66880)
  [Observability] Landing page for Observability (elastic#67467)
  [SIEM] Fix timeline buildGlobalQuery (elastic#68320)
  Optimize saved objects getScopedClient and HTTP API (elastic#68221)
  [Maps] Fix mb-style interpolate style rule (elastic#68413)
  update script to always download node (elastic#68421)
  [SECURITY SOLEIL] Fix selection of event type when no siem index signal created (elastic#68291)
  [DOCS] Adds note about configuring File Data Visualizer (elastic#68407)
  [DOCS] Adds link from remote clusters to index patterns (elastic#68406)
  [QA] slack notify on failure (elastic#68126)
  upgrade eslint-plugin-react-hooks from 2.3.0 to 4.0.4 (elastic#68295)
  moving to jira to a gold license (elastic#67178)
  [DOCS] Revises doc on adding data (elastic#68038)
  [APM] Add ThemeProvider to support dark mode (elastic#68242)
  Make welcome screen disabling first action in loginIfPrompted (elastic#68238)
  [QA] Code coverage: unskip tests, collect tests results, exclude bundles from report (elastic#64477)
  [ML] Functional tests - disable flaky regression and classification creation test
  [Alerting] change eventLog ILM requests to absolute URLs (elastic#68331)
  Report page load asset size (elastic#66224)
  [SIEM][CASE] Change SIEM to Security (elastic#68365)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes test_ui_functional v7.8.0 v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants