Skip to content

Commit 763ee14

Browse files
committed
[#1526] Fix failing FileNode test
1 parent 90e81d8 commit 763ee14

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

client/modules/IDE/components/FileNode.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ export class FileNode extends React.Component {
264264
aria-label={this.state.updatedName}
265265
className="sidebar__file-item-name"
266266
onClick={this.handleFileClick}
267+
data-testid="file-name"
267268
>
268269
<FileName name={this.state.updatedName} />
269270
</button>

client/modules/IDE/components/FileNode.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('<FileNode />', () => {
1313
};
1414

1515
const expectFileNameToBe = async (expectedName) => {
16-
const name = screen.getByLabelText(/Name/i);
16+
const name = screen.getByTestId('file-name');
1717
await waitFor(() => within(name).queryByText(expectedName));
1818
};
1919

0 commit comments

Comments
 (0)