コード例 #1
0
        public void ShouldShowSaveAndExitButton()
        {
            var details = new VacancyRequirementsProspects();

            var viewModel = new VacancyRequirementsProspectsViewModel {
            };

            var view = details.RenderAsHtml(viewModel);

            view.GetElementbyId("VacancyRequirementsProspectsAndExit").Should().NotBeNull("Should exists a save and exit button");
        }
コード例 #2
0
        public void ShouldShowSaveAndContinueToPreviewButtonWhenEditingRejectedVacancy()
        {
            var details = new VacancyRequirementsProspects();

            var viewModel = new Fixture().Build <VacancyRequirementsProspectsViewModel>()
                            .With(v => v.Status, VacancyStatus.Referred)
                            .Create();

            var view = details.RenderAsHtml(viewModel);

            view.GetElementbyId("VacancyRequirementsProspectsButton").Should().NotBeNull("Should exists a save button");
            view.GetElementbyId("VacancyRequirementsProspectsButton").InnerHtml.Should().Be("Save and return to Preview");
        }
コード例 #3
0
        public void ShouldShowSaveButtonWhenEditingDraftVacancy()
        {
            var details = new VacancyRequirementsProspects();

            var viewModel = new Fixture().Build <VacancyRequirementsProspectsViewModel>()
                            .With(v => v.Status, VacancyStatus.Draft)
                            .With(v => v.ComeFromPreview, false)
                            .Create();

            var view = details.RenderAsHtml(viewModel);

            view.GetElementbyId("VacancyRequirementsProspectsButton").Should().NotBeNull("Should exists a save button");
            view.GetElementbyId("VacancyRequirementsProspectsButton").InnerHtml.Should().Be("Save and continue");
        }