Skip to content

Commit

Permalink
Doc: use @doc deprecated for Accessibility.snapshot/2
Browse files Browse the repository at this point in the history
Where as `@deprecated` issues a warning during runtime, which is annoying (in
particular, when developing playwright-elixir), the `@doc` form will mark the
function as deprecated in the documentation, without the annoyance.
  • Loading branch information
coreyti committed Aug 6, 2024
1 parent faa13fe commit b88899e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/playwright/page/accessibility.ex
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,8 @@ defmodule Playwright.Page.Accessibility do
|> (&(Enum.find(&1.children, fn e -> e.readonly end))).()
%{name: "pick me", readonly: true, role: "textbox"}
"""
@deprecated "This method is deprecated. Please use other libraries such as
[Axe](https://www.deque.com/axe/) if you need to test page accessibility.
See the Playwright.dev Node.js [guide](https://playwright.dev/docs/accessibility-testing)
for integration with Axe."
@doc deprecated: "Please use other libraries such as [Axe](https://www.deque.com/axe/) if you need to test page accessibility.
See the Playwright.dev Node.js [guide](https://playwright.dev/docs/accessibility-testing) for integration with Axe."
def snapshot(page, options \\ %{})

def snapshot(%Page{session: session} = page, options) do
Expand Down

0 comments on commit b88899e

Please sign in to comment.