public TodoTests(BaseTestContext context) : base(context) { base.Browser.Configuration.BusyConditions.Clear(); base.Browser.Configuration.BusyConditions.Add(new AngularPendingRequestsBusyCondition("#todoAngularApp")); base.Browser.Configuration.BusyConditions.Add(new ElementIsVisibileBusyCondition(".panel-warning")); base.Browser.Navigate(PageUrls.ToDoPage); this.todoPage = new TodoPage(base.Browser); }
async Task Name(ButtonRow button) { if (!await TodoPage.CheckSecretKey(TodoList, _submitAccount.SubmitAccount, this)) { return; } var name = _nameEntry.Edit.Text; if (!string.IsNullOrEmpty(name) && !(name == TodoList.Name) && await ConfirmAsync("ConfirmName")) { IsBusy = true; UIApp.Run(() => TodoApp.Current.UpdateListName(_submitAccount.SubmitAccount, TodoList, name)); } }
public TodoListItem(Management.TODO todo, TodoPage page) { this.todo = todo; this.todoPage = page; BrushConverter bc = new BrushConverter(); blue = (Brush)bc.ConvertFrom("#FF2196F3"); blue.Freeze(); // ListItem property Background = Brushes.White; Effect = new DropShadowEffect { Opacity = 0.1 }; // Button Button button = new Button { Padding = new Thickness(9), Background = blue, BorderBrush = blue, Foreground = Brushes.White }; // Button checkmark icon. PackIcon checkIcon = new PackIcon(); checkIcon.Kind = PackIconKind.Check; button.Content = checkIcon; // Button click event button.Click += clickCheckmark; // Textblock TextBlock todoTitleBox = new TextBlock { Text = todo.GetTitle(), Margin = new Thickness(30, 0, 0, 0), VerticalAlignment = VerticalAlignment.Center }; // Grid ColumnDefinition c1 = new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) }; ColumnDefinition c2 = new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) }; Grid gridContainer = new Grid(); gridContainer.ColumnDefinitions.Add(c1); gridContainer.ColumnDefinitions.Add(c2); gridContainer.Children.Add(todoTitleBox); gridContainer.Children.Add(button); Grid.SetColumn(button, 0); Grid.SetColumn(todoTitleBox, 1); AddChild(gridContainer); }
public void BeforeEachTest() { _app = AppInitializer.StartApp(_platform); _page = new TodoPage(); }
public TestClass(Platform platform) { this.platform = platform; page = new TodoPage(); }
public TodoPageSteps() { _page = new TodoPage(); _app = FeatureContext.Current.Get <IApp>("App"); }