Skip to content

Commit

Permalink
Merge pull request #8489 from alphagov/fix-ci-issue-by-separating-sel…
Browse files Browse the repository at this point in the history
…enium-based-tests

Fix selenium based tests failing in CI for an unknown reason
  • Loading branch information
Tuomas Nylund authored Nov 10, 2023
2 parents b6a9bab + 6282afe commit eda22df
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 22 deletions.
28 changes: 28 additions & 0 deletions features/edition-images-javascript.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# For an unknown reason selenium driver based image-tests began to fail in the CI workflow when executed in Github
# Running the tests from a separate feature-file seems to fix the issue
Feature: Images tab on edit edition

Background:
Given I am a writer

@javascript
Scenario: Image uploaded with cropping required
And a draft document with images exists
When I visit the images tab of the document with images
Then I should see a list with 2 images
When I upload a 960x960 image
Then I am redirected to a page for image cropping
When I click the "Save and continue" button on the crop page
And I update the image details and save
Then I should see a list with 3 image

@javascript
Scenario: Uploading an oversized file with duplicated filename
When a draft document with images exists
And I visit the images tab of the document with images
And I upload a 960x960 image
And I am redirected to a page for image cropping
And I click the "Save and continue" button on the crop page
And I update the image details and save
And I upload a 960x960 image
Then I should get 1 error message
22 changes: 0 additions & 22 deletions features/edition-images.feature
Original file line number Diff line number Diff line change
Expand Up @@ -49,30 +49,8 @@ Feature: Images tab on edit edition
And I update the image details and save
Then I should see a list with 1 image

@javascript
Scenario: Image uploaded with cropping required
And a draft document with images exists
When I visit the images tab of the document with images
Then I should see a list with 2 images
When I upload a 960x960 image
Then I am redirected to a page for image cropping
When I click the "Save and continue" button on the crop page
And I update the image details and save
Then I should see a list with 3 image

Scenario: No file uploaded
And I start drafting a new publication "Standard Beard Lengths"
When I visit the images tab of the document "Standard Beard Lengths"
And I click upload without attaching a file
Then I should get the error message "Image data file cannot be uploaded. Choose a valid JPEG, PNG, SVG or GIF."

@javascript
Scenario: Uploading an oversized file with duplicated filename
When a draft document with images exists
And I visit the images tab of the document with images
And I upload a 960x960 image
And I am redirected to a page for image cropping
And I click the "Save and continue" button on the crop page
And I update the image details and save
And I upload a 960x960 image
Then I should get 1 error message

0 comments on commit eda22df

Please sign in to comment.