Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie committed Dec 18, 2020
1 parent 953aeb4 commit 6e82c0b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,20 @@ describe('Time range filter', () => {
cy.visitChartByParams(JSON.stringify(formData));
cy.verifySliceSuccess({ waitAlias: '@postJson' });

cy.get('[data-test=time-range-trigger]').click().then(() => {
cy.get('.ant-modal-footer').find('button').its('length').should('eq', 3)
cy.get('.ant-modal-body').within(() => {
cy.get('input[value="100 years ago"]');
cy.get('input[value="now"]');
cy.get('[data-test=time-range-trigger]')
.click()
.then(() => {
cy.get('.ant-modal-footer')
.find('button')
.its('length')
.should('eq', 3);
cy.get('.ant-modal-body').within(() => {
cy.get('input[value="100 years ago"]');
cy.get('input[value="now"]');
});
cy.get('[data-test=modal-cancel-button]').click();
cy.get('[data-test=time-range-modal]').should('not.be.visible');
});
cy.get('[data-test=modal-cancel-button]').click();
cy.get('[data-test=time-range-modal]').should('not.be.visible');
});
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,13 @@ export default function DateFilterControl(props: DateFilterLabelProps) {
show={show}
onHide={onHide}
footer={[
<Button buttonStyle="secondary" cta key="cancel" onClick={onHide} data-test="modal-cancel-button">
<Button
buttonStyle="secondary"
cta
key="cancel"
onClick={onHide}
data-test="modal-cancel-button"
>
{t('CANCEL')}
</Button>,
<Button
Expand Down

0 comments on commit 6e82c0b

Please sign in to comment.