diff --git a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/component/Button.scala b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/component/Button.scala index 8652a4cc0a..005385503b 100644 --- a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/component/Button.scala +++ b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/component/Button.scala @@ -19,4 +19,4 @@ case class Button(queryString: QueryString)(implicit webDriver: WebDriver) def isStateDisabled: Boolean = { awaitVisible(); getState == disabledState } def awaitEnabledState(): Unit = awaitState(enabledState) -} +} \ No newline at end of file diff --git a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/component/Checkbox.scala b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/component/Checkbox.scala index 926457e8d4..e7d41bbd23 100644 --- a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/component/Checkbox.scala +++ b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/component/Checkbox.scala @@ -12,4 +12,4 @@ case class Checkbox(queryString: QueryString)(implicit webDriver: WebDriver) ext def ensureUnchecked(): Unit = { checkbox(query).clear() } -} +} \ No newline at end of file diff --git a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/component/TabBar.scala b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/component/TabBar.scala index a22aa26010..ce24535aaa 100644 --- a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/component/TabBar.scala +++ b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/component/TabBar.scala @@ -10,4 +10,12 @@ case class TabBar(private val queryString: QueryString = TestId("tabs"))(implici await condition (invisibleSpinner) } + // Making a new variable called anaquery (analysis tab) +// val anaquery = CssSelectorQuery("div[data-test-id='Analysis-tab'])") +// def mytest(): Unit ={ +// //anaquery.findElement.get.underlying.getText() +// anaquery.findElement.get.text() +// System.out.print("this is my output" + anaquery) +// } + } \ No newline at end of file diff --git a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/fixture/UserFixtures.scala b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/fixture/UserFixtures.scala index 3ad84f7bf2..4e7e225d35 100644 --- a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/fixture/UserFixtures.scala +++ b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/fixture/UserFixtures.scala @@ -4,6 +4,7 @@ package org.broadinstitute.dsde.firecloud.fixture import org.broadinstitute.dsde.firecloud.FireCloudConfig import org.scalatest.concurrent.{Eventually, ScaledTimeSpans} import org.broadinstitute.dsde.firecloud.page.AuthenticatedPage +import org.broadinstitute.dsde.firecloud.page.duos.{DuosHomePage, DuosLoginPage} import org.broadinstitute.dsde.firecloud.page.user.{RegistrationPage, SignInPage, TermsOfServicePage} import org.broadinstitute.dsde.firecloud.page.workspaces.WorkspaceListPage import org.broadinstitute.dsde.workbench.auth.AuthTokenScopes @@ -16,7 +17,8 @@ import org.broadinstitute.dsde.workbench.service.util.Retry.retry import scala.concurrent.duration._ import scala.util.Try -trait UserFixtures extends CleanUp with ScaledTimeSpans with Eventually { self: WebBrowserSpec with TestSuite => +trait UserFixtures extends CleanUp with ScaledTimeSpans with Eventually { + self: WebBrowserSpec with TestSuite => /** * "Signs in" to FireCloud with an access token, bypassing the Google sign-in flow. Assumes the @@ -32,7 +34,7 @@ trait UserFixtures extends CleanUp with ScaledTimeSpans with Eventually { self: * Assumes the user is already registered so hands the test code a ready WorkspaceListPage. */ def withScopedSignIn(user: Credentials, scopes: Seq[String]) - (testCode: WorkspaceListPage => Any)(implicit webDriver: WebDriver): Unit = { + (testCode: WorkspaceListPage => Any)(implicit webDriver: WebDriver): Unit = { withSignIn(user, new WorkspaceListPage, scopes)(testCode) } @@ -45,20 +47,39 @@ trait UserFixtures extends CleanUp with ScaledTimeSpans with Eventually { self: withSignInReal(user, new WorkspaceListPage)(testCode) } + /** + * Signs in to FireCloud using the Google sign-in flow. Assumes the user is already registered so + * hands the test code a ready WorkspaceListPage. + */ + def withSignInDuos(user: Credentials) + (testCode: DuosHomePage => Any)(implicit webDriver: WebDriver): Unit = { + withSignInDuos(user, new DuosHomePage())(testCode) + } + + def withSignInDuos[T <: AuthenticatedPage](user: Credentials, page: T) + (testCode: T => Any) + (implicit webDriver: WebDriver): Unit = { + + logger.info(s"withSignInDuos: ${user.email} ...") + executeTestCodeWithSignIn(user, { + new DuosLoginPage("https://duos.dsde-dev.broadinstitute.org/#/login").open.signIn(user.email, user.password) + }, page, testCode) + } + /** * "Signs in" to FireCloud with an access token, bypassing the Google sign-in flow. Assumes the * user is not registered and returns a ready TermsOfServicePage. */ def withSignInNewUser(user: Credentials) (testCode: RegistrationPage => Any)(implicit webDriver: WebDriver): Unit = { - withSignIn(user, new TermsOfServicePage) { tosPage => - register cleanUp executeAsyncScript("window.rejectToS(arguments[arguments.length - 1])") + withSignIn(user, new TermsOfServicePage) { tosPage => + register cleanUp executeAsyncScript("window.rejectToS(arguments[arguments.length - 1])") - tosPage.accept() + tosPage.accept() - val registrationPage = await ready new RegistrationPage + val registrationPage = await ready new RegistrationPage - testCode(registrationPage) + testCode(registrationPage) } } @@ -72,14 +93,14 @@ trait UserFixtures extends CleanUp with ScaledTimeSpans with Eventually { self: executeTestCodeWithSignIn(user, { // workaround for failed forceSignedIn var counter = 0 - retry(Seq.fill(2)(1.seconds)) ({ + retry(Seq.fill(2)(1.seconds))({ logger.info(s"withSignIn (${user.email}) opening SignInPage ...") new SignInPage(FireCloudConfig.FireCloud.baseUrl).open logger.info(s"withSignIn (${user.email}) executing script forceSignedIn ...") val js = s"window.forceSignedIn('${user.makeAuthToken(scopes).value}')" executeScript(js) if (counter > 0) logger.warn(s"Retrying execute JavaScript forceSignedIn(): value = $js") - counter +=1 + counter += 1 try { logger.info(s"withSignIn (${user.email}) awaiting page ready ...") page.awaitReady() @@ -101,9 +122,9 @@ trait UserFixtures extends CleanUp with ScaledTimeSpans with Eventually { self: }, page, testCode) } - private def withSignInReal[T <: AuthenticatedPage](user: Credentials, page: T) - (testCode: T => Any) - (implicit webDriver: WebDriver): Unit = { + def withSignInReal[T <: AuthenticatedPage](user: Credentials, page: T) + (testCode: T => Any) + (implicit webDriver: WebDriver): Unit = { logger.info(s"withSignInReal: ${user.email} ...") executeTestCodeWithSignIn(user, { @@ -126,7 +147,7 @@ trait UserFixtures extends CleanUp with ScaledTimeSpans with Eventually { self: testCode(page) logger.info(s"executeTestCodeWithSignIn (${user.email}) signing out ...") - try page.signOut() catch nonFatalAndLog(s"ERROR logging out user: ${user.email}") + //try page.signOut() catch nonFatalAndLog(s"ERROR logging out user: ${user.email}") } } diff --git a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/duos/DuosHomePage.scala b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/duos/DuosHomePage.scala new file mode 100644 index 0000000000..f36d71341c --- /dev/null +++ b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/duos/DuosHomePage.scala @@ -0,0 +1,63 @@ +package org.broadinstitute.dsde.firecloud.page.duos + +import org.broadinstitute.dsde.firecloud.page.{BaseFireCloudPage, PageUtil} +import org.openqa.selenium.WebDriver + +/** + * The DuosHomePage class should be the page where I have different methods to verify the homepage + * after logging in. + * + * @param webDriver + */ +class DuosHomePage(implicit webDriver: WebDriver) extends BaseFireCloudPage + with PageUtil[DuosHomePage] { + +// lazy override val url = "https://duos.dsde-dev.broadinstitute.org/#/login" + + lazy override val url = "https://duos.dsde-dev.broadinstitute.org/#/admin_console" + + override def awaitReady(): Unit = { + super.awaitReady() +// await condition { +// val column = find(cssSelector("table th:nth-child(2)")) +// var f: Boolean = false +// if (column.isDefined) { +// val txt = column.get.underlying.getText +// f = txt.equalsIgnoreCase("Dataset ID") +// } +// f +// } + } + + /** + * Search for a dataset ID on the searchbar and advance to the next page. + */ +// def datasetSearch(): Unit = { +// goTo("https://duos.dsde-dev.broadinstitute.org/#/dataset_catalog") +// val searchfor = "DUOS-000003" +// val searchBar = cssSelector("input[ng-model='searchDataset']") +// searchBar.findElement.get.underlying.click() +// searchBar.findElement.get.asInstanceOf[ValueElement].value_=(searchfor) +// val check = cssSelector("label[class='regular-checkbox rp-choice-questions']") +// check.findElement.get.underlying.click() +// val applyforaccess = cssSelector("button[ng-show='isResearcher']") +// applyforaccess.findElement.get.underlying.click() +// Thread.sleep(1000) +// } + +def datasetSearch(): Unit = { + Thread.sleep(1000) + val datasetcatalog = cssSelector("a[href='#/dataset_catalog']") + datasetcatalog.findElement.get.underlying.click() +// goTo("https://duos.dsde-dev.broadinstitute.org/#/dataset_catalog") +// val searchfor = "DUOS-000003" +// val searchBar = cssSelector("input[ng-model='searchDataset']") +// searchBar.findElement.get.underlying.click() +// searchBar.findElement.get.asInstanceOf[ValueElement].value_=(searchfor) +// val check = cssSelector("label[class='regular-checkbox rp-choice-questions']") +// check.findElement.get.underlying.click() +// val applyforaccess = cssSelector("button[ng-show='isResearcher']") +// applyforaccess.findElement.get.underlying.click() + Thread.sleep(1000) +} +} diff --git a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/duos/DuosLoginPage.scala b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/duos/DuosLoginPage.scala new file mode 100644 index 0000000000..63ca4db627 --- /dev/null +++ b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/duos/DuosLoginPage.scala @@ -0,0 +1,161 @@ +package org.broadinstitute.dsde.firecloud.page.duos + +import org.broadinstitute.dsde.firecloud.FireCloudView +import org.broadinstitute.dsde.firecloud.component._ +import org.broadinstitute.dsde.firecloud.page.PageUtil +import org.broadinstitute.dsde.workbench.config.Credentials +import org.broadinstitute.dsde.workbench.service.test.WebBrowserUtil +import org.openqa.selenium.{TimeoutException, WebDriver} +import org.scalatest.selenium.{Page, WebBrowser} + +import scala.util.{Failure, Success, Try} + +/** + * Page class for the page displayed when accessing FireCloud when not signed in. + */ +class DuosLoginPage(val baseUrl: String)(implicit webDriver: WebDriver) extends FireCloudView with Page with PageUtil[DuosLoginPage] { + + case class GoogleSignInButton(queryString: CSSQuery)(implicit webDriver: WebDriver) extends Component(queryString) with Clickable { + override def awaitReady(): Unit = { + val signInTextCsspath = s"${queryString.text}" + log.info(s"GoogleSignInButton starting ready-wait for $signInTextCsspath ...") + await condition { + val signInText = findAll(cssSelector(signInTextCsspath)) + signInText.exists(_.text.contains("Sign in with Google")) + } + } + } + + override def awaitReady(): Unit = { + log.info("DuosLoginPage.awaitReady starting to wait for signInButton ... ") + + Try(signInButton awaitReady()) match { + case Success(_) => + log.info("DuosLoginPage.awaitReady believes signInButton is ready; sleeping for 500ms ... ") + Thread.sleep(500) + case Failure(f) => + log.error(s"DuosLoginPage timed out waiting for signInButton to be ready: ${f.getMessage}") + throw (f) + } + } + + lazy override val url: String = "https://duos.dsde-dev.broadinstitute.org/#/login" + + private val signInButton = GoogleSignInButton(CSSQuery(".abcRioButtonContentWrapper span[id]:first-child")) + + def isOpen = signInButton.isVisible + + /** + * Sign in to Duos + */ + def signIn(email: String, password: String): Unit = { + val popup = beginSignIn() + popup.signIn(email, password) + //TODO + //await enabled testId("account-dropdown") + } + + /** + * Handles the pre-sign-in dance of switching Selenium's focus to Google's + * sign-in pop-up window. + * + * @return a new GoogleSignInPopup + */ + private def beginSignIn(): GoogleSignInPopup = { + val initialWindowHandles = windowHandles + + signInButton.doClick() + Thread.sleep(1000) + + await condition (windowHandles.size == 2) + + val popupWindowHandle = (windowHandles -- initialWindowHandles).head + + switch to window(popupWindowHandle) + new GoogleSignInPopup().awaitLoaded() + } +} + + +class GoogleSignInPopup(implicit webDriver: WebDriver) extends WebBrowser with WebBrowserUtil { + + def awaitLoaded(): GoogleSignInPopup = { + Try { + await condition(id("identifierLink").findElement.exists(_.isDisplayed) + || id("identifierId").findElement.exists(_.isEnabled) + || id("Email").findElement.exists(_.isDisplayed), 10) // One Account All of Google popup + } match { + case Success(_) => + find(id("identifierLink")) foreach { link => + click on link + await visible id("identifierId") + } + case Failure(t) => throw new TimeoutException("Timed out (10 seconds) waiting for Google SignIn Popup.", t) + } + + this + } + + /** + * Signs in to Google to authenticate for FireCloud. + */ + def signIn(email: String, password: String): Unit = { + (id("Email").findElement.isDefined) match { + case true => oneAccountSignIn(email, password) + case false => normalSignIn(email, password) + } + returnFromSignIn() + } + + private def normalSignIn(email: String, password: String): Unit = { + await enabled id("identifierId") + emailField(id("identifierId")).value = email + pressKeys("\n") + + await enabled id("passwordNext") + await enabled name("password") + /* + * The Google real SignIn: animation transition from username to password freezes when other web browsers are in front thus blocking animation. + * Wait up to 60 seconds for animation finish. + */ + // Thread sleep 1000 + await condition(find(id("password")).exists(_.isDisplayed), 60) + pwdField(name("password")).value = password + pressKeys("\n") + } + + private def oneAccountSignIn(email: String, password: String): Unit = { + emailField(id("email")).value = email + find(id("next")).get.underlying.submit() + pwdField(id("Passwd")).value = password + find(id("signIn")).get.underlying.submit() + } + + /** + * Handles the post-sign-in dance of switching Selenium's focus back to the + * main FireCloud window. + * TODO: make this work when there is more than one window + */ + def returnFromSignIn(): Unit = { + /* + * The sign-in popup may go away at any time which could cause any calls + * such as findElement to fail with NullPointerException. Therefore, the + * only safe check we can make is on the number of windows. + */ + try { + await condition (windowHandles.size == 1) + } catch { + case _: TimeoutException => + /* + * If there is still more than 1 window after 30 seconds, we most likely + * need to approve access to continue. + */ + if (windowHandles.size > 1) { + click on id("submit_approve_access") + await condition (windowHandles.size == 1) + } + } + + switch to window(windowHandles.head) + } +} \ No newline at end of file diff --git a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/methodrepo/MethodDetailPage.scala b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/methodrepo/MethodDetailPage.scala index fd2363885e..124adb77b9 100644 --- a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/methodrepo/MethodDetailPage.scala +++ b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/methodrepo/MethodDetailPage.scala @@ -56,4 +56,4 @@ class PostExportModal(methodNamespace: String, methodName: String)(implicit webD def stayHere(): Unit = { cancel() } -} +} \ No newline at end of file diff --git a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/user/SignInPage.scala b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/user/SignInPage.scala index d69a8cec7b..4472a1467e 100644 --- a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/user/SignInPage.scala +++ b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/user/SignInPage.scala @@ -112,8 +112,7 @@ class GoogleSignInPopup(implicit webDriver: WebDriver) extends WebBrowser with W def signIn(email: String, password: String): Unit = { (id("Email").findElement.isDefined) match { case true => oneAccountSignIn(email, password) - case false => normalSignIn(email, password) - } + case false => normalSignIn(email, password) } returnFromSignIn() } diff --git a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/test/duosTest/DuosLinkSpec.scala b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/test/duosTest/DuosLinkSpec.scala new file mode 100644 index 0000000000..98562d865c --- /dev/null +++ b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/test/duosTest/DuosLinkSpec.scala @@ -0,0 +1,68 @@ +package org.broadinstitute.dsde.firecloud.test.duosTest + +import java.util.concurrent.TimeUnit + +import org.broadinstitute.dsde.firecloud.fixture.UserFixtures +import org.broadinstitute.dsde.firecloud.page.duos.{DuosHomePage, DuosLoginPage} +import org.broadinstitute.dsde.firecloud.page.{AuthenticatedPage, BaseFireCloudPage, PageUtil} +import org.broadinstitute.dsde.workbench.fixture.{BillingFixtures, TestReporterFixture, WorkspaceFixtures} +import org.broadinstitute.dsde.workbench.service.test.WebBrowserSpec +import org.openqa.selenium.{By, WebDriver} +import org.openqa.selenium.chrome.ChromeDriver +import org.scalatest.{FreeSpec, Matchers, ParallelTestExecution} +import org.broadinstitute.dsde.workbench.config.UserPool +import org.broadinstitute.dsde.workbench.config.{CommonConfig, Credentials} + + +/** + * Tests for the DUOS ui. + */ + +class DuosLinkSpec extends FreeSpec with ParallelTestExecution with Matchers + with WebBrowserSpec with WorkspaceFixtures with UserFixtures with BillingFixtures with TestReporterFixture { + + "sign in and apply for access" in { + val user = new Credentials(email = "b.adm.firec@gmail.com", password = "BroadDec1") + withWebDriver { implicit driver => + goTo("https://duos.dsde-dev.broadinstitute.org/#/home") + withSignInDuos(user) { homePage => + homePage.datasetSearch() + val datarequest = cssSelector("div[class='main-title-description']") + find(datarequest).get.text should include("Datasets with an associated DUL to apply for secondary use.") + println("success") + } + } + } + +// "sign in and apply for access" in { +// val user = new Credentials(email = "test.firec@gmail.com", password = "BroadDec1") +// withWebDriver { implicit driver => +// goTo("https://duos.dsde-dev.broadinstitute.org/#/home") +// withSignInDuos(user) { homePage => +// homePage.datasetSearch() +// val datarequest = cssSelector("div[class='main-title-description']") +// find(datarequest).get.text should include("Data Access Committee") +// println("success") +// } +// } +// } + +// "clicking help and about button" in { +// withWebDriver { implicit driver => +// goTo("https://duos.dsde-dev.broadinstitute.org/#/home") +// val duosp = find(CssSelectorQuery("img[alt*='What is DUOS graphic']")) +// duosp.get.isDisplayed shouldBe (true) +// val helpButton = find(CssSelectorQuery("a[href='#/home_help']")) +// helpButton.get.isEnabled shouldBe (true) +// val aboutButton = find(CssSelectorQuery("a[href='#/home_about']")) +// aboutButton.get.isEnabled shouldBe (true) +// val email = "test.firec@gmail.com" +// val joinButton = CssSelectorQuery("a.navbar-duos-link-join") +// find(joinButton).get.underlying.click() +// val typeInDes = CssSelectorQuery("input[ng-model='form.name']") +// find(typeInDes).get.asInstanceOf[ValueElement].value_=(email) +// val fullnametext = cssSelector("label[class='home-control-label col-lg-12 col-md-12 col-sm-12 col-xs-12']") +// find(fullnametext).get.text shouldBe ("Full Name") +// } +// } +} \ No newline at end of file diff --git a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/test/metadata/DataSpec.scala b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/test/metadata/DataSpec.scala index 924ebcb503..613c70610d 100644 --- a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/test/metadata/DataSpec.scala +++ b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/test/metadata/DataSpec.scala @@ -1,7 +1,7 @@ package org.broadinstitute.dsde.firecloud.test.metadata +import org.broadinstitute.dsde.firecloud.component.{Component, QueryString, TabBar} import org.broadinstitute.dsde.workbench.config.UserPool - import org.broadinstitute.dsde.firecloud.fixture.{TestData, UserFixtures} import org.broadinstitute.dsde.firecloud.page.workspaces.WorkspaceDataPage import org.broadinstitute.dsde.firecloud.page.workspaces.methodconfigs.WorkspaceMethodConfigDetailsPage @@ -9,6 +9,7 @@ import org.broadinstitute.dsde.workbench.auth.AuthToken import org.broadinstitute.dsde.workbench.fixture._ import org.broadinstitute.dsde.workbench.service.{AclEntry, WorkspaceAccessLevel} import org.broadinstitute.dsde.workbench.service.test.WebBrowserSpec +import org.openqa.selenium.WebDriver import org.scalatest.time.{Millis, Seconds, Span} import org.scalatest.{FreeSpec, Matchers, ParallelTestExecution} @@ -136,13 +137,53 @@ class DataSpec extends FreeSpec with ParallelTestExecution with WebBrowserSpec w } withSignIn(reader) { _ => val workspaceDataTab = new WorkspaceDataPage(billingProject, workspaceName).open - eventually { workspaceDataTab.dataTable.readColumnHeaders shouldEqual List("participant_id", "test1", "output") } + eventually { + workspaceDataTab.dataTable.readColumnHeaders shouldEqual List("participant_id", "test1", "output") + } + // the start of my test + val anaquery = CssSelectorQuery("div[data-test-id='Analysis-tab'])") + + def mytest(): Unit = { + //anaquery.findElement.get.underlying.getText() +// anaquery.findElement.get.text() + System.out.println("before my output") + anaquery.findElement.get.underlying.getText() + System.out.print("this is my output" + anaquery) + } } + //put new test here + } } } } +// // my new object that takes in the css selector for "submitted-tab" and matches the text. +// object myObj { +// def subtab: String (subtab: String) ={ +// cssSelector("div[data-test-id='Submitted-tab'])") +// } +// } +// +//// case class subtab(queryString: QueryString)(implicit webDriver: WebDriver) extends Component(queryString) { +//// def getText: String = readText(query) +// +// // step 1. go to tabBar.scala and find the function goToTab("Submitted-tab") +// // step 2. use the goToTab function and match the css selector with one that you put in +// // step 3. verify that the tab does contain the element css selector. +// "get text of submitted-tab and match with the cssSelector" in { +// TabBar.goToTab("Analysis") should include ("div[data-test-id='Submitted-tab'])") +// } + + + +// +// "get the text of subtab and match with the cssSelector" in { +// myObj should contain("div[data-test-id='Submitted-tab'])") +// } + + + "with defaults and local preferences when analysis is run" in { val owner = UserPool.chooseProjectOwner val reader = UserPool.chooseStudent @@ -187,4 +228,4 @@ class DataSpec extends FreeSpec with ParallelTestExecution with WebBrowserSpec w } } -} +} \ No newline at end of file diff --git a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/test/user/SignInSpec.scala b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/test/user/SignInSpec.scala index 7774b7a136..b898b82317 100644 --- a/automation/src/test/scala/org/broadinstitute/dsde/firecloud/test/user/SignInSpec.scala +++ b/automation/src/test/scala/org/broadinstitute/dsde/firecloud/test/user/SignInSpec.scala @@ -3,6 +3,7 @@ package org.broadinstitute.dsde.firecloud.test.user import org.broadinstitute.dsde.firecloud.fixture.UserFixtures import org.broadinstitute.dsde.firecloud.page.user.SignInPage import org.broadinstitute.dsde.firecloud.FireCloudConfig.{FireCloud, Users} +import org.broadinstitute.dsde.workbench.config.Credentials import org.broadinstitute.dsde.workbench.fixture.{FailedTestRetryable, TestReporterFixture} import org.broadinstitute.dsde.workbench.service.test.WebBrowserSpec import org.broadinstitute.dsde.workbench.service.util.Tags @@ -23,7 +24,7 @@ class SignInSpec extends FreeSpec with WebBrowserSpec with FailedTestRetryable w "A user with a registered account" - { "should be able to log in and out as different users in same browser" taggedAs (Retryable, Tags.SignInRealTest) ignore { - val user1 = Users.Students.getUserCredential("harry") + val user1: Credentials = Users.Students.getUserCredential("harry") withWebDriver { implicit driver => withSignInReal(user1) { listPage => eventually { listPage.readUserEmail() shouldEqual user1.email }