web icon indicating copy to clipboard operation
web copied to clipboard

Getting bearer token for e2e tests using api

Open ScharfViktor opened this issue 6 months ago • 1 comments

related: https://github.com/owncloud/ocis/issues/9648#issuecomment-2259937299

how implement now:

  • And "Alice" logs in -> we get token from response POST /konnect/v1/token and set it
  • And "Alice" creates 55 files in personal space using API - given step. we using token for API request
  • And "Alice" opens the "files" app -> continuing our e2e test. We do this action to refresh web (get the data we created with the api)

how we want to do

  • Given "Alice" creates 55 files in personal space using API - without first login. Getting token using api. Already implemented here: https://github.com/owncloud/cdperf/blob/main/packages/k6-tdk/src/auth/kopano.ts
  • And "Alice" opens the "files" app no needed. please delete from tests

features/navigation/personalSpacePagination.feature:8 example

Given "Alice" creates 55 files in personal space using API
And "Alice" logs in
When "Alice" navigates to page "2" of the personal space files view
Then "Alice" should see the text "111 items with 1 kB in total (56 files including 1 hidden, 55 folders)" at the footer of the page
.....

ScharfViktor avatar Jul 31 '24 08:07 ScharfViktor