Skip to content

Commit 2f2c8b8

Browse files
committed
added a base class for the page object framework
1 parent 9dba9b1 commit 2f2c8b8

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

cypress/page-objects/BasePage.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
export default class BasePage {
2+
static pause(ms) {
3+
cy.wait(ms)
4+
}
5+
6+
static logInfo(message) {
7+
cy.log(message)
8+
}
9+
10+
static setMobileViewport() {
11+
cy.viewport('iphone-x')
12+
}
13+
14+
static setTableViewport() {
15+
cy.viewport('ipad-2')
16+
}
17+
18+
static setDesktopViewport() {
19+
cy.viewport('macbook-15')
20+
}
21+
22+
static setLargeDesktopViewport() {
23+
cy.viewport(1980, 1080)
24+
}
25+
}

0 commit comments

Comments
 (0)