forked from TYPO3-Documentation/t3docs-screenshots
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Add TYPO3 environment "Workspaces" (TYPO3-Documentation#236)
* [FEATURE] Add TYPO3 environment "Workspaces" solves TYPO3-Documentation#235 * [FEATURE] Add TYPO3 environment "Workspaces" Fix Example Configuration solves TYPO3-Documentation#235 * [BUGFIX] Reset accidental changes to comment of config.yaml Co-authored-by: lina.wolf <[email protected]>
- Loading branch information
Showing
16 changed files
with
259 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
packages/screenshots/Classes/Runner/Codeception/Support/Extension/WorkspacesEnvironment.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
namespace TYPO3\Documentation\Screenshots\Runner\Codeception\Support\Extension; | ||
|
||
/* | ||
* This file is part of the TYPO3 project. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
use Codeception\Event\SuiteEvent; | ||
use TYPO3\CMS\Core\Core\ApplicationContext; | ||
use TYPO3\CMS\Core\Core\Bootstrap; | ||
use TYPO3\CMS\Core\Core\Environment; | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
use TYPO3\CMS\Extbase\Object\ObjectManager; | ||
use TYPO3\CMS\Extensionmanager\Utility\InstallUtility; | ||
use TYPO3\TestingFramework\Core\Acceptance\Extension\BackendEnvironment; | ||
|
||
/** | ||
* Load all core extensions and EXT:extension_builder and EXT:screenshots | ||
*/ | ||
class WorkspacesEnvironment extends BackendEnvironment | ||
{ | ||
/** | ||
* @var array | ||
*/ | ||
protected $localConfig = [ | ||
// Order matters: Align sorting of core extensions with /public/typo3conf/PackageStates.php | ||
'coreExtensionsToLoad' => [ | ||
'core', | ||
'scheduler', | ||
'extbase', | ||
'fluid', | ||
'frontend', | ||
'fluid_styled_content', | ||
'filelist', | ||
'impexp', | ||
'form', | ||
'install', | ||
'info', | ||
'linkvalidator', | ||
'reports', | ||
'redirects', | ||
'recordlist', | ||
'backend', | ||
'indexed_search', | ||
'recycler', | ||
'setup', | ||
'rte_ckeditor', | ||
'adminpanel', | ||
'belog', | ||
'beuser', | ||
'dashboard', | ||
'extensionmanager', | ||
'felogin', | ||
'filemetadata', | ||
'lowlevel', | ||
'opendocs', | ||
'seo', | ||
'sys_note', | ||
't3editor', | ||
'tstemplate', | ||
'viewpage', | ||
'workspaces' | ||
], | ||
'testExtensionsToLoad' => [ | ||
'typo3conf/ext/screenshots', | ||
], | ||
'xmlDatabaseFixtures' => [ | ||
'EXT:screenshots/Classes/Runner/Codeception/Fixtures/StyleguideEnvironment/be_groups.xml', | ||
'EXT:screenshots/Classes/Runner/Codeception/Fixtures/StyleguideEnvironment/be_sessions.xml', | ||
'EXT:screenshots/Classes/Runner/Codeception/Fixtures/StyleguideEnvironment/be_users.xml', | ||
], | ||
]; | ||
|
||
/** | ||
* Initialize TYPO3 instance | ||
* | ||
* @param SuiteEvent $suiteEvent | ||
*/ | ||
public function bootstrapTypo3Environment(SuiteEvent $suiteEvent): void | ||
{ | ||
parent::bootstrapTypo3Environment($suiteEvent); | ||
|
||
Environment::initialize( | ||
new ApplicationContext('Testing'), | ||
Environment::isCli(), | ||
Environment::isComposerMode(), | ||
Environment::getProjectPath(), | ||
Environment::getPublicPath(), | ||
Environment::getVarPath(), | ||
Environment::getConfigPath(), | ||
Environment::getBackendPath() . '/index.php', | ||
Environment::isWindows() ? 'WINDOWS' : 'UNIX' | ||
); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
packages/screenshots/Classes/Runner/Codeception/Workspaces/WorkspacesCest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
namespace TYPO3\Documentation\Screenshots\Runner\Codeception\ExtensionBuilder; | ||
|
||
/* | ||
* This file is part of the TYPO3 project. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
use TYPO3\Documentation\Screenshots\Runner\Codeception\AbstractBaseCest; | ||
use TYPO3\Documentation\Screenshots\Runner\Codeception\Support\Photographer; | ||
|
||
/** | ||
* Run all actions of TYPO3 environment "ExtensionBuilder" | ||
*/ | ||
class WorkspacesCest extends AbstractBaseCest | ||
{ | ||
/** | ||
* @param Photographer $I | ||
*/ | ||
public function makeScreenshots(Photographer $I): void | ||
{ | ||
$I->reloadBackend('admin'); | ||
parent::runSuite($I, 'Workspaces'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "t3docs/screenshots-workspaces", | ||
"description" : "TYPO3 Screenshots Workspaces", | ||
"require-dev": { | ||
"typo3/cms-workspaces": "dev-master as 11.5.0" | ||
}, | ||
"scripts": { | ||
"setup-suite": [ | ||
"typo3cms install:setup --no-interaction --database-user-name root --database-user-password root --database-host-name db --admin-user-name admin --admin-password password --site-setup-type site", | ||
"cp res/AdditionalConfiguration.php public/typo3conf/" | ||
] | ||
}, | ||
"extra": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
/** | ||
* Nginx terminates SSL, so TYPO3 struggles with verifying the request port (443 <-> 80). | ||
* Allow any port by passing here the domain name without defining the port. | ||
*/ | ||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = 'workspaces\.t3docs-screenshots\.ddev\.site'; |