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

Playwright Utils: Use 'set' to disable the Styles welcome guide #50852

Merged
merged 1 commit into from
May 23, 2023

Conversation

Mamaduka
Copy link
Member

What?

Resolves #49942

PR updates the visitSiteEditor utility method to use the set action to disable the Styles welcome guide.

Why?

The toggle action doesn't accept value as an argument and can sometimes enable the welcome guide modal.

Testing Instructions

  1. Add a new test to the "Push to Global Styles button". See the code below.
  2. Running the test on the trunk will fail, but will pass on this branch.
npm run test:e2e:playwright -- test/e2e/specs/site-editor/push-to-global-styles.spec.js
test( 'should apply condition', async ( { page } ) => {
        // Turn off the welcome guide.
        await page.evaluate( () => {
            window.wp.data
                .dispatch( 'core/preferences' )
                .set( 'core/edit-site', 'welcomeGuideStyles', false );
        } );
} );

@Mamaduka Mamaduka requested a review from talldan May 22, 2023 18:47
@Mamaduka Mamaduka self-assigned this May 22, 2023
@Mamaduka Mamaduka added the [Type] Bug An existing feature does not function as intended label May 22, 2023
@github-actions
Copy link

Flaky tests detected in b031284.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5049332804
📝 Reported issues:

Copy link
Contributor

@talldan talldan left a comment

Choose a reason for hiding this comment

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

Makes sense. It's weird that it's not set already, but looks like it was my mistake 😄

@talldan talldan merged commit 4b2388e into trunk May 23, 2023
@talldan talldan deleted the fix/visit-site-disable-styles-welcome branch May 23, 2023 05:29
@github-actions github-actions bot added this to the Gutenberg 15.9 milestone May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Flaky Test] should apply Heading block styles to all Heading blocks
2 participants