-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[RFR] Add End2End (E2E) tests #57
Conversation
e2e/tests/list.js
Outdated
}); | ||
}); | ||
|
||
describe.only('Filtering', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.only()
spotted
e2e/tests/list.js
Outdated
}); | ||
|
||
describe.only('Filtering', () => { | ||
it('should display by default `alwaysOn` filters', function* () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should display alwaysOn
filters by default
e2e/tests/list.js
Outdated
describe.only('Filtering', () => { | ||
it('should display by default `alwaysOn` filters', function* () { | ||
yield driver.wait(until.elementLocated(ListPage.elements.filter('q'))); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no assertion in this test
e2e/tests/list.js
Outdated
assert.equal(displayedPosts.length, 1); | ||
|
||
const title = yield displayedPosts[0].findElement(webdriver.By.css('[data-source="title"]')); | ||
assert.equal(yield title.getText(), 'Omnis voluptate enim similique est possimus'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why relying on a fixtures generator will be painful
e2e/tests/server.js
Outdated
@@ -0,0 +1,16 @@ | |||
'use strict'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use a simple node module for that, instead of rewriting the server ourselves?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using a very basic setup of express
here.
Do you mean using just http-server
for instance and launching it directly from command line? It would just move the "complexity" to the Makefile instead of this script IMO. :)
src/mui/list/Datagrid.js
Outdated
{ids.map(id => ( | ||
<TableRow key={id}> | ||
{React.Children.toArray(children).map(field => ( | ||
<TableRowColumn key={`${id}-${field.props.source}`}> | ||
<TableRowColumn key={`${id}-${field.props.source}`} data-source={field.props.source}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big fan of adding data attributes only for testing
Alternative approach suggested:
|
As explained in http://marmelab.com/blog/2017/01/04/e2e-selenium-no-server.html, my suggestion is feasible but not practical. We'll continue with your approach. I rebased the PR. |
Switching to RFR! |
creation/ edition /deletetestsdriver.sleep
Test when clicking on menu item, browser should remember last query filters