Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#54843 closed enhancement (fixed)

Add end to end test case for Trash a single post and restore post from trash

Reported by: pavanpatil1's profile pavanpatil1 Owned by: hellofromtonya's profile hellofromTonya
Milestone: 6.0 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch has-unit-tests commit
Focuses: Cc:

Description

Add two new test cases in wpe2e for the trash a single post and restore post from the trash.

This ticket is to add an E2E test for this feature

Change History (16)

This ticket was mentioned in PR #2182 on WordPress/wordpress-develop by pavanpatil1.


4 years ago
#1

  • Keywords has-patch has-unit-tests added

JustinyAhin commented on PR #2186:


4 years ago
#3

Hello @pooja-muchandikar,

Here are a few things that I noticed and that could be improved in your PR:

JustinyAhin commented on PR #2186:


4 years ago
#4

@pooja-muchandikar thanks for adding the updates. Your tests are very clean and they all pass. Here is something that we could improve.

It might make sense to assert the message that appears when the post is trashed. In this case, it'll be "1 post permanently deleted."
That will help in case the trashing steps outputs an error. By asserting the success message, we make sure that we have the expected behavior.

JustinyAhin commented on PR #2186:


4 years ago
#5

Except the above comment, the PR looks fine to me.

@tellthemachines @hellofromtonya you might want to give a look, before we move to merging it.

pooja-muchandikar commented on PR #2186:


4 years ago
#6

Hi @JustinyAhin,

Previously, assertion message was only added, but while running the test cases CI was failing, as the number of posts were getting deleting dynamically, that's the reason changed the selector.

https://github.com/WordPress/wordpress-develop/pull/2186/commits/3b817af66d229507042706bb9125274a5d07823f#diff-3860c93f38e576535aad8fdbb45ee1be20e197c829f616f26609cfb253910d6eL47

pooja-muchandikar commented on PR #2186:


4 years ago
#7

Hi @JustinyAhin, @hellofromtonya

I hope you are doing well!

Wanted to know if there is any update on this? Do I need to make the changes or can we proceed further?

https://github.com/WordPress/wordpress-develop/pull/2186#issuecomment-1041162514

JustinyAhin commented on PR #2186:


4 years ago
#8

@tellthemachines @hellofromtonya you might want to give a look, before we move to merging it.

Hello @pooja-muchandikar, the PR is fine for me. Can you bring it up during the next Test team meeting on Thursday, so it can be reviewed by a committer?

pooja-muchandikar commented on PR #2186:


4 years ago
#9

Sure
Thanks!

pooja-muchandikar commented on PR #2186:


4 years ago
#10

Hi @kevin940726,

I have addressed all the feedbacks shared by you and also combined the test cases, please take a look.

Thanks!

#11 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 6.0

pooja-muchandikar commented on PR #2186:


4 years ago
#12

Hi @kevin940726,

Made all necessary changes and also commented on respective feedbacks with reasoning. Also tried to work on few indention changes please take a look.

Thanks!

pooja-muchandikar commented on PR #2186:


4 years ago
#13

Hi @kevin940726,

I hope you are doing well! Just checking if you checked latest commits on this PR.

#14 @hellofromTonya
4 years ago

  • Keywords commit added
  • Owner set to hellofromTonya
  • Status changed from new to reviewing

PR 2186 has been approved by @kevin940726 (Thank you Kai!). Marking for commit. Prepping commit now.

#15 @hellofromTonya
4 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 52839:

Build/Test Tools: Add trash and restore of a single post e2e tests.

Adds an end-to-end (e2e) test case for:

  • Emptying a post from the trash.
  • Restoring a post from the trash.

Props pavanpatil1, pooja1210, justinahinon, kevin940726.
Fixes #54843.

hellofromtonya commented on PR #2186:


4 years ago
#16

Committed via changeset https://core.trac.wordpress.org/changeset/52839. Thank you @pooja-muchandikar @JustinyAhin @kevin940726 for your contributions ⭐

Note: See TracTickets for help on using tickets.