<commit_before>package org.broadinstitute.dsde.test.api

import akka.http.scaladsl.model.headers.OAuth2BearerToken
import org.broadinstitute.dsde.workbench.auth.{AuthToken, AuthTokenScopes}
import org.broadinstitute.dsde.workbench.config.{Credentials, ServiceTestConfig, UserPool}
import org.broadinstitute.dsde.workbench.fixture.{BillingFixtures, MethodFixtures, SubWorkflowFixtures}
import org.broadinstitute.dsde.workbench.model.{UserInfo, WorkbenchEmail, WorkbenchUserId}
import org.broadinstitute.dsde.workbench.service.BillingProject.BillingProjectRole
import org.broadinstitute.dsde.workbench.service.{Google, Orchestration, Rawls}
import org.scalatest.concurrent.Eventually
import org.scalatest.{FreeSpec, Matchers}


class BillingApiSpec extends FreeSpec with BillingFixtures with MethodFixtures with SubWorkflowFixtures with Matchers
  with Eventually {

  /**
    * This test does
    *
    * Given) a registered user who is project owner
    * When)  the project owner is authenticated with access token
    * Then)  the project owner can create a new Google billing project
    * and)   the project owner can add a second user to Google billing project
    * and)   the project owner can create a new workspace with Google billing project
    * and)   the project owner can create new method and method config
    * and)   the project owner can run an analysis and wait for complete successfully
    * and)   the project owner can delete method config
    * and)   the project owner can delete Google billing project
    *
    */
  "A user" - {<commit_msg>pre-rebase commit<commit_after>package org.broadinstitute.dsde.test.api

import akka.http.scaladsl.model.headers.OAuth2BearerToken
import org.broadinstitute.dsde.workbench.auth.{AuthToken, AuthTokenScopes}
import org.broadinstitute.dsde.workbench.config.{Credentials, ServiceTestConfig, UserPool}
import org.broadinstitute.dsde.workbench.fixture.{BillingFixtures, MethodFixtures, SubWorkflowFixtures}
import org.broadinstitute.dsde.workbench.model.{UserInfo, WorkbenchEmail, WorkbenchUserId}
import org.broadinstitute.dsde.workbench.service.BillingProject.BillingProjectRole
import org.broadinstitute.dsde.workbench.service.{Google, Orchestration, Rawls}
import org.scalatest.concurrent.Eventually
import org.scalatest.{FreeSpec, Matchers}


class BillingApiSpec extends FreeSpec with BillingFixtures with MethodFixtures with SubWorkflowFixtures
  with Matchers with Eventually {

  /**
    * This test does
    *
    * Given) a registered user who is project owner
    * When)  the project owner is authenticated with access token
    * Then)  the project owner can create a new Google billing project
    * and)   the project owner can add a second user to Google billing project
    * and)   the project owner can create a new workspace with Google billing project
    * and)   the project owner can create new method and method config
    * and)   the project owner can run an analysis and wait for complete successfully
    * and)   the project owner can delete method config
    * and)   the project owner can delete Google billing project
    *
    */
  
  "A user" - {
{'fraction_non_alphanumeric': 0.06454689984101748, 'fraction_numerical': 0.0006359300476947536, 'mean_word_length': 4.480836236933798, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '421970', 'n_tokens_mistral': 885, 'n_tokens_neox': 870, 'n_words': 289}