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

(Bug) Tree component not populated on login #272

Closed
sfount opened this issue Apr 5, 2016 · 2 comments
Closed

(Bug) Tree component not populated on login #272

sfount opened this issue Apr 5, 2016 · 2 comments

Comments

@sfount
Copy link
Contributor

sfount commented Apr 5, 2016

Steps to reproduce:

  1. start the server npm run app
  2. login using superuser superuser
    (The tree is currently in a collapsed state)
  3. expand the tree

Expected behaviour:
The tree routes are populated

Actual behaviour::
The tree is empty

This should be addressed before closing #44 and proves that all of our components need unit tests (as introduced #250)

@sfount sfount added this to the 2.x Process milestone Apr 5, 2016
@jniles
Copy link
Collaborator

jniles commented Apr 6, 2016

The issue is that "login" no longer emits a login event via appstate. We can either emit the event using $scope.$on/$broadcast, or use a service to listen for login. Or the SessionService could expose a onLogin() method that calls the tree's loading function whenever the user logs in.

What do you think is the best design?

@sfount
Copy link
Contributor Author

sfount commented Apr 7, 2016

I like the idea of the session service exposing an onLogin() method however there may be many smaller components that want to start listening on things like login, logout, session updates etc. If there are enough different cases potentially $broadcast would be the right way to go.

I suggest this problem is tackled as follows:

  1. A test is written to automatically show that this bug exists
    That way if the bug ever surfaces again it will give us a failing test - Unit tests would be ideal for the tree component however it seems to me this is an error would only be presented in the context of the application (E2E test)
  2. A solution is proposed to pass the failing tests
  3. Solution is implemented and both tests and improved code are merged into master

@sfount sfount closed this as completed in a8d0fdf Apr 25, 2016
bors bot added a commit that referenced this issue Nov 28, 2018
3400: Update snyk to the latest version 🚀 r=jniles a=greenkeeper[bot]


## The dependency [snyk](https://github.com/snyk/snyk) was updated from `1.110.2` to `1.111.0`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

---

<details>
<summary>Release Notes for v1.111.0</summary>

<h1><a href="https://urls.greenkeeper.io/snyk/snyk/compare/v1.110.2...v1.111.0">1.111.0</a> (2018-11-28)</h1>
<h3>Features</h3>
<ul>
<li>test plugin dep-trees as graphs via new /test-dep-graph API (<a href="https://urls.greenkeeper.io/snyk/snyk/commit/b23d9cc">b23d9cc</a>)</li>
</ul>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 2 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/38f8ab4cfa7850e891c093fd9eb7c3f6422fb357"><code>38f8ab4</code></a> <code>Merge pull request #272 from snyk/feat/send-test-plugin-payload-as-graph</code></li>
<li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/b23d9cc196ed6e2ce7fef9847141bcf7fb1720a0"><code>b23d9cc</code></a> <code>feat: test plugin dep-trees as graphs via new /test-dep-graph API</code></li>
</ul>
<p>See the <a href="https://urls.greenkeeper.io/snyk/snyk/compare/e96ad625e9138a1ebdad91acf714b88709dcfc68...38f8ab4cfa7850e891c093fd9eb7c3f6422fb357">full diff</a></p>
</details>

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴



Co-authored-by: greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants