[#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}
|
aria-label={this.state.updatedName}
|
||||||
className="sidebar__file-item-name"
|
className="sidebar__file-item-name"
|
||||||
onClick={this.handleFileClick}
|
onClick={this.handleFileClick}
|
||||||
|
data-testid="file-name"
|
||||||
>
|
>
|
||||||
<FileName name={this.state.updatedName} />
|
<FileName name={this.state.updatedName} />
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe('<FileNode />', () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const expectFileNameToBe = async (expectedName) => {
|
const expectFileNameToBe = async (expectedName) => {
|
||||||
const name = screen.getByLabelText(/Name/i);
|
const name = screen.getByTestId('file-name');
|
||||||
await waitFor(() => within(name).queryByText(expectedName));
|
await waitFor(() => within(name).queryByText(expectedName));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue