public void ShouldShowSaveAndContinueToPreviewButtonWhenEditingRejectedVacancy()
        {
            var details = new CreateVacancy();

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

            var view = details.RenderAsHtml(viewModel);

            view.GetElementbyId("createVacancyButton").Should().NotBeNull("Should exists a save button");
            view.GetElementbyId("createVacancyButton").InnerHtml.Should().Be("Save and return to Preview");
            view.GetElementbyId("createVacancyButton").Attributes["value"].Value.Should().Be("CreateVacancyAndPreview");
        }
        public void ShouldShowSaveButtonWhenEditingDraftVacancy()
        {
            var details = new CreateVacancy();

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

            var view = details.RenderAsHtml(viewModel);

            view.GetElementbyId("createVacancyButton").Should().NotBeNull("Should exists a save button");
            view.GetElementbyId("createVacancyButton").InnerHtml.Should().Be("Save and continue");
            view.GetElementbyId("createVacancyButton").Attributes["value"].Value.Should().Be("CreateVacancy");
        }
        public void ShouldShowSaveAndExitButton()
        {
            var details = new CreateVacancy();

            var viewModel = new NewVacancyViewModel
            {
                VacancyOwnerRelationship = new VacancyOwnerRelationshipViewModel()
                {
                    Employer = new EmployerViewModel()
                    {
                        Address = new AddressViewModel()
                    }
                }
            };

            var view = details.RenderAsHtml(viewModel);

            view.GetElementbyId("createVacancyAndExit").Should().NotBeNull("Should exists a save and exit button");
        }
示例#4
0
 public Task <CreateVacancyResult> Create([FromBody] CreateVacancy request) => _bus.Request(request);