Skip to content

Commit

Permalink
chore: wip debug
Browse files Browse the repository at this point in the history
  • Loading branch information
theodesp committed Aug 14, 2024
1 parent 8ea5aaf commit 3e8128f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
13 changes: 11 additions & 2 deletions tests/unit/CoreTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,28 @@ public function tearDown(): void {
}

public function test_retrieve_core_table_attribute_fields() {
$this->markTestSkipped('must be revisited since the test is failing on the CI for an unknown reason');
$query = '
fragment CoreTableBlockFragment on CoreTable {
attributes {
caption
align
anchor
}
}
query GetPosts {
posts(first: 1) {
nodes {
editorBlocks(flat: true) {
editorBlocks {
name
...CoreTableBlockFragment
}
}
}
}
';
$actual = graphql( array( 'query' => $query ) );
print_r($actual);
$node = $actual['data']['posts']['nodes'][0];
$this->assertEquals( $node['editorBlocks'][0]['name'], 'core/table' );
// There should be only one block using that query when not using flat: true
Expand Down
23 changes: 21 additions & 2 deletions tests/unit/CoreVideoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,39 @@ public function tearDown(): void {
}

public function test_retrieve_core_video_attributes() {
$this->markTestSkipped('must be revisited since the test is failing on the CI for an unknown reason');
$query = '
fragment CoreVideoBlockFragment on CoreVideo {
attributes {
align
anchor
autoplay
tracks
muted
caption
preload
src
playsInline
controls
loop
poster
id
}
}
query GetPosts {
posts(first: 1) {
nodes {
databaseId
editorBlocks(flat: true) {
editorBlocks {
name
...CoreVideoBlockFragment
}
}
}
}
';
$actual = graphql( array( 'query' => $query ) );
print_r($actual);
$node = $actual['data']['posts']['nodes'][0];

// Verify that the ID of the first post matches the one we just created.
Expand Down

0 comments on commit 3e8128f

Please sign in to comment.