Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Output faust version in dev|build|start commands. #1874

Merged
merged 12 commits into from
Apr 12, 2024
Prev Previous commit
Acceptance Test: Pin e2e tests to WP 6.4
theodesp committed Apr 12, 2024
commit 48cb974da419cb20287c345a8cae743ec861d5f5
2 changes: 1 addition & 1 deletion plugins/faustwp/.docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG WP_VERSION=latest
ARG WP_VERSION=6.4

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a stopper, but let's add a to-do for later on this... just in case.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FROM wordpress:${WP_VERSION}

25 changes: 6 additions & 19 deletions plugins/faustwp/tests/acceptance/CustomPostTypeCest.php
Original file line number Diff line number Diff line change
@@ -2,14 +2,6 @@

class CustomPostTypeCest
{
private function _clickElementIfPresent($I, $element)
{
try {
$I->click($element);
} catch (\PHPUnit_Framework_ExpectationFailedException $e) {
}
return;
}

public function _before(AcceptanceTester $I)
{
@@ -44,18 +36,13 @@ public function i_can_view_the_custom_post_type_preview_link(AcceptanceTester $I

$I->loginAsAdmin();
$I->amEditingPostWithId($cpt_id);
$this->_clickElementIfPresent($I, 'div.components-modal__header > button');
$I->click('button.editor-preview-dropdown__toggle');

$I->click('div.components-guide .components-modal__header button.components-button');
$I->click('button.block-editor-post-preview__button-toggle');
$I->wait(4); // Wait for previewlinks.js to modify button href.
$I->seeLink(
'Preview in new tab',
"${front_end_url}/document/${cpt_name}/?preview=true",
);

$I->click('Preview in new tab');
$I->switchToNextTab();
$I->wait(14); // Wait for authentication
$I->see($cpt_title, 'section h1');
$I->see($cpt_content, 'main.content-single .wrap p');
'Preview in new tab',
"${front_end_url}/document/${cpt_name}/?preview=true&previewPathname=" . rawurlencode("/document/cpt-document-preview/") . "&p=${cpt_id}&typeName=Document",
);
}
}
13 changes: 2 additions & 11 deletions plugins/faustwp/tests/acceptance/PostPreviewCest.php
Original file line number Diff line number Diff line change
@@ -2,14 +2,6 @@

class PostPreviewCest
{
private function _clickElementIfPresent($I, $element)
{
try {
$I->click($element);
} catch (\PHPUnit_Framework_ExpectationFailedException $e) {
}
return;
}
/**
* Ensure the nodejs site url is set as the post preview url.
*/
@@ -31,12 +23,11 @@ public function i_can_view_the_post_preview_link(AcceptanceTester $I)

$I->loginAsAdmin();
$I->amEditingPostWithId($post_id);
$this->_clickElementIfPresent($I, 'div.components-modal__header > button');
$I->click('button.editor-preview-dropdown__toggle');
$I->click('button.block-editor-post-preview__button-toggle');
$I->wait(4); // Wait for previewlinks.js to modify button href.
$I->seeLink(
'Preview in new tab',
"${front_end_url}/${post_name}/?preview=true",
"${front_end_url}/${post_name}/?preview=true&previewPathname=" . rawurlencode("/post-preview-post/") . "&p=${post_id}&typeName=Post",
);

$I->click('Preview in new tab');