[#1526] Fix failing FileNode test

This commit is contained in:
Cassie Tarakajian 2020-08-05 18:27:38 -04:00
parent 90e81d8ddc
commit 763ee140fa
2 changed files with 2 additions and 1 deletions

View file

@ -264,6 +264,7 @@ export class FileNode extends React.Component {
aria-label={this.state.updatedName}
className="sidebar__file-item-name"
onClick={this.handleFileClick}
data-testid="file-name"
>
<FileName name={this.state.updatedName} />
</button>

View file

@ -13,7 +13,7 @@ describe('<FileNode />', () => {
};
const expectFileNameToBe = async (expectedName) => {
const name = screen.getByLabelText(/Name/i);
const name = screen.getByTestId('file-name');
await waitFor(() => within(name).queryByText(expectedName));
};