Skip to content

fix: always use bash when executing web terminal tests #12755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

aslilac
Copy link
Member

@aslilac aslilac commented Mar 25, 2024

No description provided.

@aslilac aslilac force-pushed the fix-leaky-terminal-test branch from 54a3715 to 237a5d1 Compare March 25, 2024 21:43
Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to instead grab the link from that button, modify it with the query parameter, then click it.

Right now, this is technically executing two terminal sessions.

@aslilac
Copy link
Member Author

aslilac commented Mar 25, 2024

We might want to instead grab the link from that button, modify it with the query parameter, then click it.

I thought about that, but I'm not crazy about the feeling of reaching into the app, making changes from the outside, and then using this newly tweaked behavior as the one that we test. 😅 Feels a bit too much like we're not testing the button anymore.

Also it doesn't even look like that's something that Playwright supports, but I might not be seeing something. I guess you can use evaluateHandle but that just further signals to me that this isn't a thing you're intended to do.

@aslilac
Copy link
Member Author

aslilac commented Mar 25, 2024

I tried it anyway just to see, and something is getting lost in translation.

    // This assertion passes, everything seems fine.
    expect(await page.getByTestId("terminal").getAttribute("href")).toBe(
      `/@admin/${workspaceName}.dev/terminal${commandQuery}`,
    );
    // This one does not. Somehow, the change isn't _actually_ taking effect, even though it seems to be reflected.
    await expect(terminal).toHaveURL(
      `/@admin/${workspaceName}.dev/terminal${commandQuery}`,
    );

...so I'm just gonna go with the way it is. 😅

@aslilac aslilac merged commit cfb484f into main Mar 25, 2024
@aslilac aslilac deleted the fix-leaky-terminal-test branch March 25, 2024 22:58
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants