/basePage.ts Secret
Created
January 13, 2021 08:49
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
export default class Page{ | |
url: string | |
constructor (url:string) { | |
this.url = url | |
} | |
open(path: string){ | |
browser.url(path) | |
} | |
} |
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
import Page from './basePage' | |
class OffersPage extends Page { | |
constructor (){ | |
super('/our-offers/') | |
} | |
open() { | |
super.open(this.url) | |
} | |
method1 (){ | |
//somecode | |
} | |
method2 () { | |
//somecode | |
} | |
} | |
export {OffersPage} |
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
import {OffersPage} from '../pages/offers' | |
const Offers = new OffersPage() | |
describe('Scenario 1', () => { | |
it('should check TC#1', () => { | |
Offers.open() | |
//some other method calls and checks | |
}) | |
}) |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"sourceMap": true, | |
"module": "commonjs", | |
"target": "ES2017", | |
"resolveJsonModule": true, | |
"types": [ | |
"node", | |
"@wdio/sync", | |
"@wdio/mocha-framework", | |
"@wdio/selenium-standalone-service" | |
] | |
}, | |
"exclude": [ | |
"node_modules" | |
], | |
"include": [ | |
"./test/**/*" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment