diff --git a/client/Pages/EventTypeCreate/Models.elm b/client/Pages/EventTypeCreate/Models.elm index db80578..cae3ca3 100644 --- a/client/Pages/EventTypeCreate/Models.elm +++ b/client/Pages/EventTypeCreate/Models.elm @@ -1,4 +1,4 @@ -module Pages.EventTypeCreate.Models exposing (Field(..), Model, Operation(..), defaultApplication, defaultRetentionDays, defaultSchema, defaultSql, defaultValues, initialModel, loadValues) +module Pages.EventTypeCreate.Models exposing (Field(..), Model, Operation(..), defaultRetentionDays, defaultSchema, defaultSql, defaultValues, initialModel, loadValues) import Config exposing (appPreffix) import Constants exposing (emptyString) @@ -86,15 +86,10 @@ defaultRetentionDays = 1 -defaultApplication : String -defaultApplication = - appPreffix ++ "nakadi-ui-elm" - - defaultValues : ValuesDict defaultValues = [ ( FieldName, emptyString ) - , ( FieldOwningApplication, defaultApplication ) + , ( FieldOwningApplication, "" ) , ( FieldCategory, categories.business ) , ( FieldPartitionStrategy, partitionStrategies.random ) , ( FieldPartitionsNumber, "1" ) diff --git a/client/Pages/SubscriptionCreate/Models.elm b/client/Pages/SubscriptionCreate/Models.elm index a947ef1..b0b05bd 100644 --- a/client/Pages/SubscriptionCreate/Models.elm +++ b/client/Pages/SubscriptionCreate/Models.elm @@ -1,4 +1,4 @@ -module Pages.SubscriptionCreate.Models exposing (Field(..), Model, Operation(..), allReadFrom, cloneValues, copyValues, defaultApplication, defaultValues, initialModel, readFrom) +module Pages.SubscriptionCreate.Models exposing (Field(..), Model, Operation(..), allReadFrom, cloneValues, copyValues, defaultValues, initialModel, readFrom) import Config exposing (appPreffix) import Constants exposing (emptyString) @@ -76,15 +76,10 @@ allReadFrom = ] -defaultApplication : String -defaultApplication = - appPreffix ++ "nakadi-ui-elm" - - defaultValues : ValuesDict defaultValues = [ ( FieldConsumerGroup, emptyString ) - , ( FieldOwningApplication, defaultApplication ) + , ( FieldOwningApplication, emptyString ) , ( FieldReadFrom, readFrom.end ) , ( FieldEventTypes, emptyString ) ] diff --git a/tests/end2end/createEtForm.spec.js b/tests/end2end/createEtForm.spec.js index f0eae12..fcc0333 100644 --- a/tests/end2end/createEtForm.spec.js +++ b/tests/end2end/createEtForm.spec.js @@ -23,7 +23,11 @@ describe('Create Event type form', function() { }) .selectByValue("#eventTypeCreateFormFieldAudience", 'component-internal') .isEnabled('button=Create Event Type').then(function(enabled) { - expect(enabled).toBeTruthy('Submit btn should be enabled if name is set') + expect(enabled).toBeFalsy('Submit btn should be disabled if owning application is not set') + }) + .setValue('#eventTypeCreateFormFieldOwningApplication', 'stups_nakadi-ui-elm') + .isEnabled('button=Create Event Type').then(function(enabled) { + expect(enabled).toBeTruthy('Submit btn should be enabled if name and owning app are set') }) .click('button=Create Event Type') .waitForVisible(`span*=${eventTypeName}`, 10000) diff --git a/tests/end2end/createSubscriptionForm.spec.js b/tests/end2end/createSubscriptionForm.spec.js index eec6e76..0d1df08 100644 --- a/tests/end2end/createSubscriptionForm.spec.js +++ b/tests/end2end/createSubscriptionForm.spec.js @@ -21,6 +21,7 @@ describe('Create Subscription form', function() { }) .setValue('#subscriptionCreateFormFieldConsumerGroup', 'test-group') .setValue('#subscriptionCreateFormFieldEventTypes', eventTypeName) + .setValue('#subscriptionCreateFormFieldOwningApplication', 'stups_nakadi-ui-elm') .isEnabled('button=Create Subscription').then(function(enabled) { expect(enabled).toBeTruthy('Submit btn should be enabled if name is set') })