Skip to content

Commit

Permalink
Try: fix end 2 end inline tokens test (#12459)
Browse files Browse the repository at this point in the history
The adding-inline-tokens.test.js test was failing on Travis, instead of an image upload being successful we got an error reporting that no permissions exist.

This commit uses 2 commands on the docker container to do the following actions:
Create an uploads folder inside wp-content.
Change the folder permissions to 766.
766 was chosen because according to the hierarchy we should follow when trying to fix permission problems available in https://codex.wordpress.org/Changing_File_Permissions is the most adequate value. The value bellow it (765) does not work.
  • Loading branch information
jorgefilipecosta authored Dec 4, 2018
1 parent 2fc34bc commit 46f789a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bin/install-wordpress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,9 @@ fi
echo -e $(status_message "Activating Gutenberg...")
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm $CLI plugin activate gutenberg >/dev/null

# Make sure the uploads folder exist and we have permissions to add files there.
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm $CONTAINER mkdir -p /var/www/html/wp-content/uploads
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm $CONTAINER chmod -v 767 /var/www/html/wp-content/uploads

# Install a dummy favicon to avoid 404 errors.
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm $CONTAINER touch /var/www/html/favicon.ico
2 changes: 1 addition & 1 deletion test/e2e/specs/adding-inline-tokens.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe( 'adding inline tokens', () => {
await newPost();
} );

it.skip( 'should insert inline image', async () => {
it( 'should insert inline image', async () => {
// Create a paragraph.
await clickBlockAppender();
await page.keyboard.type( 'a ' );
Expand Down

0 comments on commit 46f789a

Please sign in to comment.