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

Migrate Post Visibility Test to Playwright #44488

Merged

Conversation

pooja-muchandikar
Copy link
Contributor

What?

Part of #38851.
Migrate post-visibility.test.js to its Playwright version.

Why?

Part of #38851.

How?

See MIGRATION.md for migration steps.

Testing Instructions

Run npm run test-e2e:playwright test/e2e/specs/editor/various/post-visibility.spec.js

@Mamaduka Mamaduka added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Sep 27, 2022
@pooja-muchandikar
Copy link
Contributor Author

Hi @kevin940726,

I hope you are going great!..

I worked on this PR and the CI is failing multiple times.. I tried fixing the issue and in local the test cases seems to be executing successfully, but CI is failing.. Could you suggest here please?

image

@pooja-muchandikar
Copy link
Contributor Author

Hi @kevin940726,

Are there any further suggestions/feedbacks on this PR?

@pooja-muchandikar
Copy link
Contributor Author

Hi @kevin940726,

I hope you are doing great!

I wanted to check with you if there are any further feedbacks on this PR?

Copy link
Member

@kevin940726 kevin940726 left a comment

Choose a reason for hiding this comment

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

Thanks for your patience! Left some minor feedback.

const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' );

test.describe( 'Post visibility', () => {
const wp = '';
Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @kevin940726,

We are using this variable below to get the status of the posts. So it's just declaration of that variable.

Copy link
Member

Choose a reason for hiding this comment

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

I believe we can just call window.wp instead. Will that work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checking on that..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is done

test/e2e/specs/editor/various/post-visibility.spec.js Outdated Show resolved Hide resolved
test/e2e/specs/editor/various/post-visibility.spec.js Outdated Show resolved Hide resolved
@pooja-muchandikar
Copy link
Contributor Author

Hi @kevin940726,

I have addressed all the feedbacks, please check and let me know if there are any further feedbacks.

Thanks!

@pooja-muchandikar
Copy link
Contributor Author

Hi @kevin940726,

All feedbacks are addressed, but the CI is failing and its not related to the test case I worked upon. End-to-End Tests / Puppeteer is failing, could you please check?

image

Copy link
Member

@kevin940726 kevin940726 left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thanks!

@kevin940726 kevin940726 merged commit 467b15d into WordPress:trunk Jan 4, 2023
@github-actions github-actions bot added this to the Gutenberg 15.0 milestone Jan 4, 2023
@pooja-muchandikar pooja-muchandikar deleted the add/post-visibility-test branch January 5, 2023 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants