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

E2E: Update close block button selector #95592

Merged
merged 3 commits into from
Oct 23, 2024
Merged

Conversation

holdercp
Copy link
Contributor

@holdercp holdercp commented Oct 22, 2024

Related to p1729558813594279-slack-CBTN58FTJ

Proposed Changes

  • Updates the selector used in the EditorSidebarBlockInserterComponent to handle the current markup and the new markup introduced in Gutenberg v19.5.0-rc.1, specifically this change.

Why are these changes being made?

Testing Instructions

  • Set up your test env using this guide.
  • Run the tests on the edge GB version by running GUTENBERG_EDGE=true yarn workspace wp-e2e-tests test -- [test path-1] [test-path-2]. You can find the failing test paths in this build.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@@ -4,7 +4,8 @@ import { EditorComponent } from './editor-component';

const sidebarParentSelector = '.block-editor-inserter__main-area';
const selectors = {
closeBlockInserterButton: 'button[aria-label="Close block inserter"]',
closeBlockInserterButton:
'button[aria-label="Close Block Inserter"], button[aria-label="Close block inserter"]',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm assuming once GB 19.5.0 is released, we won't need the old selector?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure as well. Maybe it's worth adding a comment?

@holdercp holdercp marked this pull request as ready for review October 22, 2024 20:28
@holdercp holdercp changed the title Update close block button label E2E: Update close block button selector Oct 22, 2024
@holdercp holdercp added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] Needs e2e Testing Gutenberg Edge Run e2e tests with a special site that is running the latest Gutenberg plugin snapshot labels Oct 22, 2024
Copy link
Member

@m1r0 m1r0 left a comment

Choose a reason for hiding this comment

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

Only one test is still failing for me when testing locally -- OpenTable: Expected content is in published post. It's possible that it's related to my local setup so let's ship it and fix it later if it's still failing in CI.

@@ -4,7 +4,8 @@ import { EditorComponent } from './editor-component';

const sidebarParentSelector = '.block-editor-inserter__main-area';
const selectors = {
closeBlockInserterButton: 'button[aria-label="Close block inserter"]',
closeBlockInserterButton:
'button[aria-label="Close Block Inserter"], button[aria-label="Close block inserter"]',
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure as well. Maybe it's worth adding a comment?

@holdercp
Copy link
Contributor Author

holdercp commented Oct 23, 2024

Only one test is still failing for me when testing locally -- OpenTable: Expected content is in published post. It's possible that it's related to my local setup so let's ship it and fix it later if it's still failing in CI.

That particular test fails for me locally too but it does pass in CI. I'm guessing its an access issue to the OpenTable API when running locally.

@holdercp holdercp merged commit 7ad9287 into trunk Oct 23, 2024
10 checks passed
@holdercp holdercp deleted the fix/mobile-nightly-e2e branch October 23, 2024 15:47
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs e2e Testing Gutenberg Edge Run e2e tests with a special site that is running the latest Gutenberg plugin snapshot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants