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

MNT Add behat test for previewing elemental blocks #980

Merged

Conversation

GuySartorelli
Copy link
Member

Requires silverstripe/silverstripe-behat-extension#214

Tests non-inline-editable blocks can be previewed (functionality was fixed/added in #936)

@GuySartorelli GuySartorelli marked this pull request as ready for review April 27, 2022 07:23
@GuySartorelli GuySartorelli changed the title ENH Add behat test for previewing elemental blocks MNT Add behat test for previewing elemental blocks Apr 28, 2022
@GuySartorelli
Copy link
Member Author

@emteknetnz I found a way around the template conundrum! I'm surprised a TestOnly extension works to be honest, since it's in the context of the actual runtime of the site - but it works! 🎉

@GuySartorelli GuySartorelli self-assigned this May 24, 2022
@GuySartorelli
Copy link
Member Author

Some of the (unrelated to this PR) tests are failing, but they pass locally if I merge this into 4. I've rebased which should resolve the issues travis was having.

Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

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

Merge on green

@GuySartorelli
Copy link
Member Author

Ahh! These tests pass if I run them independently, but if I run the suite as a whole they fail. All of the tests that run after the new test are the ones which are failing.
I have discovered that this is caused by I set the CMS mode to "Preview mode" - It was still on preview mode when the remaining tests were meant to be performed because that is stored in the session. I have updated the tests to set back to edit mode.

@emteknetnz Since this is a change to the PR I probably need re-approval.

@emteknetnz
Copy link
Member

Travis is red

@GuySartorelli
Copy link
Member Author

Travis is now green! Composer got stuck (transport error) - restarting the job fixed it.

@emteknetnz emteknetnz merged commit b8d27ee into silverstripe:4 May 25, 2022
@emteknetnz emteknetnz deleted the pulls/4/test-preview-block branch May 25, 2022 05:38
menno-rdmkr pushed a commit to busting-bytes/silverstripe-elemental that referenced this pull request Dec 15, 2022
…est-preview-block

MNT Add behat test for previewing elemental blocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants