@@ -69,7 +69,7 @@ func testOrgProfile(t *testing.T, u *url.URL) {
6969 resp := MakeRequest (t , req , http .StatusOK )
7070 htmlDoc := NewHTMLParser (t , resp .Body )
7171
72- profileDivs := htmlDoc .doc .Find ("#user-content-public " )
72+ profileDivs := htmlDoc .doc .Find ("[data-profile-view-as-member=false] " )
7373 assert .EqualValues (t , 1 , profileDivs .Length ())
7474
7575 dropDownDiv := htmlDoc .doc .Find ("#org-home-view-as-dropdown" )
@@ -81,7 +81,7 @@ func testOrgProfile(t *testing.T, u *url.URL) {
8181 resp = session .MakeRequest (t , req , http .StatusOK )
8282 htmlDoc = NewHTMLParser (t , resp .Body )
8383
84- profileDivs = htmlDoc .doc .Find ("#user-content-public " )
84+ profileDivs = htmlDoc .doc .Find ("[data-profile-view-as-member=false] " )
8585 assert .EqualValues (t , 1 , profileDivs .Length ())
8686
8787 dropDownDiv = htmlDoc .doc .Find ("#org-home-view-as-dropdown" )
@@ -93,7 +93,7 @@ func testOrgProfile(t *testing.T, u *url.URL) {
9393 resp = session .MakeRequest (t , req , http .StatusOK )
9494 htmlDoc = NewHTMLParser (t , resp .Body )
9595
96- profileDivs = htmlDoc .doc .Find ("#user-content-public " )
96+ profileDivs = htmlDoc .doc .Find ("[data-profile-view-as-member=false] " )
9797 assert .EqualValues (t , 1 , profileDivs .Length ())
9898
9999 dropDownDiv = htmlDoc .doc .Find ("#org-home-view-as-dropdown" )
@@ -103,14 +103,14 @@ func testOrgProfile(t *testing.T, u *url.URL) {
103103 resp = session .MakeRequest (t , req , http .StatusOK )
104104 htmlDoc = NewHTMLParser (t , resp .Body )
105105
106- profileDivs = htmlDoc .doc .Find ("#user-content-private " )
106+ profileDivs = htmlDoc .doc .Find ("[data-profile-view-as-member=true] " )
107107 assert .EqualValues (t , 1 , profileDivs .Length ())
108108
109109 req = NewRequest (t , "GET" , "/org3?view_as=public" )
110110 resp = session .MakeRequest (t , req , http .StatusOK )
111111 htmlDoc = NewHTMLParser (t , resp .Body )
112112
113- profileDivs = htmlDoc .doc .Find ("#user-content-public " )
113+ profileDivs = htmlDoc .doc .Find ("[data-profile-view-as-member=false] " )
114114 assert .EqualValues (t , 1 , profileDivs .Length ())
115115
116116 // PART 2: Each org has either one of private pr public profile
@@ -121,17 +121,17 @@ func testOrgProfile(t *testing.T, u *url.URL) {
121121 req = NewRequest (t , "GET" , "/org41" )
122122 resp = MakeRequest (t , req , http .StatusOK )
123123 htmlDoc = NewHTMLParser (t , resp .Body )
124- profileDivs = htmlDoc .doc .Find ("#user-content-public " )
124+ profileDivs = htmlDoc .doc .Find ("[data-profile-view-as-member=false] " )
125125 assert .EqualValues (t , 1 , profileDivs .Length ())
126126 dropDownDiv = htmlDoc .doc .Find ("#org-home-view-as-dropdown" )
127127 assert .EqualValues (t , 0 , dropDownDiv .Length ())
128128
129129 req = NewRequest (t , "GET" , "/org42" )
130130 resp = MakeRequest (t , req , http .StatusOK )
131131 htmlDoc = NewHTMLParser (t , resp .Body )
132- profileDivs = htmlDoc .doc .Find ("#user-content-public " )
132+ profileDivs = htmlDoc .doc .Find ("[data-profile-view-as-member=false] " )
133133 assert .EqualValues (t , 0 , profileDivs .Length ())
134- profileDivs = htmlDoc .doc .Find ("#user-content-public " )
134+ profileDivs = htmlDoc .doc .Find ("[data-profile-view-as-member=false] " )
135135 assert .EqualValues (t , 0 , profileDivs .Length ())
136136 dropDownDiv = htmlDoc .doc .Find ("#org-home-view-as-dropdown" )
137137 assert .EqualValues (t , 0 , dropDownDiv .Length ())
@@ -140,15 +140,15 @@ func testOrgProfile(t *testing.T, u *url.URL) {
140140 req = NewRequest (t , "GET" , "/org41" )
141141 resp = session .MakeRequest (t , req , http .StatusOK )
142142 htmlDoc = NewHTMLParser (t , resp .Body )
143- profileDivs = htmlDoc .doc .Find ("#user-content-public " )
143+ profileDivs = htmlDoc .doc .Find ("[data-profile-view-as-member=false] " )
144144 assert .EqualValues (t , 1 , profileDivs .Length ())
145145 dropDownDiv = htmlDoc .doc .Find ("#org-home-view-as-dropdown" )
146146 assert .EqualValues (t , 0 , dropDownDiv .Length ())
147147
148148 req = NewRequest (t , "GET" , "/org42" )
149149 resp = session .MakeRequest (t , req , http .StatusOK )
150150 htmlDoc = NewHTMLParser (t , resp .Body )
151- profileDivs = htmlDoc .doc .Find ("#user-content-private " )
151+ profileDivs = htmlDoc .doc .Find ("[data-profile-view-as-member=true] " )
152152 assert .EqualValues (t , 1 , profileDivs .Length ())
153153 dropDownDiv = htmlDoc .doc .Find ("#org-home-view-as-dropdown" )
154154 assert .EqualValues (t , 0 , dropDownDiv .Length ())
0 commit comments