Add support for rendering a custom wrapper around Element (#25537)
Co-authored-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
This commit is contained in:
parent
2ad80c8fcf
commit
3fd6b62254
6 changed files with 125 additions and 29 deletions
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { RenderResult, screen, waitFor } from "@testing-library/react";
|
||||
|
||||
export function cleanLocalstorage(): void {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
|
@ -47,3 +49,12 @@ export function deleteIndexedDB(dbName: string): Promise<void> {
|
|||
throw e;
|
||||
});
|
||||
}
|
||||
|
||||
// wait for loading page
|
||||
export async function waitForLoadingSpinner(): Promise<void> {
|
||||
await screen.findByRole("progressbar");
|
||||
}
|
||||
|
||||
export async function waitForWelcomeComponent(matrixChat?: RenderResult): Promise<void> {
|
||||
await waitFor(() => matrixChat?.container.querySelector(".mx_Welcome"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue