Skip to content
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

Old versions of tests being installed? #69

Open
reallymello opened this issue Nov 11, 2022 · 1 comment
Open

Old versions of tests being installed? #69

reallymello opened this issue Nov 11, 2022 · 1 comment

Comments

@reallymello
Copy link
Contributor

reallymello commented Nov 11, 2022

I installed nightwatch 2.5 globally and ran npm init nightwatch
I selected to use the Nightwatch test runner and create a TypeScript project with Chrome as my browser.
When I ran npm run test I noticed I was getting .title is deprecated warnings which led me to notice the scaffolder created

\tests\nightwatch-examples
--github.ts
--google.ts

and the top of github.ts it has the old version of the test which does not appear to match what is in create-nightwatch currently in the /asserts/ts-examples dir

// outdated
const home: NightwatchTests = {
  'Github Title test': () => {
    browser
      .url('https://github.com')
      .assert.title('GitHub: Where the world builds software · GitHub');
  },
// what should be there according to what is on https://github.com/nightwatchjs/create-nightwatch/tree/main/assets/ts-examples
const home: NightwatchTests = {
  'Github Title test': () => {
    browser
      .url('https://github.com')
      .assert.titleEquals('GitHub: Where the world builds software · GitHub');
  },

Is nightwatch using an old version of create-nightwatch for scaffolding?

@reallymello
Copy link
Contributor Author

Fixed by using npm init nightwatch@latest instead of npm init nightwatch so init was using a cached version. I thought it would be tied to the version of Nightwatch, the latest as of writing (2.5), installed on the computer.

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

No branches or pull requests

1 participant