From ac258302178b69ae4f05a8c8ab22d9f9b4081efc Mon Sep 17 00:00:00 2001 From: sdelamo Date: Fri, 20 Apr 2018 09:03:32 +0200 Subject: [PATCH] Implement VersionVerificationSpec See: https://github.com/MetadataConsulting/ModelCataloguePlugin/issues/1202 --- .../version/VersionVerificationSpec.groovy | 43 ++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/ModelCatalogueCorePluginTestApp/test/functional/org/modelcatalogue/core/version/VersionVerificationSpec.groovy b/ModelCatalogueCorePluginTestApp/test/functional/org/modelcatalogue/core/version/VersionVerificationSpec.groovy index 6dc09ec034..efea4d278a 100644 --- a/ModelCatalogueCorePluginTestApp/test/functional/org/modelcatalogue/core/version/VersionVerificationSpec.groovy +++ b/ModelCatalogueCorePluginTestApp/test/functional/org/modelcatalogue/core/version/VersionVerificationSpec.groovy @@ -1,8 +1,12 @@ package org.modelcatalogue.core.version +import geb.spock.GebSpec +import org.modelcatalogue.core.geb.CodeVersionPage +import org.modelcatalogue.core.geb.DashboardPage +import org.modelcatalogue.core.geb.LoginPage import spock.lang.Issue import spock.lang.Narrative -import spock.lang.Specification +import spock.lang.Stepwise import spock.lang.Title @Issue('https://metadata.atlassian.net/browse/MET-1925') @@ -13,5 +17,40 @@ import spock.lang.Title - Scroll down and select the Code Version option | you are redirected to a new page/window with the version number - Check that the model catalogue carries the correct version ''') -class VersionVerificationSpec extends Specification { +@Stepwise +class VersionVerificationSpec extends GebSpec { + + def "Login as user"() { + when: + LoginPage loginPage = to LoginPage + loginPage.login('user', 'user') + + then: + at DashboardPage + } + + def "select settings"() { + when: + DashboardPage dashboardPage = browser.page DashboardPage + dashboardPage.nav.cogMenu() + then: + at DashboardPage + } + + def "select code version"() { + when: + DashboardPage dashboardPage = browser.page DashboardPage + dashboardPage.nav.codeversion() + then: + at CodeVersionPage + } + + def "check version"() { + when: + CodeVersionPage codeVersionPage = browser.page CodeVersionPage + + then: + codeVersionPage.isGithubLinkDisplayed() + } + }