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 CreateModelFromDB(String dbName, Boolean codeFirst)
        {
            SelectModelOption(
                codeFirst
                    ? _resourceHelper.GetEntityDesignResourceString("CodeFirstFromDatabaseOption")
                    : _resourceHelper.GetEntityDesignResourceString("GenerateFromDatabaseOption"));
            ClickNextButton();
            var newConnectionButton =
                _wizard.Get<Button>(
                    SearchCriteria.ByText(_resourceHelper.GetEntityDesignResourceString("NewDatabaseConnectionBtn")));
            newConnectionButton.Click();
            HandleConnectionDialog(dbName);
            _wizard.WaitTill(WaitTillNewDBSettingsLoaded);
            ClickNextButton();
            if (!codeFirst)
            {
                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();
            }
            var pane = _wizard.Get<Panel>(SearchCriteria.ByAutomationId("treeView"));
            _wizard.WaitTill(WaitTillDBTablesLoaded, new TimeSpan(0, 1, 0));
            CheckAllCheckBoxes(pane);
            var finishButton = _wizard.Get<Button>(
                SearchCriteria.ByText(_resourceHelper.GetWizardFrameworkResourceString("ButtonFinishText")));
            finishButton.Click();
        }
private void CreateModelFromDB ( String dbName , Boolean codeFirst ) { SelectModelOption ( codeFirst ? _resourceHelper . GetEntityDesignResourceString ( " " ) : _resourceHelper . GetEntityDesignResourceString ( " " ) ) ; ClickNextButton ( ) ; var newConnectionButton = _wizard . Get < Button > ( SearchCriteria . ByText ( _resourceHelper . GetEntityDesignResourceString ( " " ) ) ) ; newConnectionButton . Click ( ) ; HandleConnectionDialog ( dbName ) ; _wizard . WaitTill ( WaitTillNewDBSettingsLoaded ) ; ClickNextButton ( ) ; if ( ! codeFirst ) { var versionsPanel = _wizard . Get < Panel > ( SearchCriteria . ByAutomationId ( " " ) ) ; var selectionButton = versionsPanel . Get < RadioButton > ( SearchCriteria . ByText ( String . Format ( _resourceHelper . GetEntityDesignResourceString ( " " ) , " " ) ) ) ; Assert . IsTrue ( selectionButton . IsSelected ) ; ClickNextButton ( ) ; } var pane = _wizard . Get < Panel > ( SearchCriteria . ByAutomationId ( " " ) ) ; _wizard . WaitTill ( WaitTillDBTablesLoaded , new TimeSpan ( 0 , 1 , 0 ) ) ; CheckAllCheckBoxes ( pane ) ; 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
dbName
String
codeFirst
Boolean