-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added test case to check cookie expiry field
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
tests/e2e-playwright/specs/10_validate-cookie-expiry-field-test.spec.js
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,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') | ||
}) | ||
}) |