-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
solution #398
base: master
Are you sure you want to change the base?
solution #398
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,37 @@ | ||
'use strict'; | ||
|
||
class Header { | ||
|
||
get logo() { | ||
return 'Conduit logo'; | ||
} | ||
}; | ||
|
||
class PageObject { | ||
constructor(url) { | ||
this.url = url; | ||
this.header = new Header(); | ||
} | ||
|
||
clickOnLogo() { | ||
return 'Click on the ' + this.header.logo; | ||
} | ||
}; | ||
|
||
class ArticlePage extends PageObject { | ||
constructor(url, slug) { | ||
super(url + slug); | ||
} | ||
|
||
get commentButton() { | ||
return '[Publish comment] button'; | ||
} | ||
|
||
clickOnCommentButton() { | ||
return 'Click on the ' + this.commentButton; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using template literals for string concatenation to improve readability: |
||
} | ||
assertPageOpened() { | ||
return 'The ' + this.url + ' is opened'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using template literals for string concatenation to improve readability: |
||
} | ||
}; | ||
|
||
module.exports = { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using template literals for string concatenation to improve readability:
return
Click on the ${this.header.logo};