Skip to content

Add test IDs to the transcode failure surfaces - #2393

Merged
rudrakshi-gupta merged 4 commits into
developfrom
fix/transcode-failure-test-ids
Nov 19, 2026
Merged

rudrakshi-gupta merged 4 commits into
developfrom
fix/transcode-failure-test-ids

Conversation

@rudrakshi-gupta

@rudrakshi-gupta rudrakshi-gupta commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

What and why

A small 2.11.0 QA fix, for release ticket rtCamp/godam-plugin-wp#112, from QA's pre-release review (item 1):

Test IDs on the transcode failure surfaces. #2366 added three places that say why a transcode failed (the media list view, the grid view's tooltip and the attachment details panel) without any data-test-id, so the E2E tests had nothing stable to select. Each now carries one, following the existing data-test-id="godam-…" convention. One commit per surface.

Where to look

List view: page render and polling redraw (admin/godam-transcoder-functions.php:491-546, list-view-transcoding-status.js:115, 207, failure.js:67)

<span class="status-text" data-test-id="godam-transcode-failure-reason">…</span>
<span class="status-next-step" data-test-id="godam-transcode-next-step">…</span>

The PHP render and renderNextStep() give the same IDs: godam-transcode-failure-reason, godam-transcode-next-step, godam-transcode-next-step-link, godam-transcode-support-link.

Check: the reason's ID is removed when polling moves the file out of failed, so a recovered file has none.

Grid view tooltip (failure.js:113, 121)

loader.setAttribute( 'data-test-id', 'godam-transcode-failure-tooltip' );

Check: setFailureText( loader, '' ) removes it along with the reason.

Attachment details panel (transcoding-refusal-panel.js:18-37)

const TEST_ID = 'godam-transcode-failure-panel';

The panel, plus -title, -reason, -next-step, -next-step-link, -retranscode, -support-link, -status and -details.

Everything else is mechanical: link() (failure.js:32) and el() (transcoding-refusal-panel.js:32) take an optional test ID, and there are new unit tests. No new strings, so the POT doesn't change.

UI evidence

No visible change: attributes only. The unit tests check each ID in a rendered DOM for all three surfaces. I couldn't take before/after screenshots because the local site wasn't running when this PR was raised.

How to test

  1. With a video that failed to transcode, open Media > Library in list view. The reason, next step and links carry the IDs above.
  2. In grid view, hover the warning icon: it carries godam-transcode-failure-tooltip.
  3. Open the file's attachment details: the panel and its parts carry godam-transcode-failure-panel….
  4. Retranscode it until it succeeds. The list view and grid IDs are gone.

Unit tests: the full JS suite passes (100 suites, 1390 tests). ESLint and PHPCS are clean.

Risk

risk: low because it only adds data-test-id attributes; no logic changes.

- The failure reason, the next step and its links get a data-test-id, both
  when the page prints them and when polling redraws them.
- link() takes an optional test ID.
- The reason's test ID goes away once the file stops failing.
- setFailureText() marks the status icon with a data-test-id while it
  carries a failure reason, and removes it with the reason.
- Unit tests for setFailureText().
- The panel and its title, reason, next step, Upgrade/next-step link,
  Retranscode button, Contact support link, status line and support
  details each get a data-test-id under godam-transcode-failure-panel.
- el() takes an optional test ID.
@rudrakshi-gupta rudrakshi-gupta added the risk: low QA automation only (Dependabot fixes, copy, CSS) label Nov 19, 2026
@github-actions

Copy link
Copy Markdown

🔍 WordPress Plugin Check Report

⚠️ Status: Passed with warnings

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
15 0 15

⚠️ Warnings (15)

📁 readme.txt (2 warnings)
📍 Line 🔖 Check 💬 Message
0 mismatched_plugin_name Plugin name "GoDAM - Video Hosting for LMS & Online Courses" is different from the name declared in plugin header "GoDAM".
0 readme_parser_warnings_trimmed_section_description The "Description" section is too long and was truncated. A maximum of 2500 characters is supported.
📁 inc/classes/class-media-library-ajax.php (1 warning)
📍 Line 🔖 Check 💬 Message
1643 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "max_srcset_image_width".
📁 assets/build/pages/video-editor.min.js (1 warning)
📍 Line 🔖 Check 💬 Message
2 react_removed_api This file calls "ReactDOM.findDOMNode", which was removed in React 19 and stops working once WordPress upgrades React. Use a ref on the element instead.
📁 assets/build/css/main.css (1 warning)
📍 Line 🔖 Check 💬 Message
0 EnqueuedStylesScope This style is being loaded in all contexts.
📁 assets/src/libs/analytics.min.js (5 warnings)
📍 Line 🔖 Check 💬 Message
0 EnqueuedScriptsScope This script is being loaded in all frontend contexts.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/2026/11/19/hello-world/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/sample-page/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/demo-attachment-post/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
📁 assets/build/js/main.min.js (5 warnings)
📍 Line 🔖 Check 💬 Message
0 EnqueuedScriptsScope This script is being loaded in all frontend contexts.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/2026/11/19/hello-world/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/sample-page/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/demo-attachment-post/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.

🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

It goes straight into the 2.11.0 release, after the version bump.
@rudrakshi-gupta
rudrakshi-gupta merged commit 0824b8e into develop Nov 19, 2026
5 checks passed
@rudrakshi-gupta
rudrakshi-gupta deleted the fix/transcode-failure-test-ids branch November 19, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low QA automation only (Dependabot fixes, copy, CSS)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants