-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
✅Repurpose test-3p-frame.js as a unit test #23751
Conversation
@@ -137,7 +136,7 @@ describe | |||
}); | |||
|
|||
// TODO(bradfrizzell) break this out into a test-iframe-attributes | |||
it.skip('should create an iframe', () => { | |||
it('should create an iframe', () => { | |||
window.AMP_MODE = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try remove this
} from '../../../src/3p-frame-messaging'; | ||
import {dev} from '../../../src/log'; | ||
import {preconnectForElement} from '../../../src/preconnect'; | ||
import {toggleExperiment} from '../../../src/experiments'; | ||
|
||
describe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try move this in a describes.realWin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls address test isolation issue in a separate PR
// Since DOM fingerprint changes between browsers and documents, to have | ||
// stable tests, we can only verify its existence. | ||
expect(name.attributes._context.domFingerprint).to.exist; | ||
delete name.attributes._context.domFingerprint; | ||
delete parsedFragment._context.domFingerprint; | ||
delete fragment._context.domFingerprint; | ||
// Value changes between tests. | ||
// TODO: Switch test to isolated window. | ||
expect(name.attributes._context.experimentToggles).to.exist; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verify the toggles
Remove the duplicative tests, and move the tests into unit folder.