From 763ee140fa58f1f87992bc8072187eba2d03edbc Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Wed, 5 Aug 2020 18:27:38 -0400 Subject: [PATCH] [#1526] Fix failing FileNode test --- client/modules/IDE/components/FileNode.jsx | 1 + client/modules/IDE/components/FileNode.test.jsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/modules/IDE/components/FileNode.jsx b/client/modules/IDE/components/FileNode.jsx index 4f16387d..e7869f26 100644 --- a/client/modules/IDE/components/FileNode.jsx +++ b/client/modules/IDE/components/FileNode.jsx @@ -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" > diff --git a/client/modules/IDE/components/FileNode.test.jsx b/client/modules/IDE/components/FileNode.test.jsx index cc913858..ddb8fec7 100644 --- a/client/modules/IDE/components/FileNode.test.jsx +++ b/client/modules/IDE/components/FileNode.test.jsx @@ -13,7 +13,7 @@ describe('', () => { }; const expectFileNameToBe = async (expectedName) => { - const name = screen.getByLabelText(/Name/i); + const name = screen.getByTestId('file-name'); await waitFor(() => within(name).queryByText(expectedName)); };