Skip to content

Commit

Permalink
Ensure that "Target Days X Past" is not included in snapshot (#1181)
Browse files Browse the repository at this point in the history
  • Loading branch information
stalgiag authored Jul 30, 2024
1 parent abe3086 commit 7f6d795
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 2 additions & 6 deletions client/tests/e2e/snapshots/saved/_data-management.html
Original file line number Diff line number Diff line change
Expand Up @@ -694,12 +694,8 @@ <h2>Test Plans Status Summary</h2>
><span role="listitem" class="more-issues-container"
><span class="issues css-fidnqg"></span>0 Open
Issues</span
><span class="target-days-container"
><button>
Target&nbsp;<b>575 Days</b>&nbsp;Past
</button></span
></span
>
><span class="target-days-container"></span
></span>
</div>
</td>
<td><span class="css-wpichc">None Yet</span></td>
Expand Down
7 changes: 5 additions & 2 deletions client/tests/e2e/snapshots/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ async function cleanAndNormalizeSnapshot(page) {
const text = el.textContent.trim();
if (
text.includes('Ready for Review') ||
text.includes('Review in Progress')
text.includes('Review in Progress') ||
(text.includes('Days') && text.includes('Past'))
) {
el.remove();
}
});
}

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

const content = await page.content();
Expand Down

0 comments on commit 7f6d795

Please sign in to comment.