-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6018aa5
commit 1733ee5
Showing
13 changed files
with
500 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
- Add API manipulation feature (#1207) | ||
- [Autofill password import] Misc fixes (#1184) | ||
- ntp: favorites components (#1208) | ||
- Ignore lint PRs in git-blame (#1205) | ||
- Introduce Prettier (#1198) | ||
- Waiting for import status on macOS (#1180) |
100 changes: 76 additions & 24 deletions
100
Sources/ContentScopeScripts/dist/pages/onboarding/js/index.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
52 changes: 52 additions & 0 deletions
52
Sources/ContentScopeScripts/dist/pages/onboarding/js/mock-transport.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { TestTransportConfig } from '@duckduckgo/messaging'; | ||
|
||
/** | ||
* @typedef {import('../../../../types/release-notes').UpdateMessage} UpdateMessage | ||
*/ | ||
|
||
export function mockTransport() { | ||
return new TestTransportConfig({ | ||
notify(_msg) { | ||
window.__playwright_01?.mocks?.outgoing?.push?.({ payload: structuredClone(_msg) }); | ||
const msg = /** @type {any} */ (_msg); | ||
switch (msg.method) { | ||
default: { | ||
console.warn('unhandled notification', msg); | ||
} | ||
} | ||
}, | ||
request(_msg) { | ||
window.__playwright_01?.mocks?.outgoing?.push?.({ payload: structuredClone(_msg) }); | ||
const msg = /** @type {any} */ (_msg); | ||
switch (msg.method) { | ||
case 'init': { | ||
return Promise.resolve({ | ||
stepDefinitions: {}, | ||
exclude: [], | ||
order: 'v3', | ||
locale: 'en', | ||
env: 'development', | ||
}); | ||
} | ||
case 'requestImport': | ||
case 'requestSetAsDefault': | ||
case 'requestDockOptIn': { | ||
return Promise.resolve({ | ||
enabled: true, | ||
}); | ||
} | ||
default: | ||
return Promise.resolve(null); | ||
} | ||
}, | ||
subscribe(_msg, callback) { | ||
window.__playwright_01?.mocks?.outgoing?.push?.({ payload: structuredClone(_msg) }); | ||
|
||
callback(null); | ||
|
||
return () => { | ||
// any cleanup | ||
}; | ||
}, | ||
}); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.