Functions/Get-Puppeteer_NavigateNewBrowserPageToLink.Tests.ps1
describe "BitTitan.Runbooks.UIAutomation/Get-Puppeteer_NavigateNewBrowserPageToLink" -Tags "module", "unit" { # Import the function to test . "$($PSScriptRoot)\Get-Puppeteer_NavigateNewBrowserPageToLink.ps1" it "returns the code for navigating a new browser page to a link" { # Call the function $output = Get-Puppeteer_NavigateNewBrowserPageToLink -Link "https://bittitan.com" # Verify the output $output | Should Be @" const page = await browser.newPage(); await page.goto('https://bittitan.com'); await page.setViewport(chromeBrowserOptions.defaultViewport) "@ } } |