Skip to content

Commit

Permalink
Correct post install pathname (#1711)
Browse files Browse the repository at this point in the history
* Test for correct post install pathname

* Fix post-install ATB parameter
  • Loading branch information
sammacbeth committed Feb 8, 2023
1 parent b65ffe4 commit c2a16d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions integration-test/background/atb.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ describe('install workflow', () => {
// if it never does, jasmine timeout will kick in
while (!postInstallOpened) {
const urls = await Promise.all(browser.targets().map(target => target.url()))
postInstallOpened = urls.some(url => url.includes('duckduckgo.com/extension-success'))
postInstallOpened = urls.find(url => url.includes('duckduckgo.com/extension-success'))
await backgroundWait.forTimeout(bgPage, 100)
}

expect(postInstallOpened).toBeTruthy()
expect(new URL(postInstallOpened).pathname).toBe('/extension-success')
})
})

Expand Down
2 changes: 1 addition & 1 deletion shared/js/background/atb.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const ATB = (() => {
settings.updateSetting('hasSeenPostInstall', true)
let postInstallURL = 'https://duckduckgo.com/extension-success'
const atb = settings.getSetting('atb')
postInstallURL += atb ? `&atb=${atb}` : ''
postInstallURL += atb ? `?atb=${atb}` : ''
browser.tabs.create({
url: postInstallURL
})
Expand Down

0 comments on commit c2a16d8

Please sign in to comment.