Skip to content

Commit

Permalink
[gui-tests][full-ci] assert text contains (#11565)
Browse files Browse the repository at this point in the history
* test(gui): assert text contains

* test(gui): separate ambigious steps
  • Loading branch information
saw-jan authored Mar 27, 2024
1 parent a222197 commit 32670a7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions test/gui/shared/steps/account_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ def step(context):
AccountConnectionWizard.acceptCertificate()


@Then('error "|any|" should be displayed')
@Then('the error "|any|" should be displayed in the account connection wizard')
def step(context, errorMsg):
test.compare(AccountConnectionWizard.getErrorMessage(), errorMsg)
test.verify(errorMsg in AccountConnectionWizard.getErrorMessage())


@When('the user adds the server "|any|"')
Expand Down
2 changes: 1 addition & 1 deletion test/gui/shared/steps/sharing_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def step(context, permissions, user, resource):
test.compare(shareChecked, False)


@Then('the error "|any|" should be displayed')
@Then('the error "|any|" should be displayed in the sharing dialog')
def step(context, errorMessage):
test.compare(SharingDialog.getErrorText(), errorMessage)

Expand Down
2 changes: 1 addition & 1 deletion test/gui/tst_addAccount/test.feature
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Feature: adding accounts
When the user adds the following wrong user credentials:
| user | Alice |
| password | 12345 |
Then error "Invalid credentials" should be displayed
Then the error "Invalid credentials" should be displayed in the account connection wizard


Scenario: Adding account with self signed certificate for the first time
Expand Down
12 changes: 6 additions & 6 deletions test/gui/tst_sharing/test.feature
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ Feature: Sharing
And user "Alice" has set up a client with default settings
When the user opens the sharing dialog of "textfile.txt" using the client-UI
And the user searches for collaborator "Brian Murphy" using the client-UI
Then the error "No results for 'Brian Murphy'" should be displayed
Then the error "No results for 'Brian Murphy'" should be displayed in the sharing dialog
When the user closes the sharing dialog
And the user opens the sharing dialog of "SharedFolder" using the client-UI
And the user searches for collaborator "Brian Murphy" using the client-UI
Then the error "No results for 'Brian Murphy'" should be displayed
Then the error "No results for 'Brian Murphy'" should be displayed in the sharing dialog
And the user closes the sharing dialog


Expand All @@ -92,11 +92,11 @@ Feature: Sharing
And user "Alice" has set up a client with default settings
When the user opens the sharing dialog of "textfile.txt" using the client-UI
And the user selects "Alice Hansen" as collaborator of resource "textfile.txt" using the client-UI
Then the error "Can't share with yourself" should be displayed
Then the error "Can't share with yourself" should be displayed in the sharing dialog
When the user closes the sharing dialog
And the user opens the sharing dialog of "OwnFolder" using the client-UI
And the user selects "Alice Hansen" as collaborator of resource "OwnFolder" using the client-UI
Then the error "Can't share with yourself" should be displayed
Then the error "Can't share with yourself" should be displayed in the sharing dialog
And the user closes the sharing dialog


Expand Down Expand Up @@ -200,10 +200,10 @@ Feature: Sharing
And user "Alice" has shared folder "Folder" on the server with group "grp1" with "read, share, update" permission
And user "Brian" has set up a client with default settings
When the user tires to share resource "textfile0.txt" with the group "grp1" using the client-UI
Then the error "Path already shared with this group" should be displayed
Then the error "Path already shared with this group" should be displayed in the sharing dialog
When the user closes the sharing dialog
And the user tires to share resource "Folder" with the group "grp1" using the client-UI
Then the error "Path already shared with this group" should be displayed
Then the error "Path already shared with this group" should be displayed in the sharing dialog
And the user closes the sharing dialog


Expand Down

0 comments on commit 32670a7

Please sign in to comment.