Example #1
0
        public async Task CreateSingleDayShouldBeVisible()
        {
            const string startTime = "10:19";
            const string endTime   = "21:48";

            var workers = new[] { new Worker {
                                      FullName = "Василий"
                                  } };
            await workerRepository.CreateManyAsync(shop.Id, workers);

            var page = LoadMainPage().GoToWorkerListPage().OpenCalendar();

            page.CheckWorkerItems(workers);

            var cellIdx = Now.Day - 1;

            page.GetCell(0, cellIdx).WaitNotFilled();

            var editingView = page.OpenEditor(0, cellIdx).GetEditingView();

            editingView.SetTimeRange(startTime, endTime);
            editingView.ClickSave();

            page.GetCell(0, cellIdx).WaitFilled();
            var editor = page.OpenEditor(0, cellIdx);

            var dateText      = Now.GetDayAndFullMonth();
            var dayOfWeekName = Now.GetDayOfWeekName().ToLower();

            editor.HeaderDate.WaitText(dateText);
            editor.HeaderDayOfWeek.WaitText(dayOfWeekName);

            editor.GetInfoView().CheckStartEndTime(startTime, endTime);
        }