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()
53
53
. DatabaseId . Should ( ) . Be ( _databaseId ) ;
54
54
55
55
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" ) ;
58
65
59
66
await _client . Pages . UpdateAsync ( page . Id , new PagesUpdateParameters
60
67
{
@@ -98,8 +105,15 @@ public async Task Bug_unable_to_create_page_with_select_property()
98
105
. DatabaseId . Should ( ) . Be ( _databaseId ) ;
99
106
100
107
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" ) ;
103
117
104
118
await _client . Pages . UpdateAsync ( page . Id , new PagesUpdateParameters
105
119
{
You can’t perform that action at this time.
0 commit comments