Icu 17232 improve host source resource fetching (#2877)

* refactor: 💡 add fallback value for address column

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17232

* fix: 🐛 make host address optional in search for plugin hosts

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17232

* feat: 🎸 remove pageSize reset for user preference

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17232

* test: 💍 update e2e tests for host sources

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17232

* feat: 🎸 improve host source resource fetching

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17232

* refactor: 💡 remove em dash translation

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17232

* refactor: 💡 add comment to target route for duplicate hosts

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17232

* refactor: 💡 add filter to query for hosts

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17232

* refactor: 💡 use Promise.all() when fetching hosts

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17232
This commit is contained in:
Cameron Perera authored and GitHub committed 2025-06-12 17:19:56 -05:00
1 parent 899d7beee0
commit 3d1ee732b4
6 files changed
+54 -27

No files matched your search

+20 -8
View File
@@ -63,11 +63,14 @@ test.describe('Search and Pagination', () => {
// Check pagination
await expect(
authedPage.getByRole('cell', { name: hosts[0].name, exact: true }),
authedPage.getByRole('cell', {
name: hosts[hosts.length - 1].name,
exact: true,
}),
).toBeVisible();
await expect(
authedPage.getByRole('cell', {
name: hosts[hosts.length - 1].name,
name: hosts[0].name,
exact: true,
}),
).toBeHidden();
@@ -78,11 +81,14 @@ test.describe('Search and Pagination', () => {
.getByRole('link', { name: 'page 2' })
.click();
await expect(
authedPage.getByRole('cell', { name: hosts[0].name, exact: true }),
authedPage.getByRole('cell', {
name: hosts[hosts.length - 1].name,
exact: true,
}),
).toBeHidden();
await expect(
authedPage.getByRole('cell', {
name: hosts[hosts.length - 1].name,
name: hosts[0].name,
exact: true,
}),
).toBeVisible();
@@ -93,11 +99,14 @@ test.describe('Search and Pagination', () => {
.getByRole('link', { name: 'Previous page' })
.click();
await expect(
authedPage.getByRole('cell', { name: hosts[0].name, exact: true }),
authedPage.getByRole('cell', {
name: hosts[hosts.length - 1].name,
exact: true,
}),
).toBeVisible();
await expect(
authedPage.getByRole('cell', {
name: hosts[hosts.length - 1].name,
name: hosts[0].name,
exact: true,
}),
).toBeHidden();
@@ -108,11 +117,14 @@ test.describe('Search and Pagination', () => {
.getByRole('link', { name: 'Next page' })
.click();
await expect(
authedPage.getByRole('cell', { name: hosts[0].name, exact: true }),
authedPage.getByRole('cell', {
name: hosts[hosts.length - 1].name,
exact: true,
}),
).toBeHidden();
await expect(
authedPage.getByRole('cell', {
name: hosts[hosts.length - 1].name,
name: hosts[0].name,
exact: true,
}),
).toBeVisible();