Resolve a couple of behat issues (#2830)

* FIX Correctly add message to reactstrap-confirm

* MNT Fix behat tests
This commit is contained in:
Guy Sartorelli 2023-01-30 10:32:26 +13:00 committed by GitHub
parent 081eea42c5
commit b02beba7ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 13 deletions

File diff suppressed because one or more lines are too long

View File

@ -497,12 +497,13 @@ $.entwine('ss', function($){
'By changing the URL segment visitors will not be able to view it.'
);
if (await reactConfirm(message, {
if (await reactConfirm({
title: i18n._t(
'CMS.RemoveHomePageWarningTitle',
'Remove your home page?'
),
confirmLabel: i18n._t(
message,
confirmText: i18n._t(
'CMS.RemoveHomePageWarningLabel',
'Remove'
),

View File

@ -169,12 +169,13 @@ $.entwine('ss.tree', function($) {
'By changing the URL segment visitors will not be able to view it.'
);
return await reactConfirm(message, {
return await reactConfirm({
title: i18n._t(
'CMS.RemoveHomePageWarningTitle',
'Remove your home page?'
),
confirmLabel: i18n._t(
message,
confirmText: i18n._t(
'CMS.RemoveHomePageWarningLabel',
'Remove'
),

View File

@ -31,7 +31,7 @@ So that I can link to a external website or a page on my site
And I press the "Insert link" HTML field button
And I click "Page on this site" in the ".tox-collection__group" element
And I should see an "form#Form_editorInternalLink" element
Then I should see "About Us" in the ".treedropdownfield__value-container" element
Then I should see "About Us" in the "#Form_editorInternalLink_PageID_Holder .treedropdownfield__value-container" element
And the "Link description" field should contain "my desc"
# This doesn't seem to suffer from that issue
When I select "Home" in the "#Form_editorInternalLink_PageID_Holder" tree dropdown

View File

@ -19,10 +19,10 @@ So that I can link to a external website or a page on my site
And I press the "Insert link" HTML field button
And I click "Anchor on a page" in the ".tox-collection__group" element
Then I should see an "form#Form_editorAnchorLink" element
And I should see "About Us" in the ".treedropdownfield__value-container" element
And I should see "About Us" in the "#Form_editorAnchorLink_PageID_Holder .treedropdownfield__value-container" element
When I select "Details" in the "#Form_editorAnchorLink_PageID_Holder" tree dropdown
And I select "youranchor" in the "#Form_editorAnchorLink_Anchor_Holder" anchor dropdown
Then I should see "youranchor" in the ".anchorselectorfield__value-container" element
Then I should see "youranchor" in the "#Form_editorAnchorLink_Anchor_Holder .anchorselectorfield__value-container" element
When I fill in "my desc" for "Link description"
And I press the "Insert link" button
Then the "Content" HTML field should contain "<a title="my desc" href="[sitetree_link,id=3]#youranchor">awesome</a>"
@ -34,9 +34,9 @@ So that I can link to a external website or a page on my site
And I press the "Insert link" HTML field button
And I click "Anchor on a page" in the ".tox-collection__group" element
Then I should see an "form#Form_editorAnchorLink" element
And I should see "About Us" in the ".treedropdownfield__value-container" element
And I should see "About Us" in the "#Form_editorAnchorLink_PageID_Holder .treedropdownfield__value-container" element
When I select "dataobject-anchor" in the "#Form_editorAnchorLink_Anchor_Holder" anchor dropdown
Then I should see "dataobject-anchor" in the ".anchorselectorfield__value-container" element
Then I should see "dataobject-anchor" in the "#Form_editorAnchorLink_Anchor_Holder .anchorselectorfield__value-container" element
When I fill in "my desc" for "Link description"
And I press the "Insert link" button
Then the "Content" HTML field should contain "<a title="my desc" href="[sitetree_link,id=2]#dataobject-anchor">awesome</a>"
@ -49,11 +49,11 @@ So that I can link to a external website or a page on my site
And I press the "Insert link" HTML field button
And I click "Anchor on a page" in the ".tox-collection__group" element
Then I should see an "form#Form_editorAnchorLink" element
And I should see "About Us" in the ".treedropdownfield__value-container" element
And I should see "About Us" in the "#Form_editorAnchorLink_PageID_Holder .treedropdownfield__value-container" element
When I click on the ".anchorselectorfield__dropdown-indicator" element
Then I should see "dataobject-anchor" in the ".anchorselectorfield__menu-list" element
When I select "unsaved-anchor" in the "#Form_editorAnchorLink_Anchor_Holder" anchor dropdown
Then I should see "unsaved-anchor" in the ".anchorselectorfield__value-container" element
Then I should see "unsaved-anchor" in the "#Form_editorAnchorLink_Anchor_Holder .anchorselectorfield__value-container" element
When I fill in "my desc" for "Link description"
And I press the "Insert link" button
Then the "Content" HTML field should contain "<a title="my desc" href="[sitetree_link,id=2]#unsaved-anchor">awesome</a>"