public void LoadingButton_should_rendered_correctly_loading_state()         //Incomplete test for technical reasons...
        {
            IRenderedComponent <LoadingButton> rendered = null;

            rendered = _testContext.RenderComponent <LoadingButton>(parameters => parameters
                                                                    .Add(p => p.Type, ButtonTypes.Submit)
                                                                    .Add(p => p.Content, (RenderFragment)(builder =>
            {
                builder.AddMarkupContent(1, "hello...");
            }))
                                                                    .Add(p => p.LoadingContent, (RenderFragment)(builder =>
            {
                builder.AddMarkupContent(1, "loading...");
            }))
                                                                    .Add(p => p.OnClicked, async args => { await CheckClick(); }));

            var button = rendered.Find("button");

            button.Click();

            Assert.IsNotNull(button);

            async Task CheckClick()
            {
                await Task.Delay(200);

                rendered.WaitForAssertion(() =>
                                          rendered.MarkupMatches("<button blazor:onclick=\"1\" type=\"submit\" disabled=\"\">loading...</button>"),
                                          timeout: TimeSpan.FromSeconds(1));
            }
        }
        public void LoadingElement_should_rendered_correctly_loading_state()
        {
            IRenderedComponent <LoadingElement> rendered = null;

            rendered = _testContext.RenderComponent <LoadingElement>(parameters => parameters
                                                                     .Add(p => p.IsLoading, false)
                                                                     .Add(p => p.Content, (RenderFragment)(builder =>
            {
                builder.AddMarkupContent(1, "<div>Content</div>");
            }))
                                                                     .Add(p => p.LoadingContent, (RenderFragment)(builder =>
            {
                builder.AddMarkupContent(1, "loading...");
            }))
                                                                     .Add(p => p.OnLoading, async args => { await CheckLoading(); }));

            rendered.SetParametersAndRender(parameters => parameters
                                            .Add(p => p.IsLoading, true));

            var div = rendered.Find("div");

            Assert.IsNotNull(div);

            async Task CheckLoading()
            {
                await Task.Delay(200);

                rendered.WaitForAssertion(() =>
                                          rendered.MarkupMatches(@"<div class=""loading"" style=""background-color: rgba(128, 128, 128, 0.9)""><div class=""loading-content"">loading...</div><div>Content</div></div>"),
                                          timeout: TimeSpan.FromSeconds(1));
            }
        }