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
Fix E2E tests #76
base: trunk
Are you sure you want to change the base?
Fix E2E tests #76
Conversation
src/components/onboarding.tsx
Outdated
<div | ||
className="flex flex-row flex-grow" | ||
data-testid="onboarding" | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could actually remote this, given the current code doesn't use it because I couldn't get it to work.
const frontendUrl = await siteContent.frontendButton.textContent(); | ||
expect( frontendUrl ).toBeTruthy(); | ||
expect( frontendUrl ).not.toBeNull(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to make this "to not be empty"
e2e/page-objects/onboarding.ts
Outdated
get siteNameInput() { | ||
return this.locator.getByLabel( 'Site name' ); | ||
} | ||
|
||
get sitePathInput() { | ||
return this.locator.getByLabel( 'Local path' ); | ||
} | ||
|
||
get continueButton() { | ||
return this.locator.getByRole('button', { name: 'Continue' }); | ||
} | ||
|
||
private get localPathButton() { | ||
return this.locator.getByTestId( 'select-path-button' ); | ||
} | ||
|
||
// This usually opens an OS folder dialog, except we can't interact with it in playwrite. | ||
// In tests the dialog returns the value of the E2E_OPEN_FOLDER_DIALOG environment variable. | ||
async clickLocalPathButtonAndSelectFromEnv() { | ||
await this.localPathButton.click(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Part of this logic is duplicated from add-site-modal.ts
. I shall extract it in a site-form.ts
object, but maybe in a followup PR. Very keen to get E2E back to stable in CI.
47a027b
to
034f575
Compare
034f575
to
1a39796
Compare
Currently failing, see #37
1a39796
to
2e6fd2d
Compare
Update: Rebased on top of #99. The diff is noisy because it includes the changes from #17, too.
Works on my machine™
Let's see what CI does...
Related to #
Proposed Changes
Testing Instructions
Pre-merge Checklist