This repository was archived by the owner on Nov 1, 2019. It is now read-only.
<Dialog /> - Basic Implementation - #494
Open
liorzisman wants to merge 98 commits into
Open
Conversation
…heme to use proper vars
Zombiefruit
suggested changes
Oct 22, 2017
| .header { | ||
| border-bottom: 1px solid black; | ||
| width: calc(100% + 10px); | ||
| margin-left: -5px; |
Contributor
There was a problem hiding this comment.
Maybe change all these 5 pixel distances into a variable if they're connected... or try to refactor so that they're unnecessary, if possible.
|
|
||
| afterEach(() => clientRenderer.cleanup()); | ||
|
|
||
| it('opens the dialog upon extra button click, and closes it upon clicking any of the buttons', async () => { |
Contributor
There was a problem hiding this comment.
upon extra button click
This wording could maybe be more clear.
JoMarton
reviewed
Oct 23, 2017
| } | ||
|
|
||
| private getDialogElement(elem: string): Element { | ||
| return this.select(this.root.getAttribute('data-automation-id')!, elem); |
Contributor
There was a problem hiding this comment.
It seems to me like if you're fetching an element from the MODAL content you should rely on the modal driver to do it.
|
|
||
| afterEach(() => clientRenderer.cleanup()); | ||
|
|
||
| it('opens the dialog upon extra button click, and closes it upon clicking any of the buttons', async () => { |
| return this.getDialogElement('DIALOG_TITLE'); | ||
| } | ||
|
|
||
| public getButton(type: DialogButtonType) { |
|
|
||
| await waitForDom(() => expect(dialogDemo.dialog).to.be.present()); | ||
|
|
||
| (dialogDriver.getButton('CLOSE') as HTMLButtonElement).click(); |
Contributor
There was a problem hiding this comment.
I think that the casting will not be required if the getButton method was typed
| isOpen: false, | ||
| onCancel: noop, | ||
| onOk: noop, | ||
| title: 'Dialog' |
Contributor
There was a problem hiding this comment.
I would avoid a default here
| return this.modalDriver.children[0]; | ||
| } | ||
|
|
||
| public get title(): Element { |
Contributor
There was a problem hiding this comment.
I would expect this method to return string (the title text itself)
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keep in mind driver creation will be done in the next phase of development as some requirements are currently missing