test/Misc/EFTools/E2ETests/WhiteE2ETests.cs
/// <summary>
///     Chooses the 'Generate from database' option for the wizard and walks thru the wizard
/// </summary>
Chooses the 'Generate from database' option for the wizard and walks thru the wizard
Chooses the ' Generate from database ' option for the wizard and walks thru the wizard
private void CreateModelFromDBNonDefaults(string dbName)
        {
            SelectModelOption(_resourceHelper.GetEntityDesignResourceString("GenerateFromDatabaseOption"));
            ClickNextButton();
            var appconfig = _wizard.Get<TextBox>(SearchCriteria.ByAutomationId("textBoxAppConfigConnectionName"));
            if (appconfig.Text != "SchoolEntities")
            {
                var newConnectionButton =
                    _wizard.Get<Button>(
                        SearchCriteria.ByText(_resourceHelper.GetEntityDesignResourceString("NewDatabaseConnectionBtn")));
                newConnectionButton.Click();
                HandleConnectionDialog(dbName);
                _wizard.WaitTill(WaitTillNewDBSettingsLoaded, new TimeSpan(0, 1, 0));
            }
            ClickNextButton();
            var versionsPanel = _wizard.Get<Panel>(SearchCriteria.ByAutomationId("versionsPanel"));
            var selectionButton =
                versionsPanel.Get<RadioButton>(
                    SearchCriteria.ByText(String.Format(_resourceHelper.GetEntityDesignResourceString("EntityFrameworkVersionName"), "6.x")));
            Assert.IsTrue(selectionButton.IsSelected);
            ClickNextButton();
            _wizard.WaitTill(WaitTillDBTablesLoaded, new TimeSpan(0, 1, 0));
            var pane = _wizard.Get<Panel>(SearchCriteria.ByAutomationId("treeView"));
            CheckAllCheckBoxes(pane);
            ChangeDefaultValues();
            var finishButton = _wizard.Get<Button>(
                SearchCriteria.ByText(_resourceHelper.GetWizardFrameworkResourceString("ButtonFinishText")));
            finishButton.Click();
        }
private void CreateModelFromDBNonDefaults ( string dbName ) { SelectModelOption ( _resourceHelper . GetEntityDesignResourceString ( " " ) ) ; ClickNextButton ( ) ; var appconfig = _wizard . Get < TextBox > ( SearchCriteria . ByAutomationId ( " " ) ) ; if ( appconfig . Text != " " ) { var newConnectionButton = _wizard . Get < Button > ( SearchCriteria . ByText ( _resourceHelper . GetEntityDesignResourceString ( " " ) ) ) ; newConnectionButton . Click ( ) ; HandleConnectionDialog ( dbName ) ; _wizard . WaitTill ( WaitTillNewDBSettingsLoaded , new TimeSpan ( 0 , 1 , 0 ) ) ; } ClickNextButton ( ) ; var versionsPanel = _wizard . Get < Panel > ( SearchCriteria . ByAutomationId ( " " ) ) ; var selectionButton = versionsPanel . Get < RadioButton > ( SearchCriteria . ByText ( String . Format ( _resourceHelper . GetEntityDesignResourceString ( " " ) , " " ) ) ) ; Assert . IsTrue ( selectionButton . IsSelected ) ; ClickNextButton ( ) ; _wizard . WaitTill ( WaitTillDBTablesLoaded , new TimeSpan ( 0 , 1 , 0 ) ) ; var pane = _wizard . Get < Panel > ( SearchCriteria . ByAutomationId ( " " ) ) ; CheckAllCheckBoxes ( pane ) ; ChangeDefaultValues ( ) ; var finishButton = _wizard . Get < Button > ( SearchCriteria . ByText ( _resourceHelper . GetWizardFrameworkResourceString ( " " ) ) ) ; finishButton . Click ( ) ; }
Chooses the 'Generate from database' option for the wizard and walks thru the wizard
Chooses the ' Generate from database ' option for the wizard and walks thru the wizard
// Select the 'Generate from Database' option
dbName
string