|
1 | 1 | 'use strict';
|
2 | 2 |
|
3 | 3 | const h = require('../helpers.js');
|
4 |
| -const inputs = require('../helpers/inputs'); |
5 | 4 | const Page = require('./page').Page;
|
6 |
| - |
7 |
| -let AddTemplateModal = function(project) { |
8 |
| - this.project = project; |
9 |
| - this.modal = element(by.css('.modal-dialog')); |
10 |
| - this.checkboxes = this.modal.all(by.css('input[type="checkbox"]')); |
11 |
| - this.processBox = this.checkboxes.get(0); |
12 |
| - this.saveBox = this.checkboxes.get(1); |
13 |
| - this.continue = this.modal.element(by.cssContainingText('.btn-primary', 'Continue')); |
14 |
| - this.cancel = this.modal.element(by.cssContainingText('.btn-default', 'Cancel')); |
15 |
| - this.process = function() { |
16 |
| - inputs.check(this.processBox); |
17 |
| - inputs.uncheck(this.saveBox); |
18 |
| - this.continue.click(); |
19 |
| - return browser.sleep(500).then(function() { |
20 |
| - // lazy require to avoid potential of circular dependencies |
21 |
| - var CreateFromTemplatePage = require('./createFromTemplate').CreateFromTemplatePage; |
22 |
| - return new CreateFromTemplatePage(this.project); |
23 |
| - }.bind(this)); |
24 |
| - }; |
25 |
| - this.save = function() { |
26 |
| - inputs.uncheck(this.processBox); |
27 |
| - inputs.check(this.saveBox); |
28 |
| - this.continue.click(); |
29 |
| - return browser.sleep(500).then(() => { |
30 |
| - // lazy require |
31 |
| - var OverviewPage = require('./overview').OverviewPage; |
32 |
| - return new OverviewPage(this.project); // automatic redirect |
33 |
| - }); |
34 |
| - }; |
35 |
| -}; |
| 5 | +const AddTemplateModal = require('./modals/addTemplateModal').AddTemplateModal; |
36 | 6 |
|
37 | 7 | class CatalogPage extends Page {
|
38 | 8 | constructor(project, menu) {
|
|
0 commit comments