Add test hooks to overview page
- Adds data-test-id test hooks to simplify the xpath queries needed
to set up automation testing
- Adds standardized test hooks to all interactive buttons
- Adds link to SOL console and network settings pages
Signed-off-by: Dixsie Wolmers <dixsie@ibm.com>
Change-Id: I4cb0f4c93cf14377af1fe6d18aa591678c739b45
diff --git a/src/views/Overview/OverviewEvents.vue b/src/views/Overview/OverviewEvents.vue
index 5a95048..2c39cc3 100644
--- a/src/views/Overview/OverviewEvents.vue
+++ b/src/views/Overview/OverviewEvents.vue
@@ -4,7 +4,12 @@
{{ $t('pageOverview.events.noHighEventsMsg') }}
</div>
<div v-else>
- <b-button variant="link" to="/health/event-logs" class="float-right">
+ <b-button
+ variant="link"
+ to="/health/event-logs"
+ data-test-id="overviewEvents-button-eventLogs"
+ class="float-right"
+ >
{{ $t('pageOverview.events.viewAllButton') }}
</b-button>
<b-table
diff --git a/src/views/Overview/OverviewQuickLinks.vue b/src/views/Overview/OverviewQuickLinks.vue
index 09e5a00..b964795 100644
--- a/src/views/Overview/OverviewQuickLinks.vue
+++ b/src/views/Overview/OverviewQuickLinks.vue
@@ -16,6 +16,7 @@
<dd>
<b-form-checkbox
v-model="serverLedChecked"
+ data-test-id="overviewQuickLinks-checkbox-serverLed"
name="check-button"
switch
>
@@ -26,10 +27,10 @@
</dl>
</div>
<div>
- <!-- TODO: link to network settings -->
<b-button
- href="#"
+ to="/configuration/network-settings"
variant="secondary"
+ data-test-id="overviewQuickLinks-button-networkSettings"
class="d-flex justify-content-between align-items-center"
>
<span>{{ $t('pageOverview.quicklinks.editNetworkSettings') }}</span>
@@ -37,10 +38,10 @@
</b-button>
</div>
<div>
- <!-- TODO: link to SOL -->
<b-button
- href="#"
+ to="/control/serial-over-lan"
variant="secondary"
+ data-test-id="overviewQuickLinks-button-solConsole"
class="d-flex justify-content-between align-items-center"
>
<span>{{ $t('pageOverview.quicklinks.solConsole') }}</span>