bitovi / bitovi/syn

Syn 1.0

Open
#183 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
441
Forks
254
PR merge metrics
No merged PRs in 30d

Description

I've started developing a `syn 1.0`. The goals:

1. Make the syntax easier to use in modern browsers.
2. Clean up the code
3. Pave the way for mobile tests (pointer events)

## Make the syntax easier to use in modern browsers

Syn is callback-based, this makes it cumbersome to test sequential behaviors:

```js
it("does something after 2 clicks", function(){
syn.click("foo", function(){
syn.click("bar", function(){
// CHECK SOMETHING HERE
})
})
})
```

If syn returned promises, this can get cleaned up quite a bit:

```js
it("does something after 2 clicks", async function(){
await syn.click("foo");
await syn.click("bar");
// CHECK SOMETHING HERE
})
```

Finally, syn works with element ids, not CSS selectors (CSS selectors were not widely supported when it was first created). I'd like to change that:

```js
it("does something after 2 clicks", async function(){
await syn.click(".foo");
await syn.click("#bar");
// CHECK SOMETHING HERE
})
```

I think these 2 changes will make syn much easier to use on its own. I'd also like to make syn a single ES module so it can be easily imported into any app.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named in the issue. Start by surveying the repository structure and existing browser-event APIs and tests. The work is done when Syn supports promise-based calls, CSS selectors, and a single ES module, with the stated mobile pointer-event path prepared.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.