-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UIU-754: Users App: Implement Pane header dropdown on Detail Records (#…
…638) * Implement pane header dropdown on detail records
- Loading branch information
1 parent
2cfe368
commit 5a71266
Showing
11 changed files
with
288 additions
and
18 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { | ||
interactor, | ||
clickable, | ||
text, | ||
isPresent, | ||
} from '@bigtest/interactor'; | ||
|
||
@interactor class HeaderDropdown { | ||
click = clickable('button'); | ||
} | ||
|
||
@interactor class HeaderDropdownMenu { | ||
clickCancel = clickable('[data-test-cancel-user-form-action]'); | ||
} | ||
|
||
@interactor class UserFormPage { | ||
isLoaded = isPresent('[class*=paneTitleLabel---]'); | ||
|
||
whenLoaded() { | ||
return this.when(() => this.isLoaded); | ||
} | ||
|
||
title = text('[class*=paneTitleLabel---]'); | ||
headerDropdown = new HeaderDropdown('[class*=paneHeaderCenterInner---] [class*=dropdown---]'); | ||
headerDropdownMenu = new HeaderDropdownMenu(); | ||
} | ||
|
||
export default new UserFormPage('[data-test-form-page]'); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { | ||
interactor, | ||
clickable, | ||
text, | ||
} from '@bigtest/interactor'; | ||
|
||
@interactor class HeaderDropdown { | ||
click = clickable('button'); | ||
} | ||
|
||
@interactor class HeaderDropdownMenu { | ||
clickEdit = clickable('[data-test-user-instance-edit-action]'); | ||
} | ||
|
||
@interactor class InstanceViewPage { | ||
title = text('[data-test-header-title]'); | ||
headerDropdown = new HeaderDropdown('[class*=paneHeaderCenterInner---] [class*=dropdown---]'); | ||
headerDropdownMenu = new HeaderDropdownMenu(); | ||
} | ||
|
||
export default new InstanceViewPage('[data-test-instance-details]'); |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { | ||
beforeEach, | ||
describe, | ||
it, | ||
} from '@bigtest/mocha'; | ||
import { expect } from 'chai'; | ||
|
||
import setupApplication from '../helpers/setup-application'; | ||
import UserFormPage from '../interactors/user-form-page'; | ||
import UsersInteractor from '../interactors/users'; | ||
|
||
describe('ItemCreatePage', () => { | ||
setupApplication(); | ||
|
||
const users = new UsersInteractor(); | ||
|
||
beforeEach(async function () { | ||
this.visit('/users?layer=create'); | ||
}); | ||
|
||
describe('visiting the create user page', () => { | ||
it('displays the title in the pane header', () => { | ||
expect(UserFormPage.title).to.equal('Create User'); | ||
}); | ||
|
||
describe('pane header menu', () => { | ||
beforeEach(async () => { | ||
await UserFormPage.headerDropdown.click(); | ||
}); | ||
|
||
describe('clicking on cancel', () => { | ||
beforeEach(async () => { | ||
await UserFormPage.headerDropdownMenu.clickCancel(); | ||
}); | ||
|
||
it('should redirect to view users page after click', () => { | ||
expect(users.$root).to.exist; | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.