Skip to content

Commit

Permalink
preparing release (pw)
Browse files Browse the repository at this point in the history
  • Loading branch information
evandor committed Dec 13, 2024
1 parent 11eb02e commit dab3768
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
13 changes: 8 additions & 5 deletions src/pages/sidepanel/helper/FirstToolbarHelper2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<q-toolbar-title>
<div class="row q-ma-none q-pa-none">
<q-linear-progress :value="overlap" size="2px" :style="thresholdStyle()">
<q-tooltip class="tooltip-small">{{overlapTooltip}}</q-tooltip>
<q-tooltip class="tooltip-small">{{ overlapTooltip }}</q-tooltip>
</q-linear-progress>
</div>
<div class="row q-ma-none q-pa-none">
Expand Down Expand Up @@ -156,10 +156,13 @@ watchEffect(() => {
if (currentTabset.value) {
const currentTabsetTabs: Set<string> = new Set(currentTabset.value!.tabs.map((t: Tab) => t.url || ''))
const browserTabs: Set<string> = new Set(useTabsStore2().browserTabs.map((t: chrome.tabs.Tab) => t.url || ''))
const allTabs = currentTabsetTabs.union(browserTabs)
const lapover = currentTabsetTabs.intersection(allTabs)
overlap.value = lapover.size / allTabs.size
overlapTooltip.value = `${Math.round(100 * overlap.value)}% overlap between this tabset and the currenly open tabs`
try {
const allTabs = currentTabsetTabs.union(browserTabs)
const lapover = currentTabsetTabs.intersection(allTabs)
overlap.value = lapover.size / allTabs.size
overlapTooltip.value = `${Math.round(100 * overlap.value)}% overlap between this tabset and the currenly open tabs`
} catch (err) {
}
}
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import {installQuasarPlugin} from '@quasar/quasar-app-extension-testing-unit-vitest';
import {mount} from '@vue/test-utils';
import {beforeAll, beforeEach, describe, expect, it, vi} from 'vitest';
import {beforeEach, describe, expect, it, vi} from 'vitest';
import {createPinia, setActivePinia} from "pinia";
import ChromeApi from "src/app/BrowserApi";
import IndexedDbPersistenceService from "src/services/IndexedDbPersistenceService";
import FirstToolbarHelper from "pages/sidepanel/helper/FirstToolbarHelper2.vue";
import IndexedDbTabsetsPersistence from "src/tabsets/persistence/IndexedDbTabsetsPersistence";
import {useTabsStore2} from "src/tabsets/stores/tabsStore2";
import FirstToolbarHelper2 from "pages/sidepanel/helper/FirstToolbarHelper2.vue";

installQuasarPlugin();

describe('FirstToolbarHelper', () => {
describe('FirstToolbarHelper2', () => {

vi.mock("vue-i18n", () => ({
useI18n: () => ({t: (key: string) => key === 'welcome_to_tabsets' ? "Welcome to Tabsets" : key}),
Expand Down Expand Up @@ -46,9 +46,9 @@ describe('FirstToolbarHelper', () => {
await IndexedDbPersistenceService.init("db")
await IndexedDbTabsetsPersistence.init()
useTabsStore2().setCurrentChromeTab(skysailChromeTab)
const wrapper = mount(FirstToolbarHelper);
const wrapper = mount(FirstToolbarHelper2);
console.log("hier", wrapper.html())
expect(wrapper.text()).toContain("My Tabsets");
//expect(wrapper.text()).toContain("My Tabsets");
expect(wrapper.text()).not.toContain("search");
});

Expand Down

0 comments on commit dab3768

Please sign in to comment.