Skip to content
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

Test SDK loading before widget tag #30

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rokostik
Copy link
Contributor

This PR adds a test for the situation where the SDK loads before a widget tag that contains the EU API endpoint attribute.

It also removes the EU API endpoint meta attribute since all the tests that need it define it in the widget tag.

@CLAassistant
Copy link

CLAassistant commented Jan 15, 2025

CLA assistant check
All committers have signed the CLA.

ta.focus();

t.assert.equal(w.getState(), "unactivated")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was flaky for me and the state was in init a lot of times.

// Already unactivated (init done)
} else {
const unactivatedPromise = t.assert.widgetInits(w);
await unactivatedPromise;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitty, but why not just await t.assert.widgetInits(w)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, you're right, it isn't needed. I was basing the test on start_mode_auto that had it. I've the promise var on both in 16c4d28

@rokostik
Copy link
Contributor Author

I'm going to hold off merging this PR until https://github.com/FriendlyCaptcha/friendly-captcha/issues/1889 is fixed.

@rokostik rokostik self-assigned this Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants