{"id":17197695,"url":"https://github.com/dmcg/konsent","last_synced_at":"2025-04-13T20:51:30.982Z","repository":{"id":144531589,"uuid":"58469735","full_name":"dmcg/konsent","owner":"dmcg","description":"An acceptance test library for Kotlin","archived":false,"fork":false,"pushed_at":"2018-05-08T15:09:03.000Z","size":65,"stargazers_count":29,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T11:13:55.767Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmcg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-05-10T14:47:40.000Z","updated_at":"2023-08-25T08:01:21.000Z","dependencies_parsed_at":"2024-01-21T11:49:35.097Z","dependency_job_id":"9d26b746-8a55-4520-aa2b-e570208c84d6","html_url":"https://github.com/dmcg/konsent","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmcg%2Fkonsent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmcg%2Fkonsent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmcg%2Fkonsent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmcg%2Fkonsent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmcg","download_url":"https://codeload.github.com/dmcg/konsent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782278,"owners_count":21160716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T01:57:06.185Z","updated_at":"2025-04-13T20:51:30.965Z","avatar_url":"https://github.com/dmcg.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nKonsent\n=========\n\nAn acceptance testing library for Kotlin.\n\n[KonsentExampleTests](src/test/java/com/oneeyedmen/konsent/KonsentExampleTests.kt)\nshows how to write a test.\n\n```kotlin\n@RunWith(Konsent::class)\n@Preamble(\n    \"As a developer named Duncan\",\n    \"I want to know that example.com is up and running\")\nclass KonsentExampleTests : ChromeAcceptanceTest() {\n\n    val duncan = actorNamed(\"Duncan\")\n\n    @Scenario(1) fun `Example_dot_com loads`() {\n        Given(duncan).loadsThePageAt(\"http://example.com\")\n        Then(duncan) {\n            shouldSee(thePageLocation, pathContains(\"example.com\"))\n            shouldSee(thePageTitle, equalTo(\"Example Domain\"))\n            shouldSee(thePageContent, containsALink(\"More information...\", \"http://www.iana.org/domains/example\"))\n        }\n    }\n\n    @Scenario(2, \"Following a link from example.com\") fun cant_have_dots_in_quoted_method_names() {\n        Given(duncan).loadsThePageAt(\"http://example.com\")\n        When(duncan).followsTheLink(\"More information...\", \"http://www.iana.org/domains/example\")\n        Then(duncan).shouldSee(thePageLocation, equalTo(URI(\"http://www.iana.org/domains/reserved\")))\n    }\n\n    @Scenario(3) fun `Dispensing with the given when then`() {\n        duncan.he.loadsThePageAt(\"http://example.com\")\n        duncan.he.followsTheLink(\"More information...\", \"http://www.iana.org/domains/example\")\n        duncan.he.shouldSee(thePageLocation, equalTo(URI(\"http://www.iana.org/domains/reserved\")))\n    }\n}\n```\n\nThis writes an approved file\n\n```gherkin\n\nFeature: Konsent Example Tests\n    As a developer named Duncan\n    I want to know that example.com is up and running\n\n    Scenario: Example_dot_com loads\n        Given Duncan loads the page at \"http://example.com\"\n        Then he sees the page location \"location contains \"example.com\"\n        and the page title is equal to \"Example Domain\"\n        and the page content contains a link [More information...](http://www.iana.org/domains/example)\n\n    Scenario: Following a link from example.com\n        Given Duncan loads the page at \"http://example.com\"\n        When he follows the link [More information...](http://www.iana.org/domains/example)\n        Then he sees the page location is equal to http://www.iana.org/domains/reserved\n\n    Scenario: Dispensing with the given when then\n        Duncan loads the page at \"http://example.com\"\n        he follows the link [More information...](http://www.iana.org/domains/example)\n        he sees the page location is equal to http://www.iana.org/domains/reserved\n\n```\n\nKonsent is available at Maven central.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmcg%2Fkonsent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmcg%2Fkonsent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmcg%2Fkonsent/lists"}