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

Add core to inject k6 object into window #1007

Merged
merged 6 commits into from
Aug 31, 2023
Merged

Add core to inject k6 object into window #1007

merged 6 commits into from
Aug 31, 2023

Commits on Aug 30, 2023

  1. Add core to inject k6 object into window

    In some cases we want to pass on information to other apps to allow
    them to infer who or what is performing requests against a website.
    For now we're exposing an empty object, but we hope to extend the
    object with meta data that will be useful for other apps that have been
    instrumented on the website.
    ankur22 committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    2300e7d View commit details
    Browse the repository at this point in the history
  2. Add a integration test for k6 object injection

    This test will evaluate and return the value. It should be an empty
    object and not null.
    ankur22 committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    6f5222b View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2023

  1. Update common/browser_context_test.go

    Co-authored-by: İnanç Gümüş <[email protected]>
    ankur22 and inancgumus authored Aug 31, 2023
    Configuration menu
    Copy the full SHA
    470be1e View commit details
    Browse the repository at this point in the history
  2. Rename web_vital.js file

    We're renaming this since this file will embed scripts other than
    web vital scripts.
    ankur22 committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    f850b0a View commit details
    Browse the repository at this point in the history
  3. Add a k6 object script file

    To be consistent with how we work with other injected scripts, the k6
    object is being moved to its own js file. This also helps us avoid
    working with globals.
    
    It's worth noting that the k6 object will need to be mutable at some
    stage to add test specific unique metadata in the future.
    
    Resolves: #1007 (comment)
    ankur22 committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    45bdce8 View commit details
    Browse the repository at this point in the history
  4. Refactor to work with the embedded k6 object

    This commit now works with the new k6 object file instead of the global
    k6 object file.
    
    Resolves: #1007 (comment)
    ankur22 committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    a6d5a15 View commit details
    Browse the repository at this point in the history