fix(auth): скрыть пароли от читателя и согласовать Portal
This commit is contained in:
1 parent
a15917d08b
commit
608f743003
20 files changed
+1412
-19
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import {test,expect} from '@playwright/test'
|
||||
for(const width of [1440,320])test(`Меню приложений использует runtime Portal ${width}`,async({page})=>{
|
||||
await page.setViewportSize({width,height:1000})
|
||||
await page.route('**/health',r=>r.fulfill({json:{ok:true}}))
|
||||
await page.route('**/api/**',r=>{
|
||||
const path=new URL(r.request().url()).pathname
|
||||
return r.fulfill({json:path==='/api/auth/config'?{required:false,portal_url:'https://runtime.example.test/'}:
|
||||
path==='/api/v1/app-switcher'?{menuLabel:'Приложения',apps:[]}:
|
||||
path==='/api/servers'?[]:path==='/api/evobgp/settings'?{enabled:false,baseUrl:'',secretConfigured:false}:{}})
|
||||
})
|
||||
await page.goto('/servers')
|
||||
await page.getByRole('button',{name:'Приложения',exact:true}).click()
|
||||
await expect(page.getByRole('menuitem',{name:'Настроить на портале',exact:true})).toHaveAttribute('href','https://runtime.example.test/admin/apps')
|
||||
expect(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth+1)).toBe(true)
|
||||
})
|
||||
Reference in new issue
Block a user