From 289e8a8da60b407cd098f0aa43fa18573ec2c3cf Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Tue, 4 Oct 2022 18:55:25 +0100 Subject: [PATCH] Fixed staff acceptance test refs https://github.com/TryGhost/Ghost/commit/e0430b4efc557e0ba909d74b99c9a2ecdcb71131 - acceptance test had mixed up name/slug fields so was testing for incorrect values now that cmd+s inside the slug field is working as really expected --- ghost/admin/tests/acceptance/staff-test.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ghost/admin/tests/acceptance/staff-test.js b/ghost/admin/tests/acceptance/staff-test.js index 4f0957304d..575867f9ff 100644 --- a/ghost/admin/tests/acceptance/staff-test.js +++ b/ghost/admin/tests/acceptance/staff-test.js @@ -519,7 +519,7 @@ describe('Acceptance: Staff', function () { expect(params.users[0].name).to.equal('Test User'); // CMD-S shortcut works - await fillIn('[data-test-slug-input]', 'Test User'); + await fillIn('[data-test-slug-input]', 'New Slug'); await keyDown('cmd+s'); // Since we reset save status so there's no on-screen indication @@ -527,10 +527,11 @@ describe('Acceptance: Staff', function () { [lastRequest] = this.server.pretender.handledRequests.slice(-1); params = JSON.parse(lastRequest.requestBody); - expect(params.users[0].name).to.equal('Test User'); + // slug should have been correctly slugified before save + expect(params.users[0].slug).to.equal('new-slug'); // check that the history state has been updated - expect(newLocation).to.equal('Test User'); + expect(newLocation).to.equal('new-slug'); await fillIn('[data-test-slug-input]', 'white space'); await blur('[data-test-slug-input]');