Skip to content

Commit

Permalink
Explicitly set blockchain options for each test
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarvu committed Dec 18, 2024
1 parent 0d41bb2 commit 047fd54
Showing 1 changed file with 32 additions and 13 deletions.
45 changes: 32 additions & 13 deletions packages/app/src/pages/Borrow.test-e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ import { MyPortfolioPageObject } from './MyPortfolio.PageObject'
import { SavingsPageObject } from './Savings.PageObject'

test.describe('Borrow page', () => {
const blockchainOptions = {
chainId: mainnet.id,
blockNumber: DEFAULT_BLOCK_NUMBER,
}

test.describe('deposit ETH, borrow DAI', () => {
let borrowPage: BorrowPageObject
let actionsContainer: ActionsPageObject
Expand All @@ -34,7 +29,10 @@ test.describe('Borrow page', () => {

test.beforeEach(async ({ page }) => {
testContext = await setup(page, {
blockchain: blockchainOptions,
blockchain: {
chainId: mainnet.id,
blockNumber: DEFAULT_BLOCK_NUMBER,
},
initialPage: 'easyBorrow',
account: {
type: 'connected-random',
Expand Down Expand Up @@ -120,7 +118,10 @@ test.describe('Borrow page', () => {

test.beforeEach(async ({ page }) => {
testContext = await setup(page, {
blockchain: blockchainOptions,
blockchain: {
chainId: mainnet.id,
blockNumber: DEFAULT_BLOCK_NUMBER,
},
initialPage: 'easyBorrow',
account: {
type: 'connected-random',
Expand Down Expand Up @@ -272,7 +273,10 @@ test.describe('Borrow page', () => {

test.beforeEach(async ({ page }) => {
testContext = await setup(page, {
blockchain: blockchainOptions,
blockchain: {
chainId: mainnet.id,
blockNumber: DEFAULT_BLOCK_NUMBER,
},
initialPage: 'easyBorrow',
account: {
type: 'connected-random',
Expand Down Expand Up @@ -345,7 +349,10 @@ test.describe('Borrow page', () => {

test.beforeEach(async ({ page }) => {
const testContext = await setup(page, {
blockchain: blockchainOptions,
blockchain: {
chainId: mainnet.id,
blockNumber: DEFAULT_BLOCK_NUMBER,
},
initialPage: 'easyBorrow',
account: {
type: 'not-connected',
Expand Down Expand Up @@ -374,7 +381,10 @@ test.describe('Borrow page', () => {

test.beforeEach(async ({ page }) => {
const testContext = await setup(page, {
blockchain: blockchainOptions,
blockchain: {
chainId: mainnet.id,
blockNumber: DEFAULT_BLOCK_NUMBER,
},
initialPage: 'easyBorrow',
account: {
type: 'connected-random',
Expand Down Expand Up @@ -448,7 +458,10 @@ test.describe('Borrow page', () => {
let testContext: TestContext<'connected-random'>
test.beforeEach(async ({ page }) => {
testContext = await setup(page, {
blockchain: blockchainOptions,
blockchain: {
chainId: mainnet.id,
blockNumber: DEFAULT_BLOCK_NUMBER,
},
initialPage: 'easyBorrow',
account: {
type: 'connected-random',
Expand Down Expand Up @@ -487,7 +500,10 @@ test.describe('Borrow page', () => {
test.describe('In danger zone', () => {
test.beforeEach(async ({ page }) => {
const testContext = await setup(page, {
blockchain: blockchainOptions,
blockchain: {
chainId: mainnet.id,
blockNumber: DEFAULT_BLOCK_NUMBER,
},
initialPage: 'easyBorrow',
account: {
type: 'connected-random',
Expand Down Expand Up @@ -516,7 +532,10 @@ test.describe('Borrow page', () => {

test('hf above danger zone threshold; risk warning is not shown', async ({ page }) => {
const testContext = await setup(page, {
blockchain: blockchainOptions,
blockchain: {
chainId: mainnet.id,
blockNumber: DEFAULT_BLOCK_NUMBER,
},
initialPage: 'easyBorrow',
account: {
type: 'connected-random',
Expand Down

0 comments on commit 047fd54

Please sign in to comment.