Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Gutenberg Comments test #1729

Merged
merged 2 commits into from
Dec 20, 2018
Merged

Gutenberg Comments test #1729

merged 2 commits into from
Dec 20, 2018

Conversation

JavonDavis
Copy link
Contributor

@JavonDavis JavonDavis commented Dec 19, 2018

This PR adds a test for comments on a post made via Gutenberg Editor

To test:

specs/wp-comments-spec.js

@JavonDavis JavonDavis self-assigned this Dec 19, 2018
@JavonDavis JavonDavis requested a review from a team December 19, 2018 18:01
@JavonDavis
Copy link
Contributor Author

Since Gutenberg is released into prod now I thought it best to just add the comments tests within the wp-comments-spec vs wp-calypso-gutenberg, just to make it a little easier once we phase out the classic editor spec

@bsessions85
Copy link
Contributor

So, I should have been clearer on the issue, but what I meant was "Allow Comments" checkbox in the editor. We want to ensure that if that box isn't checked, then comments cannot be added.

@JavonDavis
Copy link
Contributor Author

So, I should have been clearer on the issue, but what I meant was "Allow Comments" checkbox in the editor. We want to ensure that if that box isn't checked, then comments cannot be added.

Ahhh I see! Misunderstood I've removed the command from PR that would close #1645, @bsessions85 should we still merge this though?

Copy link
Contributor

@Stojdza Stojdza left a comment

Choose a reason for hiding this comment

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

Works well, mobile and desktop 👍

} );

step( 'Can post a reply', async function() {
await driver.sleep( 10000 ); // Wait to not to post too quickly
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like you are creating work for @juliaamosova 😃

Why this sleep is needed? Is it doable to wait for the comment to be posted?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is there, I believe, to keep spam triggers from being set off. If you post comments too quickly you'll get errors saying you need to slow down. This one has to be there.

Copy link
Contributor

Choose a reason for hiding this comment

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

If the sleep statement is here to address the spam issue indeed, we'd need to keep it. I will, however, research if there is any way around that when get to work on this test.

Copy link
Contributor

Choose a reason for hiding this comment

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

I just ran this a bunch of times without the sleep and it actually doesn't appear to be a spam thing, it is just waiting for the comment to show up. This should be updated to wait for the comment to show up

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I'll merge with the sleep since @juliaamosova is already going through all the sleeps

Copy link
Contributor

@juliaamosova juliaamosova Dec 20, 2018

Choose a reason for hiding this comment

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

Sounds good to me @JavonDavis ! I'll implement the wait and check for the comment as suggested by @bsessions85 which should address the sleep statement here.

@bsessions85
Copy link
Contributor

should we still merge this though?

My initial though was no, but I guess it is one more we won't have to change when we switch all the tests to using Gutenberg. I am not sure about whether we should keep the old one at this point though.

@JavonDavis
Copy link
Contributor Author

I am not sure about whether we should keep the old one at this point though

I was thinking the same 🤔🤔 I'm just going to remove the old one I'm not sure it's of much use at the moment and will be of less use in the coming weeks

@JavonDavis JavonDavis merged commit 5912f0d into master Dec 20, 2018
@JavonDavis JavonDavis deleted the add/gutenberg-comments-test branch December 20, 2018 17:28
@brbrr
Copy link
Contributor

brbrr commented Dec 26, 2018

FYI: This PR break comments test for Jetpack sites, which was specifically created for Jetpack: #1406

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants