File tree Expand file tree Collapse file tree 4 files changed +20
-20
lines changed Expand file tree Collapse file tree 4 files changed +20
-20
lines changed Original file line number Diff line number Diff line change
1
+ const BasePage = require ( './base' )
2
+
1
3
const HeaderComponent = require ( './components/header' )
2
4
const DestinationComponent = require ( './components/destination' )
3
5
4
6
const randomNumberBewtweenOneAnd = require ( '../utils/randomNumberBewtweenOneAndN' )
5
7
6
- class Destination {
8
+ class Destination extends BasePage {
7
9
constructor ( ) {
10
+ super ( )
8
11
this . header = new HeaderComponent ( )
9
12
this . self = new DestinationComponent ( )
10
- }
11
-
12
- visit ( ) {
13
- browser . get ( `/destinations/${ randomNumberBewtweenOneAnd ( 15 ) } ` )
13
+ this . relativeUrl = `/destinations/${ randomNumberBewtweenOneAnd ( 15 ) } `
14
14
}
15
15
}
16
16
Original file line number Diff line number Diff line change
1
+ const BasePage = require ( './base' )
2
+
1
3
const HeaderComponent = require ( './components/header' )
2
4
const DestinationComponent = require ( './components/destination' )
3
5
const FormComponent = require ( './components/form' )
4
6
5
7
const randomNumberBewtweenOneAnd = require ( '../utils/randomNumberBewtweenOneAndN' )
6
8
7
- class EditDestination {
9
+ class EditDestination extends BasePage {
8
10
constructor ( ) {
11
+ super ( )
9
12
this . header = new HeaderComponent ( )
10
13
this . self = new DestinationComponent ( )
11
14
this . form = new FormComponent ( )
12
- }
13
-
14
- visit ( ) {
15
- browser . get ( `/destinations/${ randomNumberBewtweenOneAnd ( 15 ) } /edit` )
15
+ this . relativeUrl = `/destinations/${ randomNumberBewtweenOneAnd ( 15 ) } /edit`
16
16
}
17
17
}
18
18
Original file line number Diff line number Diff line change
1
+ const BasePage = require ( './base' )
2
+
1
3
const HeaderComponent = require ( './components/header' )
2
4
const TagsComponent = require ( './components/tags' )
3
5
4
- class Home {
6
+ class Home extends BasePage {
5
7
constructor ( ) {
8
+ super ( )
6
9
this . header = new HeaderComponent ( )
7
10
this . tags = new TagsComponent ( )
8
- }
9
-
10
- visit ( ) {
11
- browser . get ( '/' )
11
+ this . relativeUrl = '/'
12
12
}
13
13
}
14
14
Original file line number Diff line number Diff line change
1
+ const BasePage = require ( './base' )
2
+
1
3
const HeaderComponent = require ( './components/header' )
2
4
const DestinationsComponent = require ( './components/destinations' )
3
5
4
6
const randomNumberBewtweenOneAnd = require ( '../utils/randomNumberBewtweenOneAndN' )
5
7
6
- class Tag {
8
+ class Tag extends BasePage {
7
9
constructor ( ) {
10
+ super ( )
8
11
this . header = new HeaderComponent ( )
9
12
this . destinations = new DestinationsComponent ( )
10
- }
11
-
12
- visit ( ) {
13
- browser . get ( `/tags/${ randomNumberBewtweenOneAnd ( 5 ) } ` )
13
+ this . relativeUrl = `/tags/${ randomNumberBewtweenOneAnd ( 5 ) } `
14
14
}
15
15
}
16
16
You can’t perform that action at this time.
0 commit comments