Esempio n. 1
0
    public async Task TestAboutDialog()
    {
        var app    = AvaloniaApp.GetApp();
        var window = AvaloniaApp.GetMainWindow();

        await FocusFilePanelStep.FocusFilePanelAsync(window);

        OpenAboutDialogStep.OpenAboutDialog(window);
        await DialogOpenedCondition.CheckIfDialogIsOpenedAsync <AboutDialog>(app);

        _dialog = app
                  .Windows
                  .OfType <AboutDialog>()
                  .Single();

        var githubButton = _dialog.GetVisualDescendants().OfType <Button>().SingleOrDefault();

        Assert.NotNull(githubButton);
        Assert.True(githubButton.IsDefault);
        Assert.True(githubButton.IsEnabled);
    }