File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
Test/Notion.IntegrationTests Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,15 @@ public async Task CreateAsync_CreatesANewPage()
5353 . DatabaseId . Should ( ) . Be ( _databaseId ) ;
5454
5555 page . Properties . Should ( ) . ContainKey ( "Name" ) ;
56- page . Properties [ "Name" ] . Should ( ) . BeOfType < TitlePropertyValue > ( ) . Which
57- . Title . First ( ) . PlainText . Should ( ) . Be ( "Test Page Title" ) ;
56+ var pageProperty = page . Properties [ "Name" ] . Should ( ) . BeOfType < PagePropertyOnId > ( ) . Subject ;
57+
58+ var titleProperty = ( ListPropertyItem ) await _client . Pages . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
59+ {
60+ PageId = page . Id ,
61+ PropertyId = pageProperty . Id
62+ } ) ;
63+
64+ titleProperty . Results . First ( ) . As < TitlePropertyItem > ( ) . Title . PlainText . Should ( ) . Be ( "Test Page Title" ) ;
5865
5966 await _client . Pages . UpdateAsync ( page . Id , new PagesUpdateParameters
6067 {
@@ -98,8 +105,15 @@ public async Task Bug_unable_to_create_page_with_select_property()
98105 . DatabaseId . Should ( ) . Be ( _databaseId ) ;
99106
100107 page . Properties . Should ( ) . ContainKey ( "Name" ) ;
101- page . Properties [ "Name" ] . Should ( ) . BeOfType < TitlePropertyValue > ( ) . Which
102- . Title . First ( ) . PlainText . Should ( ) . Be ( "Test Page Title" ) ;
108+ var pageProperty = page . Properties [ "Name" ] . Should ( ) . BeOfType < PagePropertyOnId > ( ) . Subject ;
109+
110+ var titleProperty = ( ListPropertyItem ) await _client . Pages . RetrievePagePropertyItem ( new RetrievePropertyItemParameters
111+ {
112+ PageId = page . Id ,
113+ PropertyId = pageProperty . Id
114+ } ) ;
115+
116+ titleProperty . Results . First ( ) . As < TitlePropertyItem > ( ) . Title . PlainText . Should ( ) . Be ( "Test Page Title" ) ;
103117
104118 await _client . Pages . UpdateAsync ( page . Id , new PagesUpdateParameters
105119 {
You can’t perform that action at this time.
0 commit comments