Skip to content

Commit

Permalink
feat: added test case to check cookie expiry field
Browse files Browse the repository at this point in the history
  • Loading branch information
SH4LIN committed Aug 6, 2024
1 parent 016416f commit 63dec2f
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* WordPress dependencies
*/
const { test, expect } = require('@wordpress/e2e-test-utils-playwright')

test.describe('Set cookie expiry field in the settings', () => {
test('should be able to set cookie expiry field', async ({ page, admin }) => {
await admin.visitAdminPage('/')

await page.hover('role=link[name="Settings"i]')

await page.click('role=link[name="Login with Google"i]')

expect(page.locator("form[action='options.php'] h2")).toHaveText(
'Log in with Google Settings'
)

await page.type(
'#cookie-expiry',
'320'
)

await page.waitForTimeout(1000)

await page.click('#submit')
})
})

0 comments on commit 63dec2f

Please sign in to comment.