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

Fix updating no of post after deleting a post and load-more button #1454

Merged
merged 2 commits into from
Apr 2, 2020
Merged

Fix updating no of post after deleting a post and load-more button #1454

merged 2 commits into from
Apr 2, 2020

Conversation

individual-it
Copy link
Contributor

@individual-it individual-it commented Mar 13, 2020

This pull request makes the following changes:

  • fixes updating the post counter when deleting a post
  • loading the correct amount of posts when a post was deleted and then more posts are loaded
  • UI end-to-end test infrastructure with tests for the fixes in this PR

Testing checklist:

  • 22 Scenarios about deleting posts and showing more posts, see .feature files in this PR. All tests are implemented in CI and are passing, see E2E test infrastructure #1473

  • I certify that I ran my checklist

Fixes ushahidi/platform#3861 & ushahidi/platform#3326

Ping @ushahidi/platform

@ushbot
Copy link
Collaborator

ushbot commented Mar 13, 2020

Hey @individual-it,
thank you for your Pull Request.

@rjmackay It looks like this brave person signed our Contributor License Agreement. 👍

Always at your service,

clabot

@individual-it
Copy link
Contributor Author

I'm leaving the commit history for now, just for reference. I can squash them when the responsible people are happy with the changes

@individual-it individual-it marked this pull request as ready for review March 13, 2020 14:59
@individual-it
Copy link
Contributor Author

fixed conflicts that appeared because of #1443.

Copy link

@phil-davis phil-davis left a comment

Choose a reason for hiding this comment

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

In one of the feature files there could be a scenario that first pages down into the middle of many posts, and then deletes a post.

And also page down to display all posts and delete the very last post (I guess that will need the "many posts" to have different titles so you can uniquely find the last post)

test/ui/stepDefinitions/login.js Outdated Show resolved Hide resolved
test/ui/pageObjects/ushahidiPage.js Outdated Show resolved Hide resolved
@individual-it
Copy link
Contributor Author

The issue is, that the order of posts is random

@individual-it
Copy link
Contributor Author

@phil-davis I've addressed your requests

test/ui/features/paginationOfPosts.feature Outdated Show resolved Hide resolved
test/ui/features/paginationOfPosts.feature Outdated Show resolved Hide resolved
test/ui/features/paginationOfPosts.feature Outdated Show resolved Hide resolved
phil-davis
phil-davis previously approved these changes Mar 19, 2020
Copy link

@phil-davis phil-davis left a comment

Choose a reason for hiding this comment

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

LGTM

@rowasc
Copy link
Contributor

rowasc commented Mar 23, 2020

hey @individual-it. Thanks for your contribution. As I see this, the change should not include a completely new testing framework to be included. I encourage you to use the testing setup that is already here.
I would like to discuss the possibility of adding nightwatch since it's a great tool, but that should be done in a separate PR to ensure we handle it as a separate decision.

Thanks!
Romina

@individual-it
Copy link
Contributor Author

@rowasc I've added the tests to make sure the fix does fix all cases for the user, specially because at the beginning there have been kind of two separate issues.
But you are right the whole test-setup can go into a separate PR, I will pull it our

@individual-it
Copy link
Contributor Author

This PR now only contains the fix, the UI tests are moved to #1473

Copy link
Collaborator

@Angamanga Angamanga left a comment

Choose a reason for hiding this comment

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

This works fine! Thank you so much for your contribution 🎉

@Angamanga Angamanga self-assigned this Apr 2, 2020
@Angamanga Angamanga merged commit 4578599 into ushahidi:develop Apr 2, 2020
@rowasc rowasc mentioned this pull request Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load More button gets freezed and do not show all posts.
5 participants