Skip to content

Toast testkit driver #2901

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 9 commits into from
Jan 22, 2024
Merged

Toast testkit driver #2901

merged 9 commits into from
Jan 22, 2024

Conversation

nitzanyiz
Copy link
Collaborator

@nitzanyiz nitzanyiz commented Jan 17, 2024

Description

Toast testkit driver

Changelog

None

Additional info

None

@nitzanyiz nitzanyiz added this to the Quality milestone Jan 17, 2024
@nitzanyiz nitzanyiz marked this pull request as ready for review January 17, 2024 10:10
@nitzanyiz nitzanyiz requested a review from M-i-k-e-l January 17, 2024 10:10
@nitzanyiz nitzanyiz changed the title Infra/toast test driver Toast testkit driver Jan 17, 2024
const {toastDriver} = getDriver({autoDismiss: TIME, onDismiss: dismissFn});
expect(toastDriver.exists()).toBeTruthy();
expect(dismissFn).not.toHaveBeenCalled();
await new Promise(r => setTimeout(r, TIME + 100));
Copy link
Collaborator

@M-i-k-e-l M-i-k-e-l Jan 22, 2024

Choose a reason for hiding this comment

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

I'd look into using fake timers instead (if it works)

@nitzanyiz nitzanyiz requested a review from M-i-k-e-l January 22, 2024 08:54
return messageDriver;
};

const getActionButton = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be getAction

Copy link
Collaborator

@M-i-k-e-l M-i-k-e-l left a comment

Choose a reason for hiding this comment

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

Approved with a comment

@nitzanyiz nitzanyiz merged commit 56f3ded into master Jan 22, 2024
@nitzanyiz nitzanyiz deleted the infra/ToastTestDriver branch January 22, 2024 09:08
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.

2 participants