Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Discussion options

You must be logged in to vote

You are correct. Masked text fields have to be tested differently. I suggest you move the Reset test to the other TF masking tests and look how I did it there (in MaskTests.cs). For instance:

        [Test]
        public async Task MaskTest_MultipleTFsLinkedViaTwoWayBinding()
        {
            var comp = Context.RenderComponent<MaskedTextFieldTwoWayBindingTest>();
            var tfs=comp.FindComponents<MudTextField<string>>().Select(x=>x.Instance).ToArray();
            var masks = comp.FindComponents<MudMask>().Select(x=>x.Instance).ToArray();
            await comp.InvokeAsync(() => masks[0].OnPaste("123456"));
            masks[0].Mask.ToString().Should().Be("123-456|");
        …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lorlik
Comment options

Answer selected by henon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants