public void WhenICheckTheCompanyNameMatchesWithLabelerCodeTable()
        {
            var page    = new Pages.VendOrHold(Setup.TestSetup.Driver);
            var labeler = page.GetLabelerName();

            labeler.ShouldBe(Setup.TestSetup.UiisContext.LabelerCode.FirmName);
        }
        public void WhenIClickOnXPREFIXButton(string buttonType)
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            if (buttonType == "UPC")
            {
                page.ClickUpcPrefix();
            }
            else if (buttonType == "EAN")
            {
                page.ClickEanPrefix();
            }
            else if (buttonType == "ALLIANCE")
            {
                page.ClickAlliancePrefix();
            }
            else if (buttonType == "STANDARD UPC")
            {
                page.ClickStandardUpcPrefix();
            }
            else if (buttonType == "SPECIFIC")
            {
                page.ClickSpecificPrefix();
            }
            else if (buttonType == "NDC")
            {
                page.ClickNdcPrefix();
            }
            else
            {
                throw new ArgumentException($"invalid button type: {buttonType}");
            }
        }
        public void WhenIEnterTheLabelerCode()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);
            var lc   = Setup.TestSetup.UiisContext.LabelerCode.Code;

            page.EnterLabelerCode(lc);
        }
        public void WhenISelectCapacityRadioButton(int capacity)
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.SelectCapacity(capacity);
            Setup.TestSetup.UiisContext.SelectedCapacity = capacity;
        }
        public void WhenIEnterAShortAccountNumber()
        {
            var page          = new Pages.VendOrHold(Setup.TestSetup.Driver);
            var accountNumber = "1234";

            Console.WriteLine($"Account Number: {accountNumber}");
            page.EnterAccountNumber(accountNumber);
        }
        public void WhenIInputAccountNumber()
        {
            var page          = new Pages.VendOrHold(Setup.TestSetup.Driver);
            var accountNumber = Setup.TestSetup.UiisContext.TestAccount.ID;

            Console.WriteLine($"Account Number: {accountNumber}");
            page.EnterAccountNumber(accountNumber);
        }
        public void WhenIVerifyPrefixAvailable()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.WaitPrefixAvailableLabel();
        }
        public void WhenIInputSelectedPrefix()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.EnterSpeficPrefix(Setup.TestSetup.UiisContext.PrefixToVendOrHold);
        }
        public void WhenISelectVendAnIdentifierButton()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.ClickVendAnIdentifier();
        }
        public void ThenIObserveThatValidateButtonIsDisable()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.IsValidateButtonDisabled().ShouldBeTrue();
        }
        public void WhenIEnterReasonForHoldingThePrefix()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.EnterReasonForHolding("held by automated test");
        }
        public void WhenIClickOnTheNEXTButton()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.ClickNext();
        }
        public void WhenIClickOnTheNEXTAVAILABLEButton()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.ClickNextAvailable();
        }
        public void WhenIClickOnValidateButton()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.ClickValidate();
        }
        public void WhenIEnterInvalidLabelerCode(string labelerCode)
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.EnterLabelerCode(labelerCode);
        }
        public void WhenIClickOnEANPREFIXButton()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.ClickEanPrefix();
        }
        public void WhenIValidateSPECIFICPREFIXButtonIsDisable()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.IsSpeficPrefixButtonDisabled().ShouldBeTrue();
        }
        public void WhenIClickOnEDICOMMIDButton()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.ClickEdiComIdButton();
        }
        public void ThenICheckThatLabelerCodeValidationErrorMessageIsDisplayed()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.GetLabelerMatchError().ShouldBe("Not a valid Labeler Code");
        }
        public void WhenIObserveValidationPassesWithGreenCheckMark()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.IsAccountValidated(90).ShouldBeTrue();
        }
        public void ThenISeeAccountNumberValidationError()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.GetAccountValidationError().ShouldBe("Account Entered Is Not Valid");
        }
        public void ThenISeeMessageForPREFIXNOTAVAILABLE()
        {
            var page = new Pages.VendOrHold(Setup.TestSetup.Driver);

            page.IsPrefixNumberValidated().ShouldBeTrue();
        }