Skip to content

Commit

Permalink
test(webui): fxi scenario steps
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan authored and nirajacharya2 committed Mar 25, 2024
1 parent 4f647ee commit 8de5584
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -321,28 +321,28 @@ config = {
}

def main(ctx):
before = beforePipelines(ctx)
#before = beforePipelines(ctx)

coverageTests = coveragePipelines(ctx)
if (coverageTests == False):
print("Errors detected in coveragePipelines. Review messages above.")
return []

dependsOn(before, coverageTests)
#dependsOn(before, coverageTests)

nonCoverageTests = nonCoveragePipelines(ctx)
if (nonCoverageTests == False):
print("Errors detected in nonCoveragePipelines. Review messages above.")
return []

dependsOn(before, nonCoverageTests)
#dependsOn(before, nonCoverageTests)

stages = stagePipelines(ctx)
if (stages == False):
print("Errors detected. Review messages above.")
return []

dependsOn(before, stages)
#dependsOn(before, stages)

if (coverageTests == []):
afterCoverageTests = []
Expand All @@ -353,7 +353,7 @@ def main(ctx):
after = afterPipelines(ctx)
dependsOn(afterCoverageTests + nonCoverageTests + stages, after)

return before + coverageTests + afterCoverageTests + nonCoverageTests + stages + after
return coverageTests + afterCoverageTests + nonCoverageTests + stages + after

def beforePipelines(ctx):
return validateDailyTarballBuild() + codestyle(ctx) + jscodestyle(ctx) + phpstan(ctx) + phan(ctx) + phplint(ctx) + checkStarlark()
Expand Down Expand Up @@ -1896,7 +1896,7 @@ def installTestrunner(ctx, phpVersion, useBundledApp):
"image": OC_CI_PHP % phpVersion,
"commands": [
"mkdir /tmp/testrunner",
"git clone -b master --depth=1 https://github.com/owncloud/core.git /tmp/testrunner",
"git clone -b night --depth=1 https://github.com/nirajacharya2/core /tmp/testrunner",
"rsync -aIX /tmp/testrunner %s" % dir["base"],
] + ([
"cp -r %s/apps/%s %s/apps/" % (dir["testrunner"], ctx.repo.name, dir["server"]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ Feature: encrypt files using master keys
So that I can use a common key to encrypt files of all user


Scenario: user cannot access their file after recreating master key with re-login
Given user "Alice" has been created with default attributes and small skeleton files
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/lorem.txt"
Scenario: user cannot access their file after recreating master key without re-login
Given user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/somefile.txt"
And user "Alice" has logged in using the webUI
When the administrator successfully recreates the encryption masterkey using the occ command
Then the command output should contain the text 'Note: All users are required to relogin.'
When the user opens file "lorem.txt" expecting to fail using the webUI
When the user opens file "somefile.txt" expecting to fail using the webUI
Then the user should be redirected to the general exception webUI page with the title "%productname%"
And the title of the exception on general exception webUI page should be "Forbidden"
And a message should be displayed on the general exception webUI page containing "Encryption not ready"


Scenario: user can access their file after recreating master key with re-login
Given user "Alice" has been created with default attributes and small skeleton files
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/lorem.txt"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/somefile.txt"
And user "Alice" has logged in using the webUI
When the administrator successfully recreates the encryption masterkey using the occ command
And the user re-logs in as "Alice" using the webUI
And the user opens file "lorem.txt" using the webUI
And the user opens file "somefile.txt" using the webUI
Then no dialog should be displayed on the webUI
And the user should be redirected to a webUI page with the title "Files - %productname%"

0 comments on commit 8de5584

Please sign in to comment.