remove data-qa
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
shibao 2023-03-14 23:51:50 -04:00
parent c5e82c60b6
commit 8ef5147078
26 changed files with 288 additions and 91 deletions

View File

@ -1,3 +1,6 @@
# v0.1.10
- Improve accessibility
# v0.1.9
- Improve server log
- Style 大一點

View File

@ -92,11 +92,7 @@ defmodule MemexWeb.Components.ContextsTableComponent do
assigns = %{slug: slug}
slug_block = ~H"""
<.link
navigate={Routes.context_show_path(Endpoint, :show, @slug)}
class="link"
data-qa={"context-show-#{@slug}"}
>
<.link navigate={Routes.context_show_path(Endpoint, :show, @slug)} class="link">
<%= @slug %>
</.link>
"""

View File

@ -92,11 +92,7 @@ defmodule MemexWeb.Components.NotesTableComponent do
assigns = %{slug: slug}
slug_block = ~H"""
<.link
navigate={Routes.note_show_path(Endpoint, :show, @slug)}
class="link"
data-qa={"note-show-#{@slug}"}
>
<.link navigate={Routes.note_show_path(Endpoint, :show, @slug)} class="link">
<%= @slug %>
</.link>
"""

View File

@ -93,11 +93,7 @@ defmodule MemexWeb.Components.PipelinesTableComponent do
assigns = %{slug: slug}
slug_block = ~H"""
<.link
navigate={Routes.pipeline_show_path(Endpoint, :show, @slug)}
class="link"
data-qa={"pipeline-show-#{@slug}"}
>
<.link navigate={Routes.pipeline_show_path(Endpoint, :show, @slug)} class="link">
<%= @slug %>
</.link>
"""

View File

@ -33,7 +33,7 @@
<.link
:if={is_owner?(context, @current_user)}
patch={Routes.context_index_path(@socket, :edit, context.slug)}
data-qa={"context-edit-#{context.id}"}
aria-label={gettext("edit %{context_slug}", context_slug: context.slug)}
>
<%= dgettext("actions", "edit") %>
</.link>
@ -43,7 +43,7 @@
phx-click="delete"
phx-value-id={context.id}
data-confirm={dgettext("prompts", "are you sure?")}
data-qa={"delete-context-#{context.id}"}
aria-label={gettext("delete %{context_slug}", context_slug: context.slug)}
>
<%= dgettext("actions", "delete") %>
</.link>

View File

@ -36,7 +36,7 @@
class="btn btn-primary"
phx-click="delete"
data-confirm={dgettext("prompts", "are you sure?")}
data-qa={"delete-context-#{@context.id}"}
aria-label={gettext("delete %{context_slug}", context_slug: @context.slug)}
>
<%= dgettext("actions", "delete") %>
</button>

View File

@ -21,6 +21,7 @@
type="submit"
class="mx-2 my-1 btn btn-secondary"
phx-click={JS.dispatch("memex:clipcopy", to: "#code-#{invite.id}")}
aria-label={gettext("copy invite link for %{invite_name}", invite_name: invite.name)}
>
<%= dgettext("actions", "copy") %>
</button>
@ -29,7 +30,7 @@
<.link
patch={Routes.invite_index_path(Endpoint, :edit, invite)}
class="text-primary-400 link"
data-qa={"edit-#{invite.id}"}
aria-label={gettext("edit invite for %{invite_name}", invite_name: invite.name)}
>
<i class="fa-fw fa-lg fas fa-edit"></i>
</.link>
@ -44,7 +45,7 @@
invite_name: invite.name
)
}
data-qa={"delete-#{invite.id}"}
aria-label={gettext("delete invite for %{invite_name}", invite_name: invite.name)}
>
<i class="fa-fw fa-lg fas fa-trash"></i>
</.link>

View File

@ -102,7 +102,6 @@ defmodule MemexWeb.LiveHelpers do
value={@value}
checked={@value}
class="sr-only peer"
data-qa={@id}
{
if assigns |> Map.has_key?(:target),
do: %{"phx-click": @action, "phx-value-value": @value, "phx-target": @target},

View File

@ -33,7 +33,7 @@
<.link
:if={is_owner?(note, @current_user)}
patch={Routes.note_index_path(@socket, :edit, note.slug)}
data-qa={"note-edit-#{note.id}"}
aria-label={gettext("edit %{note_slug}", note_slug: note.slug)}
>
<%= dgettext("actions", "edit") %>
</.link>
@ -43,7 +43,7 @@
phx-click="delete"
phx-value-id={note.id}
data-confirm={dgettext("prompts", "are you sure?")}
data-qa={"delete-note-#{note.id}"}
aria-label={gettext("delete %{note_slug}", note_slug: note.slug)}
>
<%= dgettext("actions", "delete") %>
</.link>

View File

@ -36,7 +36,7 @@
class="btn btn-primary"
phx-click="delete"
data-confirm={dgettext("prompts", "are you sure?")}
data-qa={"delete-note-#{@note.id}"}
aria-label={gettext("delete %{note_slug}", note_slug: @note.slug)}
>
<%= dgettext("actions", "delete") %>
</button>

View File

@ -33,7 +33,7 @@
<.link
:if={is_owner?(pipeline, @current_user)}
patch={Routes.pipeline_index_path(@socket, :edit, pipeline.slug)}
data-qa={"pipeline-edit-#{pipeline.id}"}
aria-label={gettext("edit %{pipeline_slug}", pipeline_slug: pipeline.slug)}
>
<%= dgettext("actions", "edit") %>
</.link>
@ -43,7 +43,7 @@
phx-click="delete"
phx-value-id={pipeline.id}
data-confirm={dgettext("prompts", "are you sure?")}
data-qa={"delete-pipeline-#{pipeline.id}"}
aria-label={gettext("delete %{pipeline_slug}", pipeline_slug: pipeline.slug)}
>
<%= dgettext("actions", "delete") %>
</.link>

View File

@ -44,7 +44,7 @@
class="btn btn-primary"
phx-click="delete"
data-confirm={dgettext("prompts", "are you sure?")}
data-qa={"delete-pipeline-#{@pipeline.id}"}
aria-label={gettext("delete %{pipeline_slug}", pipeline_slug: @pipeline.slug)}
>
<%= dgettext("actions", "delete") %>
</button>
@ -78,7 +78,7 @@
phx-click="reorder_step"
phx-value-direction="up"
phx-value-step-id={step_id}
data-qa={"move-step-up-#{step_id}"}
aria-label={gettext("move %{step_title} up", step_title: step.title)}
>
<i class="fas text-xl fa-chevron-up"></i>
</button>
@ -93,7 +93,7 @@
phx-click="reorder_step"
phx-value-direction="down"
phx-value-step-id={step_id}
data-qa={"move-step-down-#{step_id}"}
aria-label={gettext("move %{step_title} down", step_title: step.title)}
>
<i class="fas text-xl fa-chevron-down"></i>
</button>
@ -102,7 +102,7 @@
<.link
class="self-end btn btn-primary"
patch={Routes.pipeline_show_path(@socket, :edit_step, @pipeline.slug, step_id)}
data-qa={"edit-step-#{step_id}"}
aria-label={gettext("edit %{step_title}", step_title: step.title)}
>
<%= dgettext("actions", "edit") %>
</.link>
@ -113,7 +113,7 @@
phx-click="delete_step"
phx-value-step-id={step_id}
data-confirm={dgettext("prompts", "are you sure?")}
data-qa={"delete-step-#{step_id}"}
aria-label={gettext("delete %{step_title}", step_title: step.title)}
>
<%= dgettext("actions", "delete") %>
</button>
@ -129,7 +129,6 @@
:if={is_owner?(@pipeline, @current_user)}
class="self-end btn btn-primary"
patch={Routes.pipeline_show_path(@socket, :add_step, @pipeline.slug)}
data-qa={"add-step-#{@pipeline.id}"}
>
<%= dgettext("actions", "add step") %>
</.link>

View File

@ -4,7 +4,7 @@ defmodule Memex.MixProject do
def project do
[
app: :memex,
version: "0.1.9",
version: "0.1.10",
elixir: "1.14.1",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: Mix.compilers(),

View File

@ -45,7 +45,7 @@ msgstr ""
msgid "change password"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:82
#: lib/memex_web/live/invite_live/index.html.heex:83
#, elixir-autogen, elixir-format
msgid "create invite"
msgstr ""
@ -134,7 +134,7 @@ msgstr ""
msgid "back"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:134
#: lib/memex_web/live/pipeline_live/show.html.heex:133
#, elixir-autogen, elixir-format
msgid "add step"
msgstr ""
@ -156,7 +156,7 @@ msgstr ""
msgid "export data as json"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:25
#: lib/memex_web/live/invite_live/index.html.heex:26
#, elixir-autogen, elixir-format
msgid "copy"
msgstr ""

View File

@ -45,7 +45,7 @@ msgstr ""
msgid "change password"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:82
#: lib/memex_web/live/invite_live/index.html.heex:83
#, elixir-autogen, elixir-format
msgid "create invite"
msgstr ""
@ -134,7 +134,7 @@ msgstr ""
msgid "back"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:134
#: lib/memex_web/live/pipeline_live/show.html.heex:133
#, elixir-autogen, elixir-format
msgid "add step"
msgstr ""
@ -156,7 +156,7 @@ msgstr ""
msgid "export data as json"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:25
#: lib/memex_web/live/invite_live/index.html.heex:26
#, elixir-autogen, elixir-format
msgid "copy"
msgstr ""

View File

@ -84,7 +84,7 @@ msgstr ""
msgid "current password"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:58
#: lib/memex_web/live/invite_live/index.html.heex:59
#, elixir-autogen, elixir-format
msgid "disable"
msgstr ""
@ -117,7 +117,7 @@ msgstr ""
msgid "email unconfirmed"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:58
#: lib/memex_web/live/invite_live/index.html.heex:59
#, elixir-autogen, elixir-format
msgid "enable"
msgstr ""
@ -267,7 +267,7 @@ msgstr ""
msgid "select privacy"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:73
#: lib/memex_web/live/invite_live/index.html.heex:74
#, elixir-autogen, elixir-format
msgid "set unlimited"
msgstr ""
@ -292,7 +292,7 @@ msgstr ""
msgid "tags"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:118
#: lib/memex_web/live/invite_live/index.html.heex:119
#, elixir-autogen, elixir-format
msgid "users"
msgstr ""
@ -649,7 +649,7 @@ msgstr ""
msgid "Leave \"Uses left\" blank to make invite unlimited"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:90
#: lib/memex_web/live/invite_live/index.html.heex:91
#, elixir-autogen, elixir-format, fuzzy
msgid "admins"
msgstr ""
@ -674,3 +674,71 @@ msgstr ""
#, elixir-autogen, elixir-format, fuzzy
msgid "uses left"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "copy invite link for %{invite_name}"
msgstr ""
#: lib/memex_web/live/context_live/index.html.heex:46
#: lib/memex_web/live/context_live/show.html.heex:39
#, elixir-autogen, elixir-format
msgid "delete %{context_slug}"
msgstr ""
#: lib/memex_web/live/note_live/index.html.heex:46
#: lib/memex_web/live/note_live/show.html.heex:39
#, elixir-autogen, elixir-format
msgid "delete %{note_slug}"
msgstr ""
#: lib/memex_web/live/pipeline_live/index.html.heex:46
#: lib/memex_web/live/pipeline_live/show.html.heex:47
#, elixir-autogen, elixir-format
msgid "delete %{pipeline_slug}"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:116
#, elixir-autogen, elixir-format
msgid "delete %{step_title}"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:48
#, elixir-autogen, elixir-format
msgid "delete invite for %{invite_name}"
msgstr ""
#: lib/memex_web/live/context_live/index.html.heex:36
#, elixir-autogen, elixir-format, fuzzy
msgid "edit %{context_slug}"
msgstr ""
#: lib/memex_web/live/note_live/index.html.heex:36
#, elixir-autogen, elixir-format, fuzzy
msgid "edit %{note_slug}"
msgstr ""
#: lib/memex_web/live/pipeline_live/index.html.heex:36
#, elixir-autogen, elixir-format, fuzzy
msgid "edit %{pipeline_slug}"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:105
#, elixir-autogen, elixir-format
msgid "edit %{step_title}"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:33
#, elixir-autogen, elixir-format
msgid "edit invite for %{invite_name}"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:96
#, elixir-autogen, elixir-format
msgid "move %{step_title} down"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:81
#, elixir-autogen, elixir-format
msgid "move %{step_title} up"
msgstr ""

View File

@ -65,7 +65,7 @@ msgstr ""
msgid "are you sure you want to change your language?"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:43
#: lib/memex_web/live/invite_live/index.html.heex:44
#, elixir-autogen, elixir-format
msgid "are you sure you want to delete the invite for %{invite_name}?"
msgstr ""
@ -80,7 +80,7 @@ msgstr ""
msgid "are you sure you want to log out?"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:68
#: lib/memex_web/live/invite_live/index.html.heex:69
#, elixir-autogen, elixir-format
msgid "are you sure you want to make %{invite_name} unlimited?"
msgstr ""
@ -151,8 +151,8 @@ msgstr ""
msgid "your account has been deleted"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:101
#: lib/memex_web/live/invite_live/index.html.heex:129
#: lib/memex_web/live/invite_live/index.html.heex:102
#: lib/memex_web/live/invite_live/index.html.heex:130
#, elixir-autogen, elixir-format, fuzzy
msgid "are you sure you want to delete %{email}? this action is permanent!"
msgstr ""

View File

@ -82,7 +82,7 @@ msgstr ""
msgid "current password"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:58
#: lib/memex_web/live/invite_live/index.html.heex:59
#, elixir-autogen, elixir-format
msgid "disable"
msgstr ""
@ -115,7 +115,7 @@ msgstr ""
msgid "email unconfirmed"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:58
#: lib/memex_web/live/invite_live/index.html.heex:59
#, elixir-autogen, elixir-format
msgid "enable"
msgstr ""
@ -265,7 +265,7 @@ msgstr ""
msgid "select privacy"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:73
#: lib/memex_web/live/invite_live/index.html.heex:74
#, elixir-autogen, elixir-format
msgid "set unlimited"
msgstr ""
@ -290,7 +290,7 @@ msgstr ""
msgid "tags"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:118
#: lib/memex_web/live/invite_live/index.html.heex:119
#, elixir-autogen, elixir-format
msgid "users"
msgstr ""
@ -647,7 +647,7 @@ msgstr ""
msgid "Leave \"Uses left\" blank to make invite unlimited"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:90
#: lib/memex_web/live/invite_live/index.html.heex:91
#, elixir-autogen, elixir-format
msgid "admins"
msgstr ""
@ -672,3 +672,71 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "uses left"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "copy invite link for %{invite_name}"
msgstr ""
#: lib/memex_web/live/context_live/index.html.heex:46
#: lib/memex_web/live/context_live/show.html.heex:39
#, elixir-autogen, elixir-format
msgid "delete %{context_slug}"
msgstr ""
#: lib/memex_web/live/note_live/index.html.heex:46
#: lib/memex_web/live/note_live/show.html.heex:39
#, elixir-autogen, elixir-format
msgid "delete %{note_slug}"
msgstr ""
#: lib/memex_web/live/pipeline_live/index.html.heex:46
#: lib/memex_web/live/pipeline_live/show.html.heex:47
#, elixir-autogen, elixir-format
msgid "delete %{pipeline_slug}"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:116
#, elixir-autogen, elixir-format
msgid "delete %{step_title}"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:48
#, elixir-autogen, elixir-format
msgid "delete invite for %{invite_name}"
msgstr ""
#: lib/memex_web/live/context_live/index.html.heex:36
#, elixir-autogen, elixir-format
msgid "edit %{context_slug}"
msgstr ""
#: lib/memex_web/live/note_live/index.html.heex:36
#, elixir-autogen, elixir-format
msgid "edit %{note_slug}"
msgstr ""
#: lib/memex_web/live/pipeline_live/index.html.heex:36
#, elixir-autogen, elixir-format
msgid "edit %{pipeline_slug}"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:105
#, elixir-autogen, elixir-format
msgid "edit %{step_title}"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:33
#, elixir-autogen, elixir-format
msgid "edit invite for %{invite_name}"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:96
#, elixir-autogen, elixir-format
msgid "move %{step_title} down"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:81
#, elixir-autogen, elixir-format
msgid "move %{step_title} up"
msgstr ""

View File

@ -46,7 +46,7 @@ msgstr ""
msgid "change password"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:82
#: lib/memex_web/live/invite_live/index.html.heex:83
#, elixir-autogen, elixir-format
msgid "create invite"
msgstr ""
@ -135,7 +135,7 @@ msgstr ""
msgid "back"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:134
#: lib/memex_web/live/pipeline_live/show.html.heex:133
#, elixir-autogen, elixir-format
msgid "add step"
msgstr ""
@ -157,7 +157,7 @@ msgstr ""
msgid "export data as json"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:25
#: lib/memex_web/live/invite_live/index.html.heex:26
#, elixir-autogen, elixir-format
msgid "copy"
msgstr ""

View File

@ -83,7 +83,7 @@ msgstr ""
msgid "current password"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:58
#: lib/memex_web/live/invite_live/index.html.heex:59
#, elixir-autogen, elixir-format
msgid "disable"
msgstr ""
@ -116,7 +116,7 @@ msgstr ""
msgid "email unconfirmed"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:58
#: lib/memex_web/live/invite_live/index.html.heex:59
#, elixir-autogen, elixir-format
msgid "enable"
msgstr ""
@ -266,7 +266,7 @@ msgstr ""
msgid "select privacy"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:73
#: lib/memex_web/live/invite_live/index.html.heex:74
#, elixir-autogen, elixir-format
msgid "set unlimited"
msgstr ""
@ -291,7 +291,7 @@ msgstr ""
msgid "tags"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:118
#: lib/memex_web/live/invite_live/index.html.heex:119
#, elixir-autogen, elixir-format
msgid "users"
msgstr ""
@ -648,7 +648,7 @@ msgstr ""
msgid "Leave \"Uses left\" blank to make invite unlimited"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:90
#: lib/memex_web/live/invite_live/index.html.heex:91
#, elixir-autogen, elixir-format
msgid "admins"
msgstr ""
@ -673,3 +673,71 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "uses left"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "copy invite link for %{invite_name}"
msgstr ""
#: lib/memex_web/live/context_live/index.html.heex:46
#: lib/memex_web/live/context_live/show.html.heex:39
#, elixir-autogen, elixir-format
msgid "delete %{context_slug}"
msgstr ""
#: lib/memex_web/live/note_live/index.html.heex:46
#: lib/memex_web/live/note_live/show.html.heex:39
#, elixir-autogen, elixir-format
msgid "delete %{note_slug}"
msgstr ""
#: lib/memex_web/live/pipeline_live/index.html.heex:46
#: lib/memex_web/live/pipeline_live/show.html.heex:47
#, elixir-autogen, elixir-format
msgid "delete %{pipeline_slug}"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:116
#, elixir-autogen, elixir-format
msgid "delete %{step_title}"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:48
#, elixir-autogen, elixir-format
msgid "delete invite for %{invite_name}"
msgstr ""
#: lib/memex_web/live/context_live/index.html.heex:36
#, elixir-autogen, elixir-format, fuzzy
msgid "edit %{context_slug}"
msgstr ""
#: lib/memex_web/live/note_live/index.html.heex:36
#, elixir-autogen, elixir-format, fuzzy
msgid "edit %{note_slug}"
msgstr ""
#: lib/memex_web/live/pipeline_live/index.html.heex:36
#, elixir-autogen, elixir-format, fuzzy
msgid "edit %{pipeline_slug}"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:105
#, elixir-autogen, elixir-format
msgid "edit %{step_title}"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:33
#, elixir-autogen, elixir-format
msgid "edit invite for %{invite_name}"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:96
#, elixir-autogen, elixir-format
msgid "move %{step_title} down"
msgstr ""
#: lib/memex_web/live/pipeline_live/show.html.heex:81
#, elixir-autogen, elixir-format
msgid "move %{step_title} up"
msgstr ""

View File

@ -66,7 +66,7 @@ msgstr ""
msgid "are you sure you want to change your language?"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:43
#: lib/memex_web/live/invite_live/index.html.heex:44
#, elixir-autogen, elixir-format
msgid "are you sure you want to delete the invite for %{invite_name}?"
msgstr ""
@ -81,7 +81,7 @@ msgstr ""
msgid "are you sure you want to log out?"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:68
#: lib/memex_web/live/invite_live/index.html.heex:69
#, elixir-autogen, elixir-format
msgid "are you sure you want to make %{invite_name} unlimited?"
msgstr ""
@ -152,8 +152,8 @@ msgstr ""
msgid "your account has been deleted"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:101
#: lib/memex_web/live/invite_live/index.html.heex:129
#: lib/memex_web/live/invite_live/index.html.heex:102
#: lib/memex_web/live/invite_live/index.html.heex:130
#, elixir-autogen, elixir-format
msgid "are you sure you want to delete %{email}? this action is permanent!"
msgstr ""

View File

@ -65,7 +65,7 @@ msgstr ""
msgid "are you sure you want to change your language?"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:43
#: lib/memex_web/live/invite_live/index.html.heex:44
#, elixir-autogen, elixir-format
msgid "are you sure you want to delete the invite for %{invite_name}?"
msgstr ""
@ -80,7 +80,7 @@ msgstr ""
msgid "are you sure you want to log out?"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:68
#: lib/memex_web/live/invite_live/index.html.heex:69
#, elixir-autogen, elixir-format
msgid "are you sure you want to make %{invite_name} unlimited?"
msgstr ""
@ -151,8 +151,8 @@ msgstr ""
msgid "your account has been deleted"
msgstr ""
#: lib/memex_web/live/invite_live/index.html.heex:101
#: lib/memex_web/live/invite_live/index.html.heex:129
#: lib/memex_web/live/invite_live/index.html.heex:102
#: lib/memex_web/live/invite_live/index.html.heex:130
#, elixir-autogen, elixir-format
msgid "are you sure you want to delete %{email}? this action is permanent!"
msgstr ""

View File

@ -70,7 +70,7 @@ defmodule MemexWeb.ContextLiveTest do
test "updates context in listing", %{conn: conn, context: context} do
{:ok, index_live, _html} = live(conn, Routes.context_index_path(conn, :index))
assert index_live |> element("[data-qa=\"context-edit-#{context.id}\"]") |> render_click() =~
assert index_live |> element(~s/a[aria-label="edit #{context.slug}"]/) |> render_click() =~
"edit"
assert_patch(index_live, Routes.context_index_path(conn, :edit, context.slug))
@ -92,7 +92,7 @@ defmodule MemexWeb.ContextLiveTest do
test "deletes context in listing", %{conn: conn, context: context} do
{:ok, index_live, _html} = live(conn, Routes.context_index_path(conn, :index))
assert index_live |> element("[data-qa=\"delete-context-#{context.id}\"]") |> render_click()
assert index_live |> element(~s/a[aria-label="delete #{context.slug}"]/) |> render_click()
refute has_element?(index_live, "#context-#{context.id}")
end
end
@ -137,7 +137,7 @@ defmodule MemexWeb.ContextLiveTest do
{:ok, index_live, _html} =
show_live
|> element("[data-qa=\"delete-context-#{context.id}\"]")
|> element(~s/button[aria-label="delete #{context.slug}"]/)
|> render_click()
|> follow_redirect(conn, Routes.context_index_path(conn, :index))
@ -174,7 +174,7 @@ defmodule MemexWeb.ContextLiveTest do
assert html =~ "context"
assert html =~ Routes.note_show_path(Endpoint, :show, note_slug)
assert has_element?(show_live, "[data-qa=\"context-note-#{note_slug}\"]")
assert has_element?(show_live, "a", note_slug)
end
end
end

View File

@ -55,7 +55,9 @@ defmodule MemexWeb.InviteLiveTest do
test "updates invite in listing", %{conn: conn, invite: invite} do
{:ok, index_live, _html} = live(conn, Routes.invite_index_path(conn, :index))
assert index_live |> element("[data-qa=\"edit-#{invite.id}\"]") |> render_click() =~
assert index_live
|> element(~s/a[aria-label="edit invite for #{invite.name}"]/)
|> render_click() =~
gettext("edit invite")
assert_patch(index_live, Routes.invite_index_path(conn, :edit, invite))
@ -81,7 +83,10 @@ defmodule MemexWeb.InviteLiveTest do
test "deletes invite in listing", %{conn: conn, invite: invite} do
{:ok, index_live, _html} = live(conn, Routes.invite_index_path(conn, :index))
assert index_live |> element("[data-qa=\"delete-#{invite.id}\"]") |> render_click()
assert index_live
|> element(~s/a[aria-label="delete invite for #{invite.name}"]/)
|> render_click()
refute has_element?(index_live, "#invite-#{invite.id}")
end
end

View File

@ -75,7 +75,7 @@ defmodule MemexWeb.NoteLiveTest do
test "updates note in listing", %{conn: conn, note: note} do
{:ok, index_live, _html} = live(conn, Routes.note_index_path(conn, :index))
assert index_live |> element("[data-qa=\"note-edit-#{note.id}\"]") |> render_click() =~
assert index_live |> element(~s/a[aria-label="edit #{note.slug}"]/) |> render_click() =~
"edit"
assert_patch(index_live, Routes.note_index_path(conn, :edit, note.slug))
@ -97,7 +97,7 @@ defmodule MemexWeb.NoteLiveTest do
test "deletes note in listing", %{conn: conn, note: note} do
{:ok, index_live, _html} = live(conn, Routes.note_index_path(conn, :index))
assert index_live |> element("[data-qa=\"delete-note-#{note.id}\"]") |> render_click()
assert index_live |> element(~s/a[aria-label="delete #{note.slug}"]/) |> render_click()
refute has_element?(index_live, "#note-#{note.id}")
end
end
@ -138,7 +138,7 @@ defmodule MemexWeb.NoteLiveTest do
{:ok, index_live, _html} =
show_live
|> element("[data-qa=\"delete-note-#{note.id}\"]")
|> element(~s/button[aria-label="delete #{note.slug}"]/)
|> render_click()
|> follow_redirect(conn, Routes.note_index_path(conn, :index))
@ -177,7 +177,7 @@ defmodule MemexWeb.NoteLiveTest do
assert html =~ "context"
assert html =~ Routes.note_show_path(Endpoint, :show, note_slug)
assert has_element?(show_live, "[data-qa=\"note-link-#{note_slug}\"]")
assert has_element?(show_live, "a", note_slug)
end
end
end

View File

@ -81,7 +81,7 @@ defmodule MemexWeb.PipelineLiveTest do
test "updates pipeline in listing", %{conn: conn, pipeline: pipeline} do
{:ok, index_live, _html} = live(conn, Routes.pipeline_index_path(conn, :index))
assert index_live |> element("[data-qa=\"pipeline-edit-#{pipeline.id}\"]") |> render_click() =~
assert index_live |> element(~s/a[aria-label="edit #{pipeline.slug}"]/) |> render_click() =~
"edit"
assert_patch(index_live, Routes.pipeline_index_path(conn, :edit, pipeline.slug))
@ -104,7 +104,7 @@ defmodule MemexWeb.PipelineLiveTest do
{:ok, index_live, _html} = live(conn, Routes.pipeline_index_path(conn, :index))
assert index_live
|> element("[data-qa=\"delete-pipeline-#{pipeline.id}\"]")
|> element(~s/a[aria-label="delete #{pipeline.slug}"]/)
|> render_click()
refute has_element?(index_live, "#pipeline-#{pipeline.id}")
@ -151,7 +151,7 @@ defmodule MemexWeb.PipelineLiveTest do
{:ok, index_live, _html} =
show_live
|> element("[data-qa=\"delete-pipeline-#{pipeline.id}\"]")
|> element(~s/button[aria-label="delete #{pipeline.slug}"]/)
|> render_click()
|> follow_redirect(conn, Routes.pipeline_index_path(conn, :index))
@ -161,9 +161,7 @@ defmodule MemexWeb.PipelineLiveTest do
test "creates a step", %{conn: conn, pipeline: pipeline} do
{:ok, show_live, _html} = live(conn, Routes.pipeline_show_path(conn, :show, pipeline.slug))
show_live
|> element("[data-qa=\"add-step-#{pipeline.id}\"]")
|> render_click()
show_live |> element("a", "add step") |> render_click()
assert_patch(show_live, Routes.pipeline_show_path(conn, :add_step, pipeline.slug))
@ -199,7 +197,7 @@ defmodule MemexWeb.PipelineLiveTest do
{:ok, show_live, _html} = live(conn, Routes.pipeline_show_path(conn, :show, pipeline.slug))
show_live
|> element("[data-qa=\"edit-step-#{step.id}\"]")
|> element(~s/a[aria-label="edit #{step.title}"]/)
|> render_click()
assert_patch(show_live, Routes.pipeline_show_path(conn, :edit_step, pipeline.slug, step.id))
@ -223,7 +221,7 @@ defmodule MemexWeb.PipelineLiveTest do
html =
show_live
|> element("[data-qa=\"delete-step-#{step.id}\"]")
|> element(~s/button[aria-label="delete #{step.title}"]/)
|> render_click()
assert_patch(show_live, Routes.pipeline_show_path(conn, :show, pipeline.slug))
@ -250,25 +248,25 @@ defmodule MemexWeb.PipelineLiveTest do
html =
show_live
|> element("[data-qa=\"move-step-up-#{second_step.id}\"]")
|> element(~s/button[aria-label="move #{second_step.title} up"]/)
|> render_click()
assert html =~ "1. second step"
assert html =~ "2. first step"
assert html =~ "3. third step"
refute has_element?(show_live, "[data-qa=\"move-step-up-#{second_step.id}\"]")
refute has_element?(show_live, ~s/button[aria-label="move #{second_step.title} up"]/)
html =
show_live
|> element("[data-qa=\"move-step-down-#{first_step.id}\"]")
|> element(~s/button[aria-label="move #{first_step.title} down"]/)
|> render_click()
assert html =~ "1. second step"
assert html =~ "2. third step"
assert html =~ "3. first step"
refute has_element?(show_live, "[data-qa=\"move-step-down-#{first_step.id}\"]")
refute has_element?(show_live, ~s/button[aria-label="move #{first_step.title} down"]/)
end
end
end