Skip to content

Commit a4da14b

Browse files
committed
Added options to disable Help Center as default & update secrets
1 parent 78f7b12 commit a4da14b

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

.github/workflows/browser-tests.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
test-suite: '--profile=browser --suite=admin-ui-full --tags=@IbexaHeadless'
2828
test-setup-phase-1: '--profile=setup --suite=personas --mode=standard'
2929
test-setup-phase-2: '--profile=setup --suite=content-translation --mode=standard'
30-
job-count: 2
30+
test-setup-phase-3: '--profile=setup --suite=user-settings --mode=standard'
31+
job-count: 3
3132
timeout: 40
3233
secrets: inherit
3334
admin-ui-experience-commerce:
@@ -38,7 +39,8 @@ jobs:
3839
test-suite: '--profile=browser --suite=admin-ui-full --tags=@IbexaExperience,@IbexaCommerce'
3940
test-setup-phase-1: '--profile=setup --suite=personas --mode=standard'
4041
test-setup-phase-2: '--profile=setup --suite=content-translation --mode=standard'
41-
job-count: 2
42+
test-setup-phase-3: '--profile=setup --suite=user-settings --mode=standard'
43+
job-count: 3
4244
timeout: 40
4345
secrets: inherit
4446
page-builder:
@@ -48,5 +50,7 @@ jobs:
4850
project-edition: 'experience'
4951
test-suite: '--profile=browser --suite=personas'
5052
test-setup-phase-1: '--profile=setup --suite=personas --tags=@setup --mode=standard'
53+
test-setup-phase-2: '--profile=setup --suite=user-settings --mode=standard'
54+
job-count: 2
5155
timeout: 40
5256
secrets: inherit

src/lib/Behat/BrowserContext/UserPreferencesContext.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,14 @@ public function iSetAutosaveDraftValue(): void
5959
$this->userSettingsPage->verifyIsLoaded();
6060
$this->userSettingsPage->disableAutosave();
6161
}
62+
63+
/**
64+
* @Given I disable Help center
65+
*/
66+
public function iDisableHelpCenter(): void
67+
{
68+
$this->userSettingsPage->openBrowsingEditionPage();
69+
$this->userSettingsPage->verifyIsLoaded();
70+
$this->userSettingsPage->disableHelpCenter();
71+
}
6272
}

src/lib/Behat/Page/UserSettingsPage.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ protected function specifyLocators(): array
6060
new VisibleCSSLocator('title', '.ibexa-edit-header__title,.ibexa-page-title__content'),
6161
new VisibleCSSLocator('autosaveDraftValueDropdown', '#user_setting_update_autosave div.ibexa-dropdown__wrapper > ul'),
6262
new VisibleCSSLocator('autosaveIntervalEdit', '#user_setting_update_autosave_interval_value'),
63+
new VisibleCSSLocator('helpCenterValueDropdown', '#user_setting_update_help_center div.ibexa-dropdown__wrapper > ul'),
6364
];
6465
}
6566

@@ -94,4 +95,21 @@ public function getName(): string
9495
{
9596
return 'User settings';
9697
}
98+
99+
public function openBrowsingEditionPage(): void
100+
{
101+
$this->getHTMLPage()
102+
->findAll(new VisibleCSSLocator('settingsSection', '#ibexa-tab-my-preferences .ibexa-details'))
103+
->getByCriterion(new ChildElementTextCriterion(new VisibleCSSLocator('settingHeader', '.ibexa-table-header__headline'), 'Browsing'))
104+
->find(new VisibleCSSLocator('editButton', ' .ibexa-btn__label'))
105+
->assert()->textEquals('Edit')
106+
->click();
107+
}
108+
109+
public function disableHelpCenter(): void
110+
{
111+
$this->contentActionsMenu->verifyIsLoaded();
112+
$this->getHTMLPage()->find($this->getLocator('autosaveDraftValueDropdown'))->click();
113+
$this->ibexaDropdown->selectOption('Disabled');
114+
}
97115
}

0 commit comments

Comments
 (0)