mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 04:06:44 +02:00
Fix playwright tests locally (#32974)
This commit is contained in:
parent
0d1d889c28
commit
fc870bd676
@ -122,7 +122,7 @@ test.describe("HTML Export", () => {
|
||||
await download.saveAs(zipPath);
|
||||
|
||||
const zip = await extractZipFileToPath(zipPath, dirPath);
|
||||
await page.goto(`file://${dirPath}/${Object.keys(zip.files)[0]}/messages.html`);
|
||||
await page.goto(`file://${dirPath}/${Object.keys(zip.files).find((f) => f.endsWith("/messages.html"))}`);
|
||||
await expect(page).toMatchScreenshot("html-export.png", {
|
||||
mask: [page.locator(".mx_TimelineSeparator")],
|
||||
css: `
|
||||
|
||||
@ -40,7 +40,6 @@ interface Props {
|
||||
scope: SearchScope;
|
||||
inProgress: boolean;
|
||||
promise: Promise<ISearchResults>;
|
||||
abortController?: AbortController;
|
||||
className: string;
|
||||
onUpdate(this: void, inProgress: boolean, results: ISearchResults | null, error: Error | null): void;
|
||||
ref?: Ref<ScrollPanel>;
|
||||
@ -48,16 +47,7 @@ interface Props {
|
||||
|
||||
// XXX: todo: merge overlapping results somehow?
|
||||
// XXX: why doesn't searching on name work?
|
||||
export const RoomSearchView = ({
|
||||
term,
|
||||
scope,
|
||||
promise,
|
||||
abortController,
|
||||
className,
|
||||
onUpdate,
|
||||
inProgress,
|
||||
ref,
|
||||
}: Props): JSX.Element => {
|
||||
export const RoomSearchView = ({ term, scope, promise, className, onUpdate, inProgress, ref }: Props): JSX.Element => {
|
||||
const client = useContext(MatrixClientContext);
|
||||
const roomContext = useScopedRoomContext("showHiddenEvents");
|
||||
const [highlights, setHighlights] = useState<string[] | null>(null);
|
||||
@ -144,7 +134,6 @@ export const RoomSearchView = ({
|
||||
handleSearchResult(promise);
|
||||
return () => {
|
||||
aborted.current = true;
|
||||
abortController?.abort();
|
||||
};
|
||||
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
|
||||
@ -2563,7 +2563,6 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||
term={this.state.search.term}
|
||||
scope={this.state.search.scope}
|
||||
promise={this.state.search.promise}
|
||||
abortController={this.state.search.abortController}
|
||||
inProgress={!!this.state.search.inProgress}
|
||||
className={this.messagePanelClassNames}
|
||||
onUpdate={this.onSearchUpdate}
|
||||
|
||||
@ -23,7 +23,7 @@ IMAGE_NAME="ghcr.io/element-hq/element-web/playwright-server:$PW_VERSION"
|
||||
docker pull "$IMAGE_NAME" 2>/dev/null || build_image "$IMAGE_NAME"
|
||||
|
||||
# Start the playwright-server in docker
|
||||
CONTAINER=$(docker run --network=host --rm -d -e PORT="$WS_PORT" "$IMAGE_NAME")
|
||||
CONTAINER=$(docker run --network=host -v /tmp:/tmp --rm -d -e PORT="$WS_PORT" "$IMAGE_NAME")
|
||||
# Set up an exit trap to clean up the docker container
|
||||
clean_up() {
|
||||
ARG=$?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user