-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: experiment list page models and sample test [INFENG-451] (#9139)
- Loading branch information
1 parent
fd45ed8
commit 2f874b9
Showing
32 changed files
with
634 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { SplitPane } from 'e2e/models/hew/SplitPane'; | ||
|
||
/** | ||
* Returns a representation of the ComparisonView component. | ||
* This constructor represents the contents in src/components/ComparisonView.tsx. | ||
* @param {object} obj | ||
* @param {CanBeParent} obj.parent - The parent used to locate this ComparisonView | ||
* @param {string} [obj.selector] - Used instead of `defaultSelector` | ||
*/ | ||
export class ComparisonView extends SplitPane { | ||
// TODO everything in here | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { BaseReactFragment } from 'e2e/models/BaseComponent'; | ||
import { Pivot } from 'e2e/models/hew/Pivot'; | ||
|
||
/** | ||
* Returns a representation of the DynamicTabs component. | ||
* This constructor represents the contents in src/components/DynamicTabs.tsx. | ||
* @param {object} obj | ||
* @param {CanBeParent} obj.parent - The parent used to locate this DynamicTabs | ||
*/ | ||
export class DynamicTabs extends BaseReactFragment { | ||
readonly pivot = new Pivot({ parent: this }); | ||
} |
13 changes: 13 additions & 0 deletions
13
webui/react/src/e2e/models/components/ExperimentActionDropdown.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Dropdown } from 'e2e/models/hew/Dropdown'; | ||
|
||
/** | ||
* Returns the representation of the ActionDropdown menu defined by the User Admin page. | ||
* This constructor represents the InteractiveTable in src/components/ExperimentActionDropdown.tsx. | ||
* @param {object} obj | ||
* @param {CanBeParent} obj.parent - The parent used to locate this ExperimentActionDropdown | ||
* @param {string} obj.selector - Used as a selector uesd to locate this object | ||
*/ | ||
export class ExperimentActionDropdown extends Dropdown { | ||
// TODO where is this thing? <Button icon={<Icon name="overflow-vertical" size="small" title="Action menu" />} /> | ||
// TODO I'm assuming it's new tab, new window, copy value, etc | ||
} |
39 changes: 39 additions & 0 deletions
39
webui/react/src/e2e/models/components/F_ExperiementList.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { BaseReactFragment } from 'e2e/models/BaseComponent'; | ||
import { ComparisonView } from 'e2e/models/components/ComparisonView'; | ||
import { ExperimentActionDropdown } from 'e2e/models/components/ExperimentActionDropdown'; | ||
import { TableActionBar } from 'e2e/models/components/TableActionBar'; | ||
import { DataGrid, HeadRow, Row, RowArgs } from 'e2e/models/hew/DataGrid'; | ||
import { Pagination } from 'e2e/models/hew/Pagination'; | ||
|
||
/** | ||
* Returns a representation of the F_ExperiementList component. | ||
* This constructor represents the contents in src/components/F_ExperiementList.tsx. | ||
* @param {object} obj | ||
* @param {CanBeParent} obj.parent - The parent used to locate this F_ExperiementList | ||
*/ | ||
export class F_ExperiementList extends BaseReactFragment { | ||
readonly tableActionBar: TableActionBar = new TableActionBar({ parent: this }); | ||
// TODO no experiments | ||
// TODO no filtered experiments | ||
// TODO error | ||
readonly comparisonView: ComparisonView = new ComparisonView({ parent: this }); | ||
readonly dataGrid: DataGrid<ExperimentRow, ExperimentHeadRow> = new DataGrid({ | ||
headRowType: ExperimentHeadRow, | ||
parent: this.comparisonView.initial, | ||
rowType: ExperimentRow, | ||
}); | ||
// There is no button which activates this dropdown. To display it, right-click the grid | ||
readonly experimentActionDropdown: ExperimentActionDropdown = new ExperimentActionDropdown({ | ||
parent: this.root, | ||
selector: '', | ||
}); | ||
readonly pagination: Pagination = new Pagination({ parent: this }); | ||
} | ||
|
||
class ExperimentHeadRow extends HeadRow {} | ||
class ExperimentRow extends Row<ExperimentRow, ExperimentHeadRow> { | ||
constructor(args: RowArgs<ExperimentRow, ExperimentHeadRow>) { | ||
super(args); | ||
this.columnPositions.set('ID', 50); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.