// Copyright F3 Authors
// SPDX-License-Identifier: MIT

package tests

import (
	"testing"

	"code.forgejo.org/f3/gof3/v3/kind"
	"code.forgejo.org/f3/gof3/v3/options"
	tests_forge "code.forgejo.org/f3/gof3/v3/tree/tests/f3/forge"
)

type forgeTest struct {
	tests_forge.Base
}

func (o *forgeTest) NewOptions(t *testing.T) options.Interface {
	return newTestOptions(t, o.GetName())
}

func (o *forgeTest) GetNameExceptions() []string {
	return []string{
		tests_forge.ComplianceNameForkedPullRequest,
		tests_forge.ComplianceNameNoBranchPullRequest,
		tests_forge.ComplianceReviewRequest,
	}
}

func (o *forgeTest) GetKindExceptions() []kind.Kind {
	return []kind.Kind{
		kind.KindAttachments,
		kind.KindComments,
		kind.KindIssues,
		kind.KindLabels,
		kind.KindMilestones,
		kind.KindProjects,
		kind.KindPullRequests,
		kind.KindReactions,
		kind.KindReleases,
		kind.KindRepositories,
		kind.KindReviews,
		kind.KindReviewComments,
		kind.KindTopics,
	}
}

func (o *forgeTest) GetNonTestUsers() []string {
	return []string{
		GetFixtureUsername(),
		"ghost",
	}
}

func newForgeTest(name string) tests_forge.Interface {
	t := &forgeTest{}
	t.SetName(name)
	return t
}
