There used to be a checkbox on the NnsProposals page to only show proposals that you can vote on.
This applied a filter on list_proposals to only load proposals with ballots matching your neurons.
For this reason we needed to reload the proposals when your neurons changed.
But we no longer have this checkbox (we have the actionable proposals tab instead) so we no longer need:
load neurons in NnsProposals
reload proposals when the neurons change
Changes
Stop loading neurons in NnsProposals.
Stop listening to definedNeuronsStore to reload proposals.
Tests
With the reloading on neurons removed, the tests no longer hit the debounce, so instead we use an unresolved promise to test the skeleton cards and the spinner.
Two tests were setting proposalsFiltersStore immediate after rendering the component, for no apparently reason. This was causing proposals to be reloaded, making the test more complicated. I've removed the unnecessary setting of proposalsFiltersStore.
I added a separate test to test that proposals are reloaded when the proposalsFiltersStore is set.
Remove a work-around which is no longer necessary from NnsProposalListPo.waitForContentLoaded.
NnsProposalListPo.waitForContentLoaded was actually broken because the .waitForAbsent() calls weren't awaited. This wasn't noticed because the 1 second delay was enough for the content to load, but fixing the waitForContentLoaded method exposed that we were waiting for NnsProposalListPo on the actionable proposals page which does not have NnsProposalListPo. So I removed this wait from neurons.spec.ts and proposals.spec.ts.
Todos
[ ] Add entry to changelog (if necessary).
not necessary
Motivation
There used to be a checkbox on the
NnsProposals
page to only show proposals that you can vote on. This applied a filter onlist_proposals
to only load proposals with ballots matching your neurons. For this reason we needed to reload the proposals when your neurons changed. But we no longer have this checkbox (we have the actionable proposals tab instead) so we no longer need:NnsProposals
Changes
NnsProposals
.definedNeuronsStore
to reload proposals.Tests
proposalsFiltersStore
immediate after rendering the component, for no apparently reason. This was causing proposals to be reloaded, making the test more complicated. I've removed the unnecessary setting ofproposalsFiltersStore
.proposalsFiltersStore
is set.NnsProposalListPo.waitForContentLoaded
.NnsProposalListPo.waitForContentLoaded
was actually broken because the.waitForAbsent()
calls weren't awaited. This wasn't noticed because the 1 second delay was enough for the content to load, but fixing thewaitForContentLoaded
method exposed that we were waiting forNnsProposalListPo
on the actionable proposals page which does not haveNnsProposalListPo
. So I removed this wait fromneurons.spec.ts
andproposals.spec.ts
.Todos