mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-10 16:25:37 +00:00
fix(test): refresh token e2e enabled (#20862)
* fix(test): refresh token e2e enabled * update config * revert config changes * revert config changes
This commit is contained in:
parent
110e578d1c
commit
3fc0bdd23b
@ -11,7 +11,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
export const JWT_EXPIRY_TIME_MAP = {
|
||||
'3 minutes': 180,
|
||||
'2 minutes': 120,
|
||||
'1 hour': 3600,
|
||||
'2 hours': 7200,
|
||||
'3 hours': 10800,
|
||||
|
@ -52,7 +52,7 @@ test.describe('Login flow should work properly', () => {
|
||||
// update expiry for 3 mins
|
||||
await updateJWTTokenExpiryTime(
|
||||
apiContext,
|
||||
JWT_EXPIRY_TIME_MAP['3 minutes']
|
||||
JWT_EXPIRY_TIME_MAP['2 minutes']
|
||||
);
|
||||
|
||||
await afterAction();
|
||||
@ -140,7 +140,7 @@ test.describe('Login flow should work properly', () => {
|
||||
await page.locator('[data-testid="go-back-button"]').click();
|
||||
});
|
||||
|
||||
test.fixme('Refresh should work', async ({ browser }) => {
|
||||
test('Refresh should work', async ({ browser }) => {
|
||||
const browserContext = await browser.newContext();
|
||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
||||
const page1 = await browserContext.newPage(),
|
||||
@ -188,8 +188,8 @@ test.describe('Login flow should work properly', () => {
|
||||
|
||||
await expect(page1.getByTestId('nav-user-name')).toContainText(/admin/i);
|
||||
|
||||
// Wait for token expiry
|
||||
await page2.waitForTimeout(3 * 60 * 1000);
|
||||
// Wait for token expiry, kept 61 instead 60 so that ensure refresh API done withing timeframe
|
||||
await page2.waitForTimeout(2 * 61 * 1000);
|
||||
|
||||
await redirectToHomePage(page2);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user