Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test: fix url checks in e2e tests#12881

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aslilac merged 8 commits intomainfromfix-e2e-url-checks
Apr 11, 2024
Merged

test: fix url checks in e2e tests#12881

aslilac merged 8 commits intomainfromfix-e2e-url-checks
Apr 11, 2024

Conversation

aslilac
Copy link
Member

@aslilacaslilac commentedApr 5, 2024
edited
Loading

Prevents flakes on pages likeWorkspacePage, where query params are added after it has loaded. If they get added between polls,toHaveURL will fail, because it matches the full URL.

@aslilacaslilac marked this pull request as ready for reviewApril 11, 2024 19:15
Copy link
Member

@EmyrkEmyrk left a comment

Choose a reason for hiding this comment

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

ThetoHaveURL takes a string or a regex. I would guess the regex option would pass, and I guess the string option does not act like a regex match?? Kinda ridiculous imo the behavior is so different based on if you passed in a regex string or just a string.

Would be nice if we could add a linter or remove thetoHaveURL somehow to prevent misuse.


type PollingOptions = { timeout?: number; intervals?: number[] };

export const expectUrl = expect.extend({
Copy link
Member

Choose a reason for hiding this comment

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

This is so interesting. Can we keep a set of extensions and just make it some generic "expectCoder" or something?

I just wonder if we'll build up a set of these.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I think having several of them would be a fine outcome personally. This sort of "scoped customexpects" is what the Playwright documentation suggests.

@@ -116,6 +116,7 @@ export const CreateTokenForm: FC<CreateTokenFormProps> = ({

{lifetimeDays === "custom" && (
<TextField
data-chromatic="ignore"
Copy link
Member

Choose a reason for hiding this comment

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

Not sure what this is 🤔

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

someone let a leaky date sneak in to chromatic again, so I'm muting it 😅

@aslilac
Copy link
MemberAuthor

Would be nice if we could add a linter or remove the toHaveURL somehow to prevent misuse.

yeah, in the mean time I'm hoping people will mostly copy-paste from other tests that do the correct thing. :p

@aslilacaslilac merged commitc5367c2 intomainApr 11, 2024
@aslilacaslilac deleted the fix-e2e-url-checks branchApril 11, 2024 21:48
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsApr 11, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EmyrkEmyrkEmyrk approved these changes

@ParkreinerParkreinerAwaiting requested review from Parkreiner

Assignees

@aslilacaslilac

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@aslilac@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp