Skip to content

Commit

Permalink
remove plugin version in plugins admin customization e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Jun 9, 2024
1 parent 6dd0431 commit 610f705
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/e2e/pageobjects/wp-admin/plugins-admin.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ class PluginsAdminPage extends Page {
window.jQuery('.subsubsub').hide();
});
}

async hidePluginVersion() {
await browser.execute(() => {
window.jQuery('.plugin-version-author-uri').each(function () {
window.jQuery(this).html(
window.jQuery(this).html().replace(/Version \d+\.\d+\.\d+/g, 'Version REMOVED')
);
});
});
}
}

export default new PluginsAdminPage();
1 change: 1 addition & 0 deletions tests/e2e/wp-plugins-admin.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ describe('WordPress Customizations > Plugins Admin', () => {
await PluginsAdmin.hideNonMatomoRows();
await PluginsAdmin.hideNotifications();
await PluginsAdmin.hidePluginFilters();
await PluginsAdmin.hidePluginVersion();
expect(
await browser.checkFullPageScreen(`wp-customizations.plugins-admin.data-deletion${trunkSuffix}`)
).toEqual(0);
Expand Down

0 comments on commit 610f705

Please sign in to comment.