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

Fix tests broken due to widget gallery changes #144

Merged
merged 5 commits into from
Nov 13, 2024

Conversation

Spoffy
Copy link
Contributor

@Spoffy Spoffy commented Oct 8, 2024

No description provided.

Copy link

netlify bot commented Oct 8, 2024

Deploy Preview for boisterous-sunburst-a5c941 ready!

Name Link
🔨 Latest commit d7af5bf
🔍 Latest deploy log https://app.netlify.com/sites/boisterous-sunburst-a5c941/deploys/67335f0bd4701d0008d3bf00
😎 Deploy Preview https://deploy-preview-144--boisterous-sunburst-a5c941.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@paulfitz
Copy link
Member

Took a quick look at this PR. A few notes.

test/gristWebDriverUtils.ts has become weird. It is supposed to be a copy of an asset in grist-core:

/**
 * Utilities that simplify writing browser tests against Grist, which
 * have only mocha-webdriver as a code dependency. Separated out to
 * make easier to borrow for grist-widget repo.
 *
 * If you are seeing this code outside the grist-core repo, please don't
 * edit it, it is just a copy and local changes will prevent updating it
 * easily.
 */

It looks pretty out of date with grist-core today, so I thought about copying over the latest version. BUT it looks like there have been local changes to the file. For example the focusOnCell method. These should either be added upstream, or in GristUtils in test/getGrist.ts.

Copying a file across is of course lame.

Copy link
Member

@dsagal dsagal left a comment

Choose a reason for hiding this comment

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

Thank you! One note about a change which I suspect is not needed to get the fixes of this PR.

test/getGrist.ts Outdated Show resolved Hide resolved
@@ -210,8 +223,11 @@ export class GristWebDriverUtils {
const max = 10;

// Keep dismissing prompts until there are no more, up to a maximum of 10 times.
while (i < max && await this.driver.find('.test-behavioral-prompt').isPresent()) {
await this.driver.find('.test-behavioral-prompt-dismiss').click();
const getButton = () => {
Copy link
Member

Choose a reason for hiding this comment

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

My guess is that this change isn't of much benefit, and my preference would be to keep it unchanged, since it's a copy of code from grist-core (which is much more exercised and reliable). For the same reason, ignoreMissingElementErrors doesn't seem needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rolled this back - totally agree it doesn't make sense making these changes, if we haven't updated gristWebDriverUtils.

@Spoffy Spoffy requested a review from dsagal November 12, 2024 14:00
@Spoffy Spoffy merged commit be9a2ba into master Nov 13, 2024
1 of 2 checks passed
@Spoffy Spoffy deleted the spoffy/fix-widget-gallery-tests branch November 13, 2024 00:01
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