@@ -47,6 +47,35 @@ test('collaboration panel should contains two items', async ({ page }) => {
4747 expect ( panel . locator ( '.jp-CollaboratorsList .jp-Collaborator' ) ) . toHaveCount ( 0 ) ;
4848} ) ;
4949
50+ test . describe ( 'User info panel' , ( ) => {
51+ test ( 'should contain the user info icon' , async ( { page } ) => {
52+ const panel = await openPanel ( page ) ;
53+ const userInfoIcon = panel . locator ( '.jp-UserInfo-Icon' ) ;
54+ expect ( userInfoIcon ) . toHaveCount ( 1 ) ;
55+ } ) ;
56+
57+ test ( 'should open the user info dialog' , async ( { page } ) => {
58+ const panel = await openPanel ( page ) ;
59+ const userInfoIcon = panel . locator ( '.jp-UserInfo-Icon' ) ;
60+ await userInfoIcon . click ( ) ;
61+
62+ const dialog = page . locator ( '.jp-Dialog-body' ) ;
63+ expect ( dialog ) . toHaveCount ( 1 ) ;
64+
65+ const userInfoPanel = page . locator ( '.jp-UserInfoPanel' ) ;
66+ expect ( userInfoPanel ) . toHaveCount ( 1 ) ;
67+
68+ const userName = page . locator ( 'input[name="display_name"]' ) ;
69+ expect ( userName ) . toHaveCount ( 1 ) ;
70+ expect ( await userName . inputValue ( ) ) . toBe ( 'jovyan' ) ;
71+
72+ const cancelButton = page . locator (
73+ '.jp-Dialog-button .jp-Dialog-buttonLabel:has-text("Cancel")'
74+ ) ;
75+ await cancelButton . click ( ) ;
76+ expect ( dialog ) . toHaveCount ( 0 ) ;
77+ } ) ;
78+ } ) ;
5079
5180test . describe ( 'One client' , ( ) => {
5281 let guestPage : IJupyterLabPageFixture ;
0 commit comments