Skip to content

Commit

Permalink
fix login-screen.spec error message, organize e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ruddell committed Sep 23, 2019
1 parent baf5ca2 commit 93a4d85
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Utils = require('./utils')
const Utils = require('../utils')

describe('Change Password Screen Tests', () => {
before(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Utils = require('./utils')
const Utils = require('../utils')

describe('Login Screen Tests', () => {
beforeEach(async () => {
Expand All @@ -16,7 +16,7 @@ describe('Login Screen Tests', () => {
await element(by.id('loginScreenUsername')).replaceText('invalid')
await element(by.id('loginScreenPassword')).replaceText('invalid')
await element(by.id('loginScreenLoginButton')).tap()
await expect(element(by.text('Invalid login'))).toBeVisible()
await expect(element(by.text('Bad credentials'))).toBeVisible()
await element(by.text('OK')).tap()
await element(by.id('loginScreenCancelButton')).tap()
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Utils = require('./utils')
const Utils = require('../utils')

describe('Settings Screen Tests', () => {
before(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Utils = require('./utils')
const Utils = require('../utils')

describe('Chat Screen Tests', () => {
before(async () => {
Expand Down
6 changes: 2 additions & 4 deletions src/boilerplate/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@ module.exports = async function (context, props, jhipsterConfig) {
})
// remove account files if oauth is used
if (props.authType === 'oauth2') {
await filesystem.remove(`${process.cwd()}/e2e/login-screen.spec.js`)
await filesystem.remove(`${process.cwd()}/e2e/settings-screen.spec.js`)
await filesystem.remove(`${process.cwd()}/e2e/change-password-screen.spec.js`)
await filesystem.remove(`${process.cwd()}/e2e/account`)
}
// remove websocket ChatScreen test if unused
if (!props.websockets) {
await filesystem.remove(`${process.cwd()}/e2e/chat-screen.spec.js`)
await filesystem.remove(`${process.cwd()}/e2e/websockets`)
}
}
spinner.stop()
Expand Down

0 comments on commit 93a4d85

Please sign in to comment.