Skip to content

Commit

Permalink
fix: fix tests and remove unnecessary first-step check
Browse files Browse the repository at this point in the history
  • Loading branch information
zikani03 committed Mar 18, 2024
1 parent bf6f597 commit 172816c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions cmd/dialoguss.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,7 @@ func ResolveStepExpectedValue(s *core.Session, step *core.Step, store *Component

// Run runs the dialoguss session and executes the steps in each session
func Run(s *core.Session, store *ComponentStore) error {
first := true
for i, step := range s.Steps {
if first {
ExecuteStep(step, s)
first = false
continue
}
step.StepNo = i
result, err := ExecuteStep(step, s)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions cmd/dialoguss_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func TestRunAutomatedSession(t *testing.T) {
server.URL,
[]*core.Step{
{
ComponentID: "default.splash",
ComponentID: "default/splash",
},
{
ComponentID: "home",
Expand Down Expand Up @@ -242,7 +242,7 @@ func TestRunAutomatedSession(t *testing.T) {
server.URL,
[]*core.Step{
{
ComponentID: "default.splash",
ComponentID: "default/splash",
},
{
ComponentID: "home",
Expand Down

0 comments on commit 172816c

Please sign in to comment.