-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from OasisDEX/automations-setup
Automations tests setup
- Loading branch information
Showing
5 changed files
with
154 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { step } from '#noWalletFixtures'; | ||
import { Page } from '@playwright/test'; | ||
import { Base } from './base'; | ||
|
||
export class Optimization { | ||
readonly page: Page; | ||
|
||
readonly base: Base; | ||
|
||
constructor(page: Page) { | ||
this.page = page; | ||
this.base = new Base(page); | ||
} | ||
|
||
@step | ||
async setupAutoBuy() { | ||
await this.page.getByRole('button', { name: 'Setup Auto-Buy' }).click(); | ||
} | ||
|
||
@step | ||
async adjustAutoBuyTrigger({ value }: { value: number }) { | ||
await this.base.moveSliderAutomations({ value }); | ||
} | ||
|
||
@step | ||
async setNoThreshold() { | ||
await this.page.getByText('span:has-text("Set No Threshold")').click(); | ||
} | ||
|
||
@step | ||
async setThreshold() { | ||
await this.page.locator('span:has-text("Set Threshold")').click(); | ||
} | ||
|
||
@step | ||
async addAutoBuy() { | ||
await this.page.getByRole('button', { name: 'Add Auto-Buy' }).click(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters