<commit_before>﻿using NUnit.Framework;

namespace Atata.Tests
{
    public class BasicControlsTest : AutoTest
    {
        [Test]
        public void BasicControlsInteraction()
        {
            string firstName;

            Go.To<BasicControlsPage>().
                Header.Should.Equal("Basic Controls").

                ByLabel.FirstName.Should.Exist().
                ByLabel.FirstName.Should.BeEnabled().
                ByLabel.FirstName.Should.Not.AtOnce.BeReadOnly().
                ByLabel.FirstName.SetRandom(out firstName).
                ByLabel.FirstName.Should.Equal(firstName).
                ById.FirstName.Should.Equal(firstName).

                ByLabel.LastName.Set("LastName").
                ByLabel.LastName.Should.Equal("LastName").
                ById.LastName.Should.Equal("LastName").

                ById.MiddleName.Set("mdname").
                Do(_ => _.ByLabel.MiddleName, x =>
                    {
                        x.Should.Equal("mdname");
                        x.Set("md2name");
                        x.Should.Not.Equal("mdname");
                    }).
                ById.MiddleName.Should.Equal("md2name").

                ByLabel.ReadonlyField.Should.Exist().
                ByLabel.ReadonlyField.Should.BeEnabled().
                ByLabel.ReadonlyField.Should.BeReadOnly().
                ByLabel.ReadonlyField.Should.Equal("readme").

                ByLabel.DisabledField.Should.Exist().
                ByLabel.DisabledField.Should.Not.BeEnabled().
                ByLabel.DisabledField.Should.Not.BeReadOnly().
                ByLabel.DisabledField.Should.Equal("readme").

                RawButtonControl.Should.Exist().
                RawButtonControl.Should.BeEnabled().
                RawButtonControl.Content.Should.Equal("Raw Button").
                RawButtonControl.Click().
                InputButtonControl.Should.Exist().
                InputButtonControl.Click().
                Do(_ => _.LinkButtonControl, x =>
                    {
                        x.Should.Exist();
                        x.Content.Should.Equal("Link Button");<commit_msg>Update BasicControlsInteraction test<commit_after>﻿using NUnit.Framework;

namespace Atata.Tests
{
    public class BasicControlsTest : AutoTest
    {
        [Test]
        public void BasicControlsInteraction()
        {
            string firstName;

            Go.To<BasicControlsPage>().
                Header.Should.Equal("Basic Controls").

                ByLabel.FirstName.Should.Exist().
                ByLabel.FirstName.Should.BeEnabled().
                ByLabel.FirstName.Should.Not.AtOnce.BeReadOnly().
                ByLabel.FirstName.SetRandom(out firstName).
                ByLabel.FirstName.Should.Equal(firstName).
                ById.FirstName.Should.Equal(firstName).

                ByLabel.LastName.Set("LastName").
                ByLabel.LastName.Should.Equal("LastName").
                ById.LastName.Should.Equal("LastName").

                ById.MiddleName.Set("mdname").
                Do(_ => _.ByLabel.MiddleName, x =>
                    {
                        x.Should.Equal("mdname");
                        x.Set("md2name");
                        x.Should.Not.Equal("mdname");
                    }).
                ById.MiddleName.Should.Equal("md2name").

                ByLabel.ReadonlyField.Should.Exist().
                ByLabel.ReadonlyField.Should.BeEnabled().
                ByLabel.ReadonlyField.Should.BeReadOnly().
                ByLabel.ReadonlyField.IsReadOnly.Should.BeTrue().
                ByLabel.ReadonlyField.Attributes.ReadOnly.Should.BeTrue().
                ByLabel.ReadonlyField.Should.Equal("readme").

                ByLabel.DisabledField.Should.Exist().
                ByLabel.DisabledField.Should.Not.BeEnabled().
                ByLabel.DisabledField.IsEnabled.Should.Not.BeTrue().
                ByLabel.DisabledField.Attributes.Disabled.Should.BeTrue().
                ByLabel.DisabledField.Should.Not.BeReadOnly().
                ByLabel.DisabledField.Should.Equal("readme").

                RawButtonControl.Should.Exist().
                RawButtonControl.Should.BeEnabled().
                RawButtonControl.Content.Should.Equal("Raw Button").
                RawButtonControl.Click().
                InputButtonControl.Should.Exist().
                InputButtonControl.Click().
                Do(_ => _.LinkButtonControl, x =>
                    {
                        x.Should.Exist();
                        x.Content.Should.Equal("Link Button");
{'fraction_non_alphanumeric': 0.11234245980008692, 'fraction_numerical': 0.000869187309865276, 'mean_word_length': 1.498914223669924, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '4497475', 'n_tokens_mistral': 1202, 'n_tokens_neox': 1103, 'n_words': 117}