Skip to content

Commit

Permalink
Update cleaner to account for dynamic Run History date (#1194)
Browse files Browse the repository at this point in the history
  • Loading branch information
howard-e authored Aug 15, 2024
1 parent 5f2de7a commit 721d04e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions client/components/common/RunHistory/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const RunHistory = ({ testPlanReports, testId }) => {
if (testResult?.completedAt) {
l.push(
<RunListItem
className="run-history-item"
key={`${testResult.atVersion.id}-${testResult.browserVersion.id}-${testResult.test.id}-${tester.username}`}
>
Tested with{' '}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ <h1>
aria-labelledby="disclosure-btn-test-instructions-and-results-Run History"
class="css-19fsyrg">
<ul style="margin-bottom: 0px">
<li class="css-j662fd">
<li class="run-history-item css-j662fd">
Tested with <b>JAWS 2021.2111.13</b> and
<b>Chrome 99.0.4844.84</b> by
<b
Expand All @@ -648,7 +648,6 @@ <h1>
>esmeralda-baggins</a
></b
>
on August 14, 2024.
</li>
</ul>
</div>
Expand Down
12 changes: 11 additions & 1 deletion client/tests/e2e/snapshots/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,21 @@ async function cleanAndNormalizeSnapshot(page) {
) {
el.remove();
}

// Confirm text is from Run History component
if (
text.includes('Tested with') &&
text.includes('and') &&
text.includes('by') &&
text.includes('on')
) {
el.innerHTML = el.innerHTML.replace(/on [^<]*$/, '');
}
});
}

removeElements(
'.ready-for-review, .in-progress, .target-days-container button'
'.ready-for-review, .in-progress, .target-days-container button, .run-history-item'
);
});

Expand Down

0 comments on commit 721d04e

Please sign in to comment.