Skip to content

Commit

Permalink
Merge pull request #770 from matomo-org/PG-3196-remove-all-websites
Browse files Browse the repository at this point in the history
Added code to remove All websites from site selector dropdown, #PG-3196
  • Loading branch information
AltamashShaikh committed Mar 22, 2024
2 parents 5145cda + 550c0c8 commit 7bb5635
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions templates/manageContainers.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<div
vue-entry="CoreHome.SiteSelector"
show-selected-site="true"
show-all-sites-item="false"
class="sites_autocomplete"
></div>
</div>
Expand Down
1 change: 1 addition & 0 deletions templates/tagmanager.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<div
vue-entry="CoreHome.SiteSelector"
show-selected-site="true"
show-all-sites-item="false"
class="sites_autocomplete"
></div>
</div>
Expand Down
7 changes: 7 additions & 0 deletions tests/UI/Container_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ describe("Container", function () {
expect(await pageWrap.screenshot()).to.matchImage('site_some_exist');
});

it('should show websites dropdown without all websites', async function () {
await page.evaluate(() => $('.top_bar_sites_selector .siteSelector a.title').click());
pageWrap = await page.$('.top_bar_sites_selector .dropdown');
expect(await pageWrap.screenshot()).to.matchImage('websites_dropdown_without_all_websites');
await page.evaluate(() => $('.top_bar_sites_selector .siteSelector a.title').click());
});

it('should be able to create a new container', async function () {
await page.click('.createNewContainer');
await capture.setTableRowHeight(page);
Expand Down
7 changes: 7 additions & 0 deletions tests/UI/TagManager_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ describe("TagManager", function () {
await capture.page(page, 'getting_started');
});

it('should show websites dropdown without all websites', async function () {
await page.evaluate(() => $('.top_bar_sites_selector .siteSelector a.title').click());
pageWrap = await page.$('.top_bar_sites_selector .dropdown');
expect(await pageWrap.screenshot()).to.matchImage('websites_dropdown_without_all_websites');
await page.evaluate(() => $('.top_bar_sites_selector .siteSelector a.title').click());
});

it('should show top bar list when no container exists', async function () {
await page.goto(generalParamsSite5 + urlBase + 'gettingStarted');
await capture.topControls(page, 'top_controls_no_container_exists');
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7bb5635

Please sign in to comment.