This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if($paginator->hasPages()) | |
<ul class="pagination" role="navigation" aria-label="Pagination"> | |
{{-- Previous Page Link --}} | |
@if ($paginator->onFirstPage()) | |
<li class="pagination-previous disabled">Previous <span class="show-for-sr">page</span></li> | |
@else | |
<li class="pagination-previous"><a href="{{ $paginator->previousPageUrl() }}">Previous <span class="show-for-sr">page</span></a></li> | |
@endif | |
{{-- Pagination Elements --}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Enzyme boilerplate" : { | |
"prefix": "enzyme boilerplate", | |
"body": [ | |
"import React from 'react';", | |
"import { shallow } from 'enzyme';", | |
"import ${1: component} from '${2: module}';", | |
"", | |
"describe('${3:describe}', () => {", | |
" it('should ${4:test}', () => {", | |
" });", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<Document> Update(int id, UpdateDocumentMutation mutation) | |
{ | |
var document = _context.Documents | |
.Include(d => d.Category) | |
.Include(d => d.SuggestedCode) | |
.Include(d => d.Revisions) | |
.ThenInclude(r => r.Files) | |
.Include(d => d.Revisions) | |
.ThenInclude(r => r.Stages) | |
.ThenInclude(s => s.Stage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
namespace ChainOfResponsability { | |
//pseudo classes | |
public class Eficacia | |
{ | |
public int Eficaz { get; internal set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var service = new DocumentWriteService(null, null, null, business, null, null, context, eventBus, _logger); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var elaboration = new Stage() { Type = StageType.Elaboration, Name = "Elaboration" }; | |
var approval = new Stage() { Type = StageType.Approval, Name = "Approval" }; | |
var consensus = new Stage() { Type = StageType.Approval, Name = "Consensus" }; | |
context.Stages.Add(elaboration); | |
context.Stages.Add(approval); | |
context.Stages.Add(consensus); | |
var oldCategory = new Category() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var document = DocumentMother.DocumentWithOnePublishedAndOnePendingRevisionInApproval(elaborator: UserMother.SteveJobs(), approvers: approvers); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var service = new DocumentWriteServiceBuilder() | |
.WithBusiness(business) | |
.WithContext(context) | |
.WithEventBus(eventBus) | |
.Build(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assert.Equal(revision.Changes, documentMutation.Changes); | |
Assert.True(elaborationResult.Approved); | |
Assert.Equal(2, revision.Stages.Count); | |
Assert.Equal(lastStage.StageId, approval.Id); | |
Assert.Equal(2, lastStage.Order); | |
Assert.Equal(117, stageResult.ResponsibleId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
revision.Changes.Should().Be(requestPayload.Changes, "because this is what changed in the revision"); | |
elaborationResult.Approved.Should().BeTrue("because we just completed the elaboration stage"); | |
revision.Stages.Count.Should().Be(2, "because the next stage has been created"); | |
createdStage.Order.Should().Be(2, "because it happens after the elaboration"); | |
createdStage.StageId.Should().Be(StageMother.ApprovalStageid, "because the next stage is the approval stage"); | |
createdStageResult.ResponsibleId.Should().Be(DocumentMother.ApprovalResponsibleId, "because its the responsible for the approval stage of this document"); |
OlderNewer