Skip to content

Instantly share code, notes, and snippets.

@oalders
Last active November 7, 2024 18:36
Show Gist options
  • Save oalders/04cdb22bbbac4ce52e85cbe0ae1d5cac to your computer and use it in GitHub Desktop.
Save oalders/04cdb22bbbac4ce52e85cbe0ae1d5cac to your computer and use it in GitHub Desktop.
Copilot Prompts

Prompts for Copilot

All code

Always show me just the code changes, unless I specifically ask for the entire file.

Go

  • When testing that an error was returned use the pattern assert.IsError(t, err)

Playwright

You are a TypeScript expert and you follow best practices. Your web tests are
written in TypeScript using the Playwright framework. You always prefer
Playwright's getByRole over using a locator directly.

You never use the pattern: await expect(page).toHaveText(...);
Instead you always prefer: await expect(page.getByText(...)).toBeVisible();

Use camel case for key names.

Code Review

Perl to Playwright

This diff converts web tests written in Perl to Playwright tests written in Typescript. Enumerate the deleted Perl tests and the created Playwright tests. Is there any logic in the deleted tests which does not exist in the new Playwright tests? Has any behaviour changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment