Add cypress ids for integration gateway
This commit is contained in:
parent
e5631d0f9f
commit
d4c6bae09a
@ -20,6 +20,7 @@
|
||||
/>
|
||||
<b-form-checkbox
|
||||
v-model="filter.enabled"
|
||||
data-test-id="checkbox-filter-enable"
|
||||
@change="onUpdate"
|
||||
>
|
||||
{{ $t('filters.enabled') }}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<b-dropdown
|
||||
data-test-id="dropdown-add-filter"
|
||||
:text="$t('filters.addFilter')"
|
||||
class="min-content"
|
||||
variant="primary"
|
||||
@ -8,6 +9,7 @@
|
||||
<b-dropdown-item
|
||||
v-for="(filter, index) in filterList"
|
||||
:key="index"
|
||||
:data-test-id="filterDropdownCypressId(filter.label)"
|
||||
:disabled="filter.disabled"
|
||||
href="#"
|
||||
@click="onAddFilter(filter)"
|
||||
@ -20,7 +22,10 @@
|
||||
disabled
|
||||
href="#"
|
||||
>
|
||||
<span class="text-danger">
|
||||
<span
|
||||
data-test-id="filter-list-empty"
|
||||
class="text-danger"
|
||||
>
|
||||
{{ $t('filters.filterListEmpty') }}
|
||||
</span>
|
||||
</b-dropdown-item>
|
||||
@ -59,6 +64,10 @@ export default {
|
||||
|
||||
this.$emit('addFilter', add)
|
||||
},
|
||||
|
||||
filterDropdownCypressId (filter) {
|
||||
return filter.toLowerCase().split(' ').join('-')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<b-card
|
||||
data-test-id="card-filter-list"
|
||||
class="apigw shadow-sm mt-3"
|
||||
header-bg-variant="white"
|
||||
footer-bg-variant="white"
|
||||
@ -15,6 +16,7 @@
|
||||
@submit.prevent="$emit('submit', route)"
|
||||
>
|
||||
<b-tabs
|
||||
data-test-id="filter-steps"
|
||||
active-nav-item-class="active-tab bg-white"
|
||||
class="border-0 font-weight-bold"
|
||||
content-class="border-bottom"
|
||||
|
||||
@ -44,6 +44,7 @@
|
||||
</b-table-simple>
|
||||
<h6
|
||||
v-if="!sortableFilters.length"
|
||||
data-test-id="no-filters"
|
||||
class="d-flex justify-content-center align-items-center mb-3"
|
||||
>
|
||||
{{ $t('filters.list.noFilters') }}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<b-card
|
||||
class="shadow-sm"
|
||||
data-test-id="card-route-edit"
|
||||
header-bg-variant="white"
|
||||
footer-bg-variant="white"
|
||||
>
|
||||
@ -14,6 +15,7 @@
|
||||
>
|
||||
<b-form-input
|
||||
v-model="route.routeID"
|
||||
data-test-id="input-route-id"
|
||||
plaintext
|
||||
disabled
|
||||
/>
|
||||
@ -48,6 +50,7 @@
|
||||
<b-form-input
|
||||
id="endpoint"
|
||||
v-model="route.endpoint"
|
||||
data-test-id="input-endpoint"
|
||||
:state="isValidEndpoint"
|
||||
required
|
||||
/>
|
||||
@ -59,6 +62,7 @@
|
||||
>
|
||||
<b-form-select
|
||||
v-model="route.method"
|
||||
data-test-id="select-method"
|
||||
:options="methods"
|
||||
required
|
||||
/>
|
||||
@ -70,6 +74,7 @@
|
||||
>
|
||||
<b-form-checkbox
|
||||
v-model="route.enabled"
|
||||
data-test-id="checkbox-enabled"
|
||||
>
|
||||
{{ $t('enabled') }}
|
||||
</b-form-checkbox>
|
||||
@ -82,6 +87,7 @@
|
||||
>
|
||||
<b-form-input
|
||||
:value="route.updatedAt | locFullDateTime"
|
||||
data-test-id="input-updated-at"
|
||||
plaintext
|
||||
disabled
|
||||
/>
|
||||
@ -94,6 +100,7 @@
|
||||
>
|
||||
<b-form-input
|
||||
:value="route.deletedAt | locFullDateTime"
|
||||
data-test-id="input-delete-at"
|
||||
plaintext
|
||||
disabled
|
||||
/>
|
||||
@ -101,6 +108,7 @@
|
||||
|
||||
<b-form-group
|
||||
v-if="route.createdAt"
|
||||
data-test-id="input-create-at"
|
||||
:label="$t('createdAt')"
|
||||
label-cols="2"
|
||||
class="mb-0"
|
||||
@ -130,6 +138,7 @@
|
||||
|
||||
<confirmation-toggle
|
||||
v-if="route && route.routeID && route.canDeleteApigwRoute"
|
||||
:data-test-id="deletedButtonStatusCypressId"
|
||||
@confirmed="$emit('delete')"
|
||||
>
|
||||
{{ getDeleteStatus }}
|
||||
@ -223,6 +232,10 @@ export default {
|
||||
}
|
||||
return ''
|
||||
},
|
||||
|
||||
deletedButtonStatusCypressId () {
|
||||
return `button-${this.getDeleteStatus.toLowerCase()}`
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-card
|
||||
data-test-id="card-general-info"
|
||||
class="shadow-sm"
|
||||
header-bg-variant="white"
|
||||
footer-bg-variant="white"
|
||||
@ -28,6 +29,7 @@
|
||||
>
|
||||
<b-form-input
|
||||
v-model="request.route"
|
||||
data-test-id="input-route"
|
||||
plaintext
|
||||
disabled
|
||||
/>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<b-card
|
||||
data-test-id="card-requests"
|
||||
no-body
|
||||
class="shadow-sm mb-3"
|
||||
footer-class="d-flex align-items-center justify-content-center"
|
||||
@ -20,6 +21,7 @@
|
||||
{{ autoRefreshLabel }}
|
||||
</span>
|
||||
<b-button
|
||||
data-test-id="button-refresh"
|
||||
variant="primary"
|
||||
:disabled="loading"
|
||||
class="ml-2"
|
||||
@ -63,6 +65,7 @@
|
||||
</template>
|
||||
<template #cell(actions)="row">
|
||||
<b-button
|
||||
data-test-id="button-edit-route"
|
||||
size="sm"
|
||||
variant="link"
|
||||
class="p-0"
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
<span class="text-nowrap">
|
||||
<b-button
|
||||
v-if="routeID && canCreate"
|
||||
data-test-id="button-add"
|
||||
variant="primary"
|
||||
:to="{ name: 'system.apigw.new' }"
|
||||
>
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
>
|
||||
<b-button
|
||||
v-if="canCreate"
|
||||
data-test-id="button-add"
|
||||
variant="primary"
|
||||
:to="{ name: 'system.apigw.new' }"
|
||||
>
|
||||
@ -17,6 +18,7 @@
|
||||
</b-button>
|
||||
<b-button
|
||||
v-if="$Settings.get('apigw.profilerEnabled', false)"
|
||||
data-test-id="button-profiler"
|
||||
class="ml-2"
|
||||
variant="info"
|
||||
:to="{ name: 'system.apigw.profiler' }"
|
||||
@ -25,6 +27,7 @@
|
||||
</b-button>
|
||||
<c-permissions-button
|
||||
v-if="canGrant"
|
||||
data-test-id="button-permissions"
|
||||
resource="corteza::system:apigw-route/*"
|
||||
button-variant="light"
|
||||
class="ml-2"
|
||||
@ -68,6 +71,7 @@
|
||||
<template #header>
|
||||
<c-resource-list-status-filter
|
||||
v-model="filter.deleted"
|
||||
data-test-id="filter-deleted-routes"
|
||||
:label="$t('filterForm.deleted.label')"
|
||||
:excluded-label="$t('filterForm.excluded.label')"
|
||||
:inclusive-label="$t('filterForm.inclusive.label')"
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<b-container
|
||||
data-tets-id="profiler"
|
||||
class="py-3"
|
||||
>
|
||||
<c-content-header
|
||||
@ -8,6 +9,7 @@
|
||||
|
||||
<b-card
|
||||
no-body
|
||||
data-test-id="card-profiler"
|
||||
class="shadow-sm"
|
||||
footer-class="d-flex align-items-center justify-content-center"
|
||||
footer-bg-variant="white"
|
||||
@ -30,6 +32,7 @@
|
||||
</span>
|
||||
<b-button
|
||||
variant="primary"
|
||||
data-test-id="button-refresh"
|
||||
:disabled="loading"
|
||||
class="ml-2"
|
||||
@click="loadItems()"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user