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

Improve apiTestHelper for Storage UI tests #1434

Closed
asnaith opened this issue Aug 10, 2021 · 7 comments · Fixed by #1965
Closed

Improve apiTestHelper for Storage UI tests #1434

asnaith opened this issue Aug 10, 2021 · 7 comments · Fixed by #1965
Assignees
Labels
Product: Storage Testing Added to issues to signal that it is part of an epic

Comments

@asnaith
Copy link
Member

asnaith commented Aug 10, 2021

Related to the enabling of Storage UI tests in #1283

Currently the storage ui apiTestHelper is not working reliably enough for us to build CID pinning tests and we need to add the ability to delete buckets too so that we can begin a bucket creation test with a clean data state.

Task:

  1. Investigate and determine wether clearPins is currently broken (and fix if it is) or clarify it is working but the deletion of CIDs is not instant because of the queuing system that we have with CIDs.

  2. Add the ability to delete buckets in the test helper so that we can clear bucket state prior to the test beginning for reliable bucket tests.

@asnaith asnaith added the Testing Added to issues to signal that it is part of an epic label Aug 10, 2021
@Tbaut
Copy link
Collaborator

Tbaut commented Aug 12, 2021

The apiHelper has the same problems on Files and Storage, the UI is working reliably, but direct calls to the api are actually making our life difficult for the following reason: the UI isn't reactive, when you do something such as creating/deleting a pin with the api, the UI won't update, because it's not subscribed to api changes. The reason why it works when e.g you're creating a pin with the UI is because the UI actually refreshes the list of pins after the creation.

So what can we do:

  1. somehow reload the page (we tried, cy.reload, but it's tedious)
  2. navigate away and come back (using the nav for instance) which has the side effect of reloading the list: that's hacky but it works
  3. have a refresh button on the interface that we could click? : that's building a feature just for the test.. not really advisable.

I'd go for the 2.

@asnaith
Copy link
Member Author

asnaith commented Aug 12, 2021

The apiHelper has the same problems on Files and Storage, the UI is working reliably, but direct calls to the api are actually making our life difficult for the following reason: the UI isn't reactive, when you do something such as creating/deleting a pin with the api, the UI won't update, because it's not subscribed to api changes. The reason why it works when e.g you're creating a pin with the UI is because the UI actually refreshes the list of pins after the creation.

So what can we do:

  1. somehow reload the page (we tried, cy.reload, but it's tedious)
  2. navigate away and come back (using the nav for instance) which has the side effect of reloading the list: that's hacky but it works
  3. have a refresh button on the interface that we could click? : that's building a feature just for the test.. not really advisable.

I'd go for the 2.

Yeah I think option 1 is the most logical but like you say we have experienced issues so option 2 is probably what we will have to do, at least for now.

With regards to storage ui specifically there is still the behaviour of non-instant removal of pinned CIDs which is going to cause us problems even with a page refresh / nav away & return. When we are using the helper to clear pins at the beginning of a test (so that we can assert the correct number are added) the pinned CIDs might not have deleted by the time we want to begin. There's an indeterminate period of time before it's fully removed so we wouldn't know when to do the refresh.

@Tbaut
Copy link
Collaborator

Tbaut commented Aug 16, 2021

When we are using the helper to clear pins at the beginning of a test (so that we can assert the correct number are added) the pinned CIDs might not have deleted by the time we want to begin.

We should count the ones that are in "pinned" status, and forget about the "queued". Then the deletion isn't a problem any more.

@asnaith
Copy link
Member Author

asnaith commented Aug 16, 2021

@Tbaut Ah yes, good suggestion and workaround

@Tbaut
Copy link
Collaborator

Tbaut commented Aug 17, 2021

@asnaith
Copy link
Member Author

asnaith commented Oct 6, 2021

@Tbaut @FSM1 This is definitely lower priority stuff but wanted to re-familiarize myself with this to see why more storage tests were not running...

It seems like we'd still need to implement similar apiTestHelper work for storage. I think the improvements we made recently were for Files only.

At the moment we can't successfully clear buckets in our test setup, this is a pre-requisite.

I'm happy to take a go at it if someone can give me some pointers on where to start (as I think it's more than just copying over the same apiTestHelper from Files). Or should we leave this as-is for now and re-visit with dev assistance once higher priority work has been completed?

@Tbaut
Copy link
Collaborator

Tbaut commented Oct 7, 2021

I would honestly leave this on the side for now. There are things that we can test and spend time on with higher priority such as Shared folders.

@Tbaut Tbaut self-assigned this Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product: Storage Testing Added to issues to signal that it is part of an epic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants