|
1 | 1 | import React from 'react';
|
| 2 | +import * as helper from '../src/components/helper/commands'; |
2 | 3 | import { describe, beforeEach, expect, test, jest } from '@jest/globals';
|
3 | 4 | import Images from '../src/components/tabs/Images';
|
4 | 5 | import {
|
@@ -57,14 +58,15 @@ describe('Images', () => {
|
57 | 58 | });
|
58 | 59 |
|
59 | 60 | // currently gets stuck at window.runExec method --> reads undefined
|
60 |
| - // describe('pull button on click', () => { |
61 |
| - // test('fires pull button functionality', () => { |
62 |
| - // const { container } = render(<Images {...props} />); |
63 |
| - // const pullButton = screen.getByRole('button', { name: 'Pull' }); |
64 |
| - // fireEvent.click(pullButton); |
65 |
| - // expect(pullButton).toBeCalled; |
66 |
| - // }); |
67 |
| - // }); |
| 61 | + describe('pull button on click', () => { |
| 62 | + test('fires pull button functionality', () => { |
| 63 | + // const { container } = render(<Images {...props} />); |
| 64 | + const pullButton = screen.getByRole('button', { name: 'PULL' }); |
| 65 | + fireEvent.click(pullButton); |
| 66 | + expect(pullButton).toBeCalled; |
| 67 | + expect(Images.handleClick).toBeCalled; |
| 68 | + }); |
| 69 | + }); |
68 | 70 |
|
69 | 71 | describe('Images', () => {
|
70 | 72 | test('Renders an image if one is found', () => {
|
|
0 commit comments