Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): Don't poison floccus.org visitor stats #1748

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions src/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4835,11 +4835,11 @@ describe('Floccus', function() {
it('should create local tabs on the server', async function() {
browser.tabs.create({
index: 1,
url: 'https://floccus.org/#test1'
url: 'https://example.org/#test1'
})
browser.tabs.create({
index: 2,
url: 'https://floccus.org/#test2'
url: 'https://example.org/#test2'
})
await awaitTabsUpdated()

Expand All @@ -4855,8 +4855,8 @@ describe('Floccus', function() {
new Folder({
title: 'Window 0',
children: [
new Bookmark({ title: 'Cross-browser bookmarks syncing - floccus.org', url: 'https://floccus.org/#test1' }),
new Bookmark({ title: 'Cross-browser bookmarks syncing - floccus.org', url: 'https://floccus.org/#test2' })
new Bookmark({ title: 'Example Domain', url: 'https://example.org/#test1' }),
new Bookmark({ title: 'Example Domain', url: 'https://example.org/#test2' })
]
})
]
Expand All @@ -4875,8 +4875,8 @@ describe('Floccus', function() {
location: ItemLocation.SERVER
}))
serverMark = {
title: 'Cross-browser bookmarks syncing - floccus.org',
url: 'https://floccus.org/',
title: 'Example Domain',
url: 'https://example.org/',
parentId: windowFolderId,
location: ItemLocation.SERVER
}
Expand All @@ -4898,7 +4898,7 @@ describe('Floccus', function() {
new Folder({
title: 'Window 0',
children: [
new Bookmark({ title: 'Cross-browser bookmarks syncing - floccus.org', url: 'https://floccus.org/' }),
new Bookmark({ title: 'Example Domain', url: 'https://example.org/' }),
]
})
]
Expand All @@ -4911,11 +4911,11 @@ describe('Floccus', function() {

browser.tabs.create({
index: 1,
url: 'https://floccus.org/#test1'
url: 'https://example.org/#test1'
})
const tab = browser.tabs.create({
index: 2,
url: 'https://floccus.org/#test2'
url: 'https://example.org/#test2'
})
await awaitTabsUpdated()

Expand All @@ -4931,16 +4931,16 @@ describe('Floccus', function() {
new Folder({
title: 'Window 0',
children: [
new Bookmark({ title: 'Cross-browser bookmarks syncing - floccus.org', url: 'https://floccus.org/#test1' }),
new Bookmark({ title: 'Cross-browser bookmarks syncing - floccus.org', url: 'https://floccus.org/#test2' })
new Bookmark({ title: 'Example Domain', url: 'https://example.org/#test1' }),
new Bookmark({ title: 'Example Domain', url: 'https://example.org/#test2' })
]
})
]
}),
false
)

await browser.tabs.update(tab.id, {url: 'https://example.org'})
await browser.tabs.update(tab.id, {url: 'https://example.org/#test3'})
await awaitTabsUpdated()

await account.sync()
Expand All @@ -4955,8 +4955,8 @@ describe('Floccus', function() {
new Folder({
title: 'Window 0',
children: [
new Bookmark({ title: 'Cross-browser bookmarks syncing - floccus.org', url: 'https://floccus.org/#test1' }),
new Bookmark({ title: 'Example Domain', url: 'https://example.org/' })
new Bookmark({ title: 'Example Domain', url: 'https://example.org/#test1' }),
new Bookmark({ title: 'Example Domain', url: 'https://example.org/#test3' })
]
})
]
Expand All @@ -4975,8 +4975,8 @@ describe('Floccus', function() {
location: ItemLocation.SERVER
}))
serverMark = {
title: 'Cross-browser bookmarks syncing - floccus.org',
url: 'https://floccus.org/',
title: 'Example Domain',
url: 'https://example.org/#test1',
parentId: windowFolderId,
location: ItemLocation.SERVER
}
Expand All @@ -4998,7 +4998,7 @@ describe('Floccus', function() {
new Folder({
title: 'Window 0',
children: [
new Bookmark({ title: 'Cross-browser bookmarks syncing - floccus.org', url: 'https://floccus.org/' }),
new Bookmark({ title: 'Example Domain', url: 'https://example.org/#test1' }),
]
})
]
Expand All @@ -5010,15 +5010,15 @@ describe('Floccus', function() {
await withSyncConnection(account, async() => {
serverMark2 = {
title: 'Example Domain',
url: 'https://example.org/#test',
url: 'https://example.org/#test3',
parentId: windowFolderId,
location: ItemLocation.SERVER
}
await adapter.createBookmark(
new Bookmark(serverMark2)
)

await adapter.updateBookmark({ ...serverMark, id: serverMarkId, url: 'https://example.org/', title: 'Example Domain', parentId: windowFolderId })
await adapter.updateBookmark({ ...serverMark, id: serverMarkId, url: 'https://example.org/#test2', title: 'Example Domain', parentId: windowFolderId })
})

await account.setData({...account.getData(), strategy: 'slave'})
Expand All @@ -5035,8 +5035,8 @@ describe('Floccus', function() {
new Folder({
title: 'Window 0',
children: [
new Bookmark({ title: 'Example Domain', url: 'https://example.org/' }),
new Bookmark({ title: 'Example Domain', url: 'https://example.org/#test' }),
new Bookmark({ title: 'Example Domain', url: 'https://example.org/#test2' }),
new Bookmark({ title: 'Example Domain', url: 'https://example.org/#test3' }),
]
})
]
Expand Down
Loading