Documentation ¶
Index ¶
- Constants
- Variables
- func BuildTestProject(fs afero.Fs) error
- func CaptureStdout(task func()) string
- func FormatDate(t time.Time, dateFormat string) string
- func ParseDate(date string, dateFormat string) time.Time
- func StringSliceContains(s []string, v string) bool
- func StringSliceContainsFold(s []string, v string) bool
- type Version
Constants ¶
View Source
const ( // FeaturesDir is the name given to the features directory in a Kosher project FeaturesDir = "features" // ConfigDir is the name given to the config directory in a Kosher project ConfigDir = "config" // ResultsDir is the name given to the results directory where test results are written ResultsDir = "results" // MacrosDir is the name given to the macros directory where marcros are stored MacrosDir = "macros" // ResourcesDir is the name given to the resources directory where resource files are kept ResourcesDir = "resources" // ResultsBootstrapFile is the name given to the HTML report generated ResultsBootstrapFile = "results-bootstrap.html" // ResultsSimpleFile is the name given to the HTML report generated ResultsSimpleFile = "results-simple.html" // ResultsJSONFile is the name given to the Cucumber format JSON results generated ResultsJSONFile = "cucumber.json" // AxeResultsHTMLFile is the name given to the HTML report generated for Axe scans AxeResultsHTMLFile = "axe-results.html" // AxeResultsJSONFile is the name given to the JSON file generated for Axe scans AxeResultsJSONFile = "axe-results.json" // EnvironmentsFile is the name given to the environments file in a Kosher project EnvironmentsFile = "environments.json" // PagesFile is the name given to the pages file in a Kosher project PagesFile = "pages.json" // SelectorsFile is the name given to the selectors file in a Kosher project SelectorsFile = "selectors.json" // SettingsFile is the name given to the settings file in a Kosher project SettingsFile = "settings.json" // ExampleFeatureFile is the name given to the sample feature provided when a project is initialized ExampleFeatureFile = "example.feature" // DefaultScreenFormat is the default screen format DefaultScreenFormat = "desktop" // DefaultScreenWidth is the fail-safe screen width DefaultScreenWidth = 1024 // DefaultScreenHeight is the fail-safe screen height DefaultScreenHeight = 768 )
Variables ¶
View Source
var CurrentVersion = &Version{
Major: 1,
Minor: 11,
Patch: 0,
}
CurrentVersion is the current version of Kosher; the one, true version number in this code base.
Functions ¶
func BuildTestProject ¶ added in v1.7.0
BuildTestProject is intended for using during unit testing to build an in-memory representation of the project
func CaptureStdout ¶ added in v1.7.0
func CaptureStdout(task func()) string
CaptureStdout executes a task and returns any text it wrote to Stdout
func FormatDate ¶
FormatDate converts a `time.Time` to a string using the `dateFormat` value specified in the settings file
func ParseDate ¶
ParseDate parses a given string to a `time.Time` using the `dateFormat` value specified in the settings file
func StringSliceContains ¶ added in v1.4.0
StringSliceContains returns true if the SORTED slice `s` contains `v`.
func StringSliceContainsFold ¶ added in v1.4.0
StringSliceContainsFold returns true if the SORTED slice `s` contains `v`, ignoring case.
Types ¶
Click to show internal directories.
Click to hide internal directories.