<commit_before>// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using OpenQA.Selenium;
using OpenQA.Selenium.Support.UI;
using Xunit;

namespace Microsoft.AspNetCore.Blazor.E2ETest.Infrastructure
{
    // XUnit assertions, but hooked into Selenium's polling mechanism

    public class WaitAssert
    {
        private readonly static TimeSpan DefaultTimeout = TimeSpan.FromSeconds(1);

        public static void Equal<T>(T expected, Func<T> actual)
            => WaitAssertCore(() => Assert.Equal(expected, actual()));

        public static void True(Func<bool> actual)
            => WaitAssertCore(() => Assert.True(actual()));

        public static void True(Func<bool> actual, TimeSpan timeout)
            => WaitAssertCore(() => Assert.True(actual()), timeout);<commit_msg>Increase default WaitAssert timeout to 2 seconds<commit_after>// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using OpenQA.Selenium;
using OpenQA.Selenium.Support.UI;
using Xunit;

namespace Microsoft.AspNetCore.Blazor.E2ETest.Infrastructure
{
    // XUnit assertions, but hooked into Selenium's polling mechanism

    public class WaitAssert
    {
        private readonly static TimeSpan DefaultTimeout = TimeSpan.FromSeconds(2);

        public static void Equal<T>(T expected, Func<T> actual)
            => WaitAssertCore(() => Assert.Equal(expected, actual()));

        public static void True(Func<bool> actual)
            => WaitAssertCore(() => Assert.True(actual()));

        public static void True(Func<bool> actual, TimeSpan timeout)
            => WaitAssertCore(() => Assert.True(actual()), timeout);
{'fraction_non_alphanumeric': 0.10460048426150122, 'fraction_numerical': 0.0043583535108958835, 'mean_word_length': 3.838407494145199, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5528491', 'n_tokens_mistral': 551, 'n_tokens_neox': 528, 'n_words': 173}