creation

package
v2.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2019 License: GPL-3.0 Imports: 23 Imported by: 2

Documentation

Overview

Package creation contains the logic to create or add elements. For example creating cases/sequences or adding a comment to a case.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaseCommentPut

func CaseCommentPut(commentAdder handler.CommentAdder) http.HandlerFunc

CaseCommentPut returns a function which processes a comment posted to a test case

func CasePost

func CasePost(ta handler.TestCaseAdder, caseChecker id.TestExistenceChecker, labelStore handler.Labels, activityStore handler.Activities) http.HandlerFunc

CasePost returns a function that handles the creation of a case

func ConstructSteps

func ConstructSteps(rawSteps []InputStep) []test.Step

ConstructSteps creates steps from user input. Returns an empty array in no test steps were given.

func GroupPost

func GroupPost(ga handler.GroupAdder, groupChecker id.ActorExistenceChecker) http.HandlerFunc

GroupPost returns a function handling the creation of a group

func MemberPut

MemberPut is used to add a existing user to the project

func NewRegisterHandler

func NewRegisterHandler(server RegisterServer) http.Handler

NewRegisterHandler creates a new signout handler that handles signout requests from the client.

func ProjectLabelPost

func ProjectLabelPost(labelStore handler.Labels) http.HandlerFunc

Creates a new Label for the given project

func ProjectPost

ProjectPost is used to save a new project in the system

func SequenceCommentPut

func SequenceCommentPut(commentAdder handler.CommentAdder) http.HandlerFunc

SequenceCommentPut returns a function which processes a comment posted to a test sequence

func SequencePost

SequencePost handles requests that demand the creation of a new sequence.

func TestLabelPost

func TestLabelPost(labelStore handler.Labels) http.HandlerFunc

Creates a new test label for the given test and label

func WriteComment added in v1.7.0

func WriteComment(c *comment.Comment, w http.ResponseWriter, r *http.Request) error

Write comment renders the given comment and prints it into the given Writer.

Types

type InputStep

type InputStep struct {
	ID               int
	Actual, Expected string
}

InputStep represents an step of the input data

type RegisterServer

type RegisterServer interface {
	Get(id id.ActorID) (*user.User, bool, error)
	GetByMail(email string) (*user.User, bool, error)
	Add(pur *user.PasswordUser) error
}

RegisterServer is used to register a new user

type TestCaseInput

type TestCaseInput struct {
	InputTestCaseName          string
	InputTestCaseDescription   string
	InputTestCasePreconditions []string
	InputTestCaseSUTVersions   map[string]*project.Version
	InputHours                 int
	InputMinutes               int
	InputSteps                 []InputStep
	InputLabels                []string
}

TestCaseInput contains everything needed to create a testcase.

type TestSequenceInput

type TestSequenceInput struct {
	InputTestSequenceName,
	InputTestSequenceDescription string
	InputTestSequencePreconditions []test.Precondition
	InputTestSequenceTestCase      string
	InputLabels                    []*string
}

TestSequenceInput contains general input that can be used to create a sequence.

func GetTestSequenceInput

func GetTestSequenceInput(r *http.Request, labelOption bool) (*TestSequenceInput, error)

GetTestSequenceInput gets the test sequence input from the request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL