[#1526] Fix failing FileNode test
This commit is contained in:
parent
90e81d8ddc
commit
763ee140fa
2 changed files with 2 additions and 1 deletions
|
@ -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>
|
||||
|
|
|
@ -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));
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue