Fix failing tests
DDF requires a bit altered tests to click trough the wizard so the tests won't fail
This commit is contained in:
parent
9bf30059f6
commit
a67e014dbe
8 changed files with 151 additions and 102 deletions
|
|
@ -24,6 +24,7 @@ export default {
|
|||
{
|
||||
component: componentTypes.TEXT_FIELD,
|
||||
name: 'aws-account-id',
|
||||
'data-testid': 'aws-account-id',
|
||||
type: 'text',
|
||||
label: 'AWS account ID',
|
||||
isRequired: true,
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ export default {
|
|||
{
|
||||
component: componentTypes.TEXT_FIELD,
|
||||
name: 'google-email',
|
||||
'data-testid': 'input-google-email',
|
||||
type: 'text',
|
||||
label: 'Email address',
|
||||
condition: {
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ export default {
|
|||
{
|
||||
component: componentTypes.TEXT_FIELD,
|
||||
name: 'azure-tenant-id',
|
||||
'data-testid': 'azure-tenant-id',
|
||||
type: 'text',
|
||||
label: 'Tenant ID',
|
||||
isRequired: true,
|
||||
|
|
@ -60,6 +61,7 @@ export default {
|
|||
{
|
||||
component: componentTypes.TEXT_FIELD,
|
||||
name: 'azure-subscription-id',
|
||||
'data-testid': 'azure-subscription-id',
|
||||
type: 'text',
|
||||
label: 'Subscription ID',
|
||||
isRequired: true,
|
||||
|
|
@ -72,6 +74,7 @@ export default {
|
|||
{
|
||||
component: componentTypes.TEXT_FIELD,
|
||||
name: 'azure-resource-group',
|
||||
'data-testid': 'azure-resource-group',
|
||||
type: 'text',
|
||||
label: 'Resource group',
|
||||
isRequired: true,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,14 @@ import componentTypes from '@data-driven-forms/react-form-renderer/component-typ
|
|||
import validatorTypes from '@data-driven-forms/react-form-renderer/validator-types';
|
||||
|
||||
export const registerValues = {
|
||||
'subscribe-now-radio': 'Embed an activation key and register systems on first boot',
|
||||
'register-later-radio-button': 'Register the system later'
|
||||
'subscribe-now-radio': {
|
||||
title: 'Embed an activation key and register systems on first boot',
|
||||
testId: 'register-now-radio-button'
|
||||
},
|
||||
'register-later-radio-button': {
|
||||
title: 'Register the system later',
|
||||
testId: 'register-later-radio-button'
|
||||
}
|
||||
};
|
||||
|
||||
export default (user) => ({
|
||||
|
|
@ -16,15 +22,17 @@ export default (user) => ({
|
|||
label: 'Register the system',
|
||||
name: 'register-system',
|
||||
initialValue: 'register-later-radio-button',
|
||||
options: Object.entries(registerValues).map(([ key, title ]) => ({
|
||||
options: Object.entries(registerValues).map(([ key, { title, testId }]) => ({
|
||||
label: title,
|
||||
value: key
|
||||
value: key,
|
||||
'data-testid': testId,
|
||||
}))
|
||||
},
|
||||
{
|
||||
component: componentTypes.TEXT_FIELD,
|
||||
name: 'subscription-organization',
|
||||
type: 'text',
|
||||
'data-testid': 'organization-id',
|
||||
label: 'Organization ID',
|
||||
initialValue: Number(user?.identity?.internal?.org_id),
|
||||
isDisabled: true,
|
||||
|
|
@ -37,6 +45,8 @@ export default (user) => ({
|
|||
{
|
||||
component: componentTypes.TEXT_FIELD,
|
||||
name: 'subscription-activation',
|
||||
'data-testid': 'subscription-activation',
|
||||
required: true,
|
||||
type: 'password',
|
||||
label: 'Activation key',
|
||||
condition: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue