Skip to content

Commit

Permalink
Event is received in web-channel.js, but not onFxAStatus in oauth web…
Browse files Browse the repository at this point in the history
…channel auth-broker
  • Loading branch information
LZoog committed May 26, 2023
1 parent 9daa8ff commit 5d21ba8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 9 additions & 3 deletions packages/functional-tests/tests/oauth/webchannel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ test.describe('oauth webchannel', () => {
target,
pages: { login },
}) => {
// Listen to console.log() calls within the page context
page.on('console', (msg) => {
for (let i = 0; i < msg.args().length; ++i)
console.log(`${i}: ${msg.args()[i]}`);
});

const email = login.createEmail();

const query = new URLSearchParams({
Expand All @@ -29,8 +35,8 @@ test.describe('oauth webchannel', () => {

await page.evaluate(() => {
window.dispatchEvent(
new CustomEvent('WebChannelMessageToChrome', {
detail: JSON.stringify({
new CustomEvent('WebChannelMessageToContent', {
detail: {
id: 'account_updates',
message: {
command: 'fxaccounts:fxa_status',
Expand All @@ -42,7 +48,7 @@ test.describe('oauth webchannel', () => {
signedInUser: null,
},
},
}),
},
})
);
});
Expand Down
1 change: 0 additions & 1 deletion packages/fxa-content-server/tests/functional.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
const testsSettings = require('./functional_settings');
module.exports = testsSettings.concat([
'tests/functional/fx_browser_relier.js',
'tests/functional/oauth_webchannel.js',
'tests/functional/oauth_require_totp.js',
// new and flaky tests above here',
'tests/functional/500.js',
Expand Down

0 comments on commit 5d21ba8

Please sign in to comment.