This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package mypackage | |
import grails.plugin.spock.ControllerSpec | |
import org.hamcrest.CoreMatchers | |
import static org.hamcrest.CoreMatchers.notNullValue | |
import static org.junit.Assert.assertEquals | |
import static org.junit.Assert.assertThat | |
class FancyControllerTests extends ControllerSpec { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | |
http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.in3k8</groupId> | |
<artifactId>cuke4duke-selenium-sample</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<packaging>jar</packaging> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Sample Page loading test | |
On /programmes want to see if Cucumber can be used to make a selenium testing DSL | |
Scenario: A brand hub page can be loaded | |
When I open '/programmes/skins' | |
Then the title should be 'Skins - Channel 4' | |
Then click an item with xpath '//html/body/div/div[3]/div/div[3]/div/ul/li[2]/h3/a' | |
Then browser location should be 'http://www.e4.com/skins/quizzes.html' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample; | |
import com.thoughtworks.selenium.DefaultSelenium; | |
import com.thoughtworks.selenium.Selenium; | |
import cuke4duke.annotation.Before; | |
import cuke4duke.annotation.I18n.EN.Then; | |
import cuke4duke.annotation.I18n.EN.When; | |
import static org.junit.Assert.assertEquals; | |
import static org.junit.Assert.assertTrue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.grails.gradle.plugin | |
import grails.util.GrailsNameUtils | |
import org.codehaus.groovy.grails.cli.support.GrailsRootLoader | |
import org.codehaus.groovy.grails.cli.support.GrailsBuildHelper | |
import org.gradle.api.Plugin | |
import org.gradle.api.Project | |
import org.codehaus.groovy.grails.resolve.IvyDependencyManager | |
import org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cuke4duke.annotation.I18n.EN.Then; | |
import helpers.SeleniumWrapper; | |
import helpers.WebPageHelpers; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebElement; | |
import static helpers.SeleniumFactory.getSelenium; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Extracting a text node from a link | |
Scenario: A link has text | |
When I open abitrary page | |
Then my link must have the following text BlahBlah |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="blah-location">BlahBlah<span>arbitrary text</span></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenLocal() | |
mavenCentral() | |
maven { | |
url "http://repo.grails.org/grails/core" | |
} | |
} | |
dependencies { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package grails_filter_tests | |
import spock.lang.Specification | |
import org.springframework.beans.factory.config.MethodInvokingFactoryBean | |
import grails.test.mixin.* | |
import grails.test.mixin.support.GrailsUnitTestMixin | |
import grails.test.mixin.web.FiltersUnitTestMixin | |
@TestFor(SimpleController) | |
@TestMixin([GrailsUnitTestMixin,FiltersUnitTestMixin]) | |
@Mock(MySimpleFilters) |
OlderNewer