Skip to content

Commit

Permalink
[ISSUE-60] add stage and stage f methods to provider.T interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinyaev Anton Yuryevich committed Mar 22, 2023
1 parent 514f33d commit 7cf98c8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/framework/core/allure_manager/manager/description.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,17 @@ func (a *allureManager) Descriptionf(format string, args ...interface{}) {
result.Description = fmt.Sprintf(format, args...)
})
}

// Stage provides staqe to test result(using fmt.Sprint)
func (a *allureManager) Stage(args ...interface{}) {
a.safely(func(result *allure.Result) {
result.Stage = fmt.Sprint(args...)
})
}

// Stagef provides staqe to test result(using fmt.Sprintf)
func (a *allureManager) Stagef(format string, args ...interface{}) {
a.safely(func(result *allure.Result) {
result.Stage = fmt.Sprintf(format, args...)
})
}
2 changes: 2 additions & 0 deletions pkg/framework/provider/allure.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ type DescriptionFields interface {
Titlef(format string, args ...interface{})
Description(args ...interface{})
Descriptionf(format string, args ...interface{})
Stage(args ...interface{})
Stagef(format string, args ...interface{})
}

type AllureSteps interface {
Expand Down

0 comments on commit 7cf98c8

Please sign in to comment.