mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -04:00
fix: FilterBox select lose focus when focused (#12114)
This commit is contained in:
parent
1cf4a1b3ea
commit
af130ea5e9
@ -65,27 +65,21 @@ describe('Dashboard filter', () => {
|
|||||||
cy.wait(aliases);
|
cy.wait(aliases);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
xit('should apply filter', () => {
|
|
||||||
cy.get('.Select__control input[type=text]')
|
it('should apply filter', () => {
|
||||||
.first()
|
cy.get('.Select__placeholder:first').click();
|
||||||
.should('be.visible')
|
|
||||||
.focus();
|
|
||||||
|
|
||||||
// should open the filter indicator
|
// should open the filter indicator
|
||||||
cy.get('[data-test="filter"]')
|
cy.get('svg[data-test="filter"]')
|
||||||
.should('be.visible', { timeout: 10000 })
|
.should('be.visible')
|
||||||
.should(nodes => {
|
.should(nodes => {
|
||||||
expect(nodes).to.have.length(9); // this part was not working, xit-ed
|
expect(nodes).to.have.length(9);
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.get('[data-test="chart-container"]').find('svg').should('be.visible');
|
cy.get('.Select__control:first input[type=text]').type('So', {
|
||||||
|
force: true,
|
||||||
cy.get('.Select__control input[type=text]').first().focus().blur();
|
delay: 100,
|
||||||
|
});
|
||||||
cy.get('.Select__control input[type=text]')
|
|
||||||
.first()
|
|
||||||
.focus()
|
|
||||||
.type('So', { force: true, delay: 100 });
|
|
||||||
|
|
||||||
cy.get('.Select__menu').first().contains('South Asia').click();
|
cy.get('.Select__menu').first().contains('South Asia').click();
|
||||||
|
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
"eslint-plugin-cypress": "^2.11.1"
|
"eslint-plugin-cypress": "^2.11.1"
|
||||||
},
|
},
|
||||||
"nyc": {
|
"nyc": {
|
||||||
"reporter": ["html", "json"]
|
"reporter": [
|
||||||
|
"html",
|
||||||
|
"json"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ const Styles = styled.div`
|
|||||||
overflow: visible;
|
overflow: visible;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
class FilterBox extends React.Component {
|
class FilterBox extends React.PureComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -424,7 +424,6 @@ class FilterBox extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { instantFiltering } = this.props;
|
const { instantFiltering } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Styles>
|
<Styles>
|
||||||
{this.renderDateFilter()}
|
{this.renderDateFilter()}
|
||||||
|
Loading…
Reference in New Issue
Block a user