Skip to content

Commit

Permalink
adding test for refresh button
Browse files Browse the repository at this point in the history
  • Loading branch information
nirajacharya2 committed Apr 24, 2024
1 parent a956484 commit d6935d1
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion tests/behat/uploadFileToMoodle.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: upload the resource in oCIS to moodle
And I log in to ocis as "admin"

Scenario: upload a file from the personal drive of ocis to moodle
And user "admin" has uploaded a file inside space "Personal" with content "some content" to "/testfile.txt"
Given user "admin" has uploaded a file inside space "Personal" with content "some content" to "/testfile.txt"
When I click on "//*[@class='fp-filename-field']/p[text()='Personal']" "xpath_element"
And I click on "//*[@class='fp-filename-field']/p[text()='testfile.txt']" "xpath_element"
And I click on "Select this file" "button"
Expand All @@ -43,3 +43,33 @@ Feature: upload the resource in oCIS to moodle
And I click on "//*[@class='fp-filename-field']/p[text()='testfile.txt']" "xpath_element"
And I click on "Select this file" "button"
Then I should see "testfile.txt"

Scenario: click refresh button to get latest resource on Personal drive
Given I click on "Personal" "link"
And user "admin" has uploaded a file inside space "Personal" with content "some content" to "testfile.txt"
And I should not see "testfile.txt"
When I refresh the file-picker

Scenario: click refresh button to get latest resource on Project drive
Given "admin" has created the project space "ProjectMoodle"
And I should not see "ProjectMoodle"
When I refresh the file-picker
Then I should see "ProjectMoodle"
And I click on "ProjectMoodle" "link"
And user "admin" has uploaded a file inside space "ProjectMoodle" with content "some content" to "testfile.txt"
And I should not see "testfile.txt"
When I refresh the file-picker
Then I should see "testfile.txt"

Scenario: click refresh button to get latest resource of Share drive
Given I click on "Shares" "link"
And user "Brian" has been created with default attributes
And user "Brian" has uploaded a file inside space "Personal" with content "some content" to "/testfile.txt"
And user "Brian" has sent the following share invitation:
| resource | testfile.txt |
| space | Personal |
| sharee | Admin |
| shareType | user |
Then I should not see "testfile.txt"
When I refresh the file-picker
Then I should see "testfile.txt"

0 comments on commit d6935d1

Please sign in to comment.