コード例 #1
0
        public static void SetTimeRange(this DayEditingBlock block, string start = "10:00", string end = "21:00", int atRow = 0)
        {
            while (block.TimeRangeLine.Count.Get() <= atRow && block.TimeRangeLine.First().AddLink.IsPresent.Get())
            {
                block.TimeRangeLine.First().AddLink.Click();
            }
            var timeRange = block.GetTimeRangeBlockAtIndex(atRow);

            timeRange.StartTime.ResetRawValue(start);
            timeRange.EndTime.ResetRawValue(end);
        }
コード例 #2
0
        public static void CheckTimeRange(this DayEditingBlock block, string start, string end, string overflow = null, int atRow = 0)
        {
            var timeRange = block.GetTimeRangeBlockAtIndex(atRow);

            timeRange.StartTime.WaitText(start);
            timeRange.EndTime.WaitText(end);

            if (!string.IsNullOrEmpty(overflow))
            {
                timeRange.OverflowText.WaitText(overflow);
            }

            if (overflow == "")
            {
                timeRange.OverflowText.WaitAbsence();
            }
        }
コード例 #3
0
        protected void CheckValidationMessage(DayEditingBlock editingView, string message, ErrorAt errorAt, int atRow = 0)
        {
            var timeRange = editingView.GetTimeRangeBlockAtIndex(atRow);

            if (errorAt == ErrorAt.Both)
            {
                timeRange.StartTime.MouseOver();
                timeRange.CheckErrorMessage(message, false);
                editingView.ClickOnFakeBlock();
                timeRange.EndTime.MouseOver();
                timeRange.CheckErrorMessage(message, true);
            }
            else
            {
                timeRange.MouseOverTimeInput(errorAt == ErrorAt.Right);
                timeRange.CheckErrorMessage(message, errorAt == ErrorAt.Right);
            }

            editingView.ClickOnFakeBlock();
        }