Skip to content

Commit

Permalink
WEBUI-995: add functional test for activity tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranit-Sotre committed Jan 13, 2023
1 parent 771d704 commit ec6cc20
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ftest/features/activity.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Feature: Create Picture and validate activity feed

Background:
Given I login as "Administrator"
And I have a Workspace document
And I browse to the document

Scenario: Validate entries in activity tab
When I click the Create Document button
And I select File from the Document Type menu
And I create a document with the following properties:
| name | value |
| title | my title |
| description | my description |
| content | sample.png |
| nature | Application |
| subjects | Gastronomy,Comics |
Then I see the File page
When I reload the page
And I can see "created the document" in the Activity feed
Then I click the blob download button
And I reload the page
And I can see "downloaded the document" in the Activity feed
4 changes: 4 additions & 0 deletions packages/nuxeo-web-ui-ftest/features/step_definitions/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ Then('I can see {string} in the Activity feed', function(activity) {
this.ui.activityFeed.waitForVisible();
this.ui.activityFeed.getActivity(activity).waitForVisible().should.be.true;
});
Then('I click the blob download button', function() {
const page = this.ui.browser.documentPage(this.doc.type);
page.downloadButton.click();
});
4 changes: 4 additions & 0 deletions packages/nuxeo-web-ui-ftest/pages/ui/browser/document_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export default class DocumentPage extends BasePage {
return this.el.element('nuxeo-preview-button');
}

get downloadButton() {
return this.el.$('nuxeo-download-button');
}

get versionInfoBar() {
this.el.waitForExist('#versionInfoBar');
this.el.waitForVisible('#versionInfoBar');
Expand Down

0 comments on commit ec6cc20

Please sign in to comment.