Functions/Get-Puppeteer_EnterTextIntoSelector.Tests.ps1

describe "BitTitan.Runbooks.UIAutomation/Get-Puppeteer_EnterTextIntoSelector" -Tag "module", "unit" {

    # Import the function to test
    . "$($PSScriptRoot)\Get-Puppeteer_EnterTextIntoSelector.ps1"

    it "returns the code for entering text into a selector" {
        # Call the function
        $output = Get-Puppeteer_EnterTextIntoSelector -SelectorName "#selector" -Text "text"

        # Verify the output
        $output | Should Be @"
selector = '#selector';
await page.waitForSelector(selector);
await page.type(selector, 'text');
"@

    }
}