From 9c1e67390a0e9840cc5bd908ef9f9e0568e66957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Mon, 22 Jan 2024 17:31:02 +0800 Subject: [PATCH] Add missing tags to tests requiring Erlang docs --- test/livebook/intellisense_test.exs | 20 +++++++++++++++----- test/livebook/remote_intellisense_test.exs | 1 + 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/test/livebook/intellisense_test.exs b/test/livebook/intellisense_test.exs index 3aac3e0cd..06db97d16 100644 --- a/test/livebook/intellisense_test.exs +++ b/test/livebook/intellisense_test.exs @@ -1481,6 +1481,11 @@ defmodule Livebook.IntellisenseTest do assert %{contents: [type]} = Intellisense.get_details("Date.t", 6, context, node()) assert type =~ "Date.t()" + end + + @tag :erl_docs + test "returns module-prepended Erlang type signatures" do + context = eval(do: nil) assert %{contents: [type]} = Intellisense.get_details(":code.load_error_rsn", 8, context, node()) @@ -1494,11 +1499,6 @@ defmodule Livebook.IntellisenseTest do assert %{contents: [type]} = Intellisense.get_details("Date.t", 6, context, node()) assert type =~ "@type t() :: %Date" - assert %{contents: [type]} = - Intellisense.get_details(":code.load_error_rsn", 8, context, node()) - - assert type =~ "@type load_error_rsn() ::" - # opaque types are listed without internal definition assert %{contents: [type]} = Intellisense.get_details("MapSet.internal", 10, context, node()) @@ -1506,6 +1506,16 @@ defmodule Livebook.IntellisenseTest do assert type =~ "@opaque internal(value)\n" end + @tag :erl_docs + test "includes Erlang type specs" do + context = eval(do: nil) + + assert %{contents: [type]} = + Intellisense.get_details(":code.load_error_rsn", 8, context, node()) + + assert type =~ "@type load_error_rsn() ::" + end + test "returns link to online documentation" do context = eval(do: nil) diff --git a/test/livebook/remote_intellisense_test.exs b/test/livebook/remote_intellisense_test.exs index 9d5904149..a671bb35c 100644 --- a/test/livebook/remote_intellisense_test.exs +++ b/test/livebook/remote_intellisense_test.exs @@ -91,6 +91,7 @@ defmodule Livebook.RemoteIntellisenseTest do } in Intellisense.get_completion_items("RemoteModule.hel", context, node) end + @tag :erl_docs test "find modules from apps", %{node: node} do context = eval(do: nil)