-
Notifications
You must be signed in to change notification settings - Fork 461
Expand file tree
/
Copy pathfilePathTree.js
More file actions
67 lines (63 loc) · 2.34 KB
/
filePathTree.js
File metadata and controls
67 lines (63 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// -------------------------------------------------------------------------
// Part of the CodeChecker project, under the Apache License v2.0 with
// LLVM Exceptions. See LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// -------------------------------------------------------------------------
// Page object for the file-path filter's tree-based menu content
// (FilePathFilter.vue). Shares the same overall layout as the report page
// (login is performed via browser.page.login() in the spec), but only
// exposes the tree-specific elements/sections.
const commands = {
waitForProgressBarNotPresent() {
this.pause(500, () => {
this.waitForElementNotPresent("@progressBar");
});
return this;
},
openFilePathFilterMenu() {
const filterSection = this.section.filePathFilter;
filterSection.click("@expansionBtn");
filterSection.click("@settings");
this.expect.section("@filePathTreeMenu").to.be.visible.before(5000);
return this;
}
};
module.exports = {
url: function() {
return this.api.launchUrl + "/e2e/reports?review-status=Unreviewed&"
+ "review-status=Confirmed%20bug&detection-status=New&"
+ "detection-status=Reopened&detection-status=Unresolved";
},
commands: [ commands ],
elements: {
page: ".v-data-table",
progressBar: ".v-data-table__progress"
},
sections: {
filePathFilter: {
selector: "#filepath",
elements: {
expansionBtn: ".expansion-btn",
settings: ".settings-btn",
clearBtn: ".clear-btn",
selectedItems: ".selected-item"
}
},
filePathTreeMenu: {
// The settings-menu popup that hosts the file-path tree.
selector: ".settings-menu.menuable__content__active",
elements: {
searchInput: "header input[type='text']",
anywhereSwitch: ".v-input--switch",
tree: ".file-path-tree",
treeNode: ".file-path-tree .v-treeview-node",
treeRootNode: ".file-path-tree > .v-treeview-node",
treeNodeRoot: ".file-path-tree .v-treeview-node__root",
treeItemLabel: ".file-path-tree .tree-item-label",
treeCheckbox: ".file-path-tree .v-treeview-node__checkbox",
applyBtn: ".apply-btn",
clearAllBtn: ".clear-all-btn"
}
}
}
};