Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane Osbourne committed Oct 24, 2024
1 parent 1b5c1b8 commit babee23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,21 @@ test.describe('newtab remote messaging framework rmf', () => {
await ntp.mocks.waitForCallCount({ method: 'rmf_dismiss', count: 1 })
})

test('renders two buttons for big_two_action variant', async ({ page }, workerInfo) => {
test('renders two buttons for big_two_action variant (primary)', async ({ page }, workerInfo) => {
const ntp = NewtabPage.create(page, workerInfo)
await ntp.reducedMotion()
await ntp.openPage({ rmf: 'big_two_action' })

await page.getByRole('button', { name: 'Take Survey' }).click()
await page.getByRole('button', { name: 'Remind me' }).click()
await ntp.mocks.waitForCallCount({ method: 'rmf_primaryAction', count: 1 })
})

test('renders two buttons for big_two_action variant (secondary)', async ({ page }, workerInfo) => {
const ntp = NewtabPage.create(page, workerInfo)
await ntp.reducedMotion()
await ntp.openPage({ rmf: 'big_two_action' })

await page.getByRole('button', { name: 'Remind me' }).click()
await ntp.mocks.waitForCallCount({ method: 'rmf_secondaryAction', count: 1 })
})
})
2 changes: 0 additions & 2 deletions special-pages/pages/new-tab/integration-tests/new-tab.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ test.describe('newtab widgets', () => {
context: 'specialPages',
featureName: 'newTabPage',
params: [
{ id: 'rmf', visibility: 'visible' },
{ id: 'favorites', visibility: 'visible' },
{ id: 'privacyStats', visibility: 'hidden' }
],
Expand Down Expand Up @@ -56,7 +55,6 @@ test.describe('newtab widgets', () => {
context: 'specialPages',
featureName: 'newTabPage',
params: [
{ id: 'rmf', visibility: 'visible' },
{ id: 'favorites', visibility: 'visible' },
{ id: 'privacyStats', visibility: 'visible' }
],
Expand Down

0 comments on commit babee23

Please sign in to comment.