Skip to content

Commit

Permalink
fix translations in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHuynh333 committed Dec 4, 2024
1 parent 57b4e5e commit 7a332a0
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 17 deletions.
4 changes: 2 additions & 2 deletions app/views/groups/bots/personal_access_tokens/_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
empty: {
title:
t(
"projects.bots.index.personal_access_tokens_listing_modal.personal_access_token.empty.title",
"groups.bots.index.personal_access_tokens_listing_modal.personal_access_token.empty.title",
),
description:
t(
"projects.bots.index.personal_access_tokens_listing_modal.personal_access_token.empty.description",
"groups.bots.index.personal_access_tokens_listing_modal.personal_access_token.empty.description",
bot_name: @bot_account.user.email,
),
},
Expand Down
4 changes: 4 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,10 @@ en:
token_name: Token Name
personal_access_tokens_listing_modal:
description: Viewing a list of active personal access tokens for %{bot_account}
personal_access_token:
empty:
description: Bot %{bot_name} has no active personal access tokens.
title: No personal access tokens
title: Personal access tokens
subtitle: Setup bot accounts to be able to perform actions through the API that cannot be attributed to an individual user.
title: Bot Accounts
Expand Down
4 changes: 4 additions & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,10 @@ fr:
token_name: Token Name
personal_access_tokens_listing_modal:
description: Viewing a list of active personal access tokens for %{bot_account}
personal_access_token:
empty:
description: Bot %{bot_name} has no active personal access tokens.
title: No personal access tokens
title: Personal access tokens
subtitle: Setup bot accounts to be able to perform actions through the API that cannot be attributed to an individual user.
title: Bot Accounts
Expand Down
14 changes: 7 additions & 7 deletions test/system/groups/bots_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def setup
assert_no_selector 'a', text: I18n.t(:'components.pagination.previous')

within('div.empty_state_message') do
assert_text I18n.t(:'groups.bots.index.bot_listing.empty_state.title')
assert_text I18n.t(:'groups.bots.index.bot_listing.empty_state.description')
assert_text I18n.t(:'bots.index.table.empty_state.title')
assert_text I18n.t(:'bots.index.table.empty_state.description')
end
end

Expand All @@ -62,8 +62,8 @@ def setup
assert_selector 'tr', count: 0

within('div.empty_state_message') do
assert_text I18n.t(:'groups.bots.index.bot_listing.empty_state.title')
assert_text I18n.t(:'groups.bots.index.bot_listing.empty_state.description')
assert_text I18n.t(:'bots.index.table.empty_state.title')
assert_text I18n.t(:'bots.index.table.empty_state.description')
end

click_link I18n.t(:'groups.bots.index.add_new_bot')
Expand Down Expand Up @@ -105,8 +105,8 @@ def setup
assert_selector 'tr', count: 0

within('div.empty_state_message') do
assert_text I18n.t(:'groups.bots.index.bot_listing.empty_state.title')
assert_text I18n.t(:'groups.bots.index.bot_listing.empty_state.description')
assert_text I18n.t(:'bots.index.table.empty_state.title')
assert_text I18n.t(:'bots.index.table.empty_state.description')
end

click_link I18n.t(:'groups.bots.index.add_new_bot')
Expand Down Expand Up @@ -136,7 +136,7 @@ def setup

within('table') do
within('table tbody tr:first-child td:last-child') do
click_link I18n.t(:'groups.bots.index.bot.remove')
click_link I18n.t(:'bots.index.table.actions.remove')
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/system/profile_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def setup
assert_text token_to_revoke.name
end
within %(tr[id=#{token_to_revoke.id}]) do
click_link I18n.t(:'profiles.personal_access_tokens.table.revoke_button')
click_link I18n.t(:'personal_access_tokens.table.revoke')
end

within('#turbo-confirm[open]') do
Expand Down
14 changes: 7 additions & 7 deletions test/system/projects/bots_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def setup
assert_no_selector 'a', text: I18n.t(:'components.pagination.previous')

within('div.empty_state_message') do
assert_text I18n.t(:'projects.bots.index.bot_listing.empty_state.title')
assert_text I18n.t(:'projects.bots.index.bot_listing.empty_state.description')
assert_text I18n.t(:'bots.index.table.empty_state.title')
assert_text I18n.t(:'bots.index.table.empty_state.description')
end
end

Expand All @@ -64,8 +64,8 @@ def setup
assert_selector 'tr', count: 0

within('div.empty_state_message') do
assert_text I18n.t(:'projects.bots.index.bot_listing.empty_state.title')
assert_text I18n.t(:'projects.bots.index.bot_listing.empty_state.description')
assert_text I18n.t(:'bots.index.table.empty_state.title')
assert_text I18n.t(:'bots.index.table.empty_state.description')
end

click_link I18n.t(:'projects.bots.index.add_new_bot')
Expand Down Expand Up @@ -107,8 +107,8 @@ def setup
assert_selector 'tr', count: 0

within('div.empty_state_message') do
assert_text I18n.t(:'projects.bots.index.bot_listing.empty_state.title')
assert_text I18n.t(:'projects.bots.index.bot_listing.empty_state.description')
assert_text I18n.t(:'bots.index.table.empty_state.title')
assert_text I18n.t(:'bots.index.table.empty_state.description')
end

click_link I18n.t(:'projects.bots.index.add_new_bot')
Expand Down Expand Up @@ -138,7 +138,7 @@ def setup

within('table') do
within('table tbody tr:first-child td:last-child') do
click_link I18n.t(:'projects.bots.index.bot.remove')
click_link I18n.t(:'bots.index.table.actions.remove')
end
end

Expand Down

0 comments on commit 7a332a0

Please sign in to comment.