Skip to content

fix(pageObject): Not work when PageObject as class #1896

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

Merged
merged 7 commits into from
Sep 24, 2019

Conversation

Vorobeyko
Copy link
Contributor

@Vorobeyko Vorobeyko commented Sep 23, 2019

PageObject file:

class PageObject {
  type (s) {
    console.log(s)
  }

  purgeDomains (s) {
    console.log('purgeDomains')
    console.log(s)
  }
}

module.exports = new PageObject()

Test file:

Feature('asdas')

Scenario('qw', async (I, page) => {
  await page.type('asda')
})

Result:

asdas --
  ✖ qw in 2ms

-- FAILURES:

  1) asdas
       qw:
     page.type is not a function
  

@@ -8,7 +8,7 @@ exports.config = {
page: './pages/page.js',
notpage: './pages/notpage.js',
arraypage: './pages/arraypage.js',

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing spaces not allowed no-trailing-spaces

@codeceptjs codeceptjs deleted a comment Sep 24, 2019
@codeceptjs codeceptjs deleted a comment Sep 24, 2019
@codeceptjs codeceptjs deleted a comment Sep 24, 2019
@codeceptjs codeceptjs deleted a comment Sep 24, 2019
@codeceptjs codeceptjs deleted a comment Sep 24, 2019
@codeceptjs codeceptjs deleted a comment Sep 24, 2019
@DavertMik
Copy link
Contributor

Thank you!

@DavertMik DavertMik merged commit 783e473 into codeceptjs:master Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants