Skip to content

Commit

Permalink
refactor(e2e tests): account for snapshot modal
Browse files Browse the repository at this point in the history
  • Loading branch information
philip-cline committed Nov 7, 2023
1 parent 6516447 commit e36a521
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions __tests__/end-to-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -2776,6 +2776,10 @@ describe('end-to-end', () => {

// wait for snapshots tab to load and publish snapshot
await waitForAndClick('[data-test-id="publish-snapshot-button"]')

// wait for snapshot export modal and click "no" to proprietary file export
await waitForAndClick('[data-test-id="export-patterns-modal-no"]')

// wait for version to get created
await waitAndClearCompletedJobs()

Expand Down
11 changes: 9 additions & 2 deletions lib/common/components/ExportPatternsModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,17 @@ export default class ExportPatternsModal extends React.Component<Props, State> {
<Modal show={this.state.showModal} onHide={this.close}>
<Body style={{display: 'flex'}}>
<Title>{this.messages('exportPatterns')}</Title>
<Button onClick={() => this.publish(true)} style={buttonStyle}>
<Button
onClick={() => this.publish(true)}
style={buttonStyle}
>
{this.messages('yes')}
</Button>
<Button onClick={() => this.publish(false)} style={buttonStyle}>
<Button
data-test-id='export-patterns-modal-no'
onClick={() => this.publish(false)}
style={buttonStyle}
>
{this.messages('no')}
</Button>
</Body>
Expand Down

0 comments on commit e36a521

Please sign in to comment.