Skip to content

Commit

Permalink
File Field: UI Cancel/Remove (keystonejs#77)
Browse files Browse the repository at this point in the history
* update to FlexGroup allows text-overflow on children
* comprehensive change states for file fields
* lint/prettier -- ignore public directory in test-project
  • Loading branch information
jossmac authored May 24, 2018
1 parent 27ac02b commit bb84dad
Show file tree
Hide file tree
Showing 9 changed files with 502 additions and 142 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ coverage
dist
flow-typed
reports
packages/test-project/public
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ package.json
packages/icons/icons/*
reports
coverage
packages/test-project/public
6 changes: 4 additions & 2 deletions cypress/integration/update-user-attachment_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Adding a file', function() {
cy.writeFile('cypress/fixtures/upload.txt', fileContent);
cy.upload_file('input[name=attachment][type=file]', 'upload.txt');
cy.get('button[type="submit"]').click();
cy.get('a[href$="upload.txt"]');
cy.contains('-upload.txt');
return cy
.graphql_query(
`
Expand All @@ -33,7 +33,9 @@ describe('Adding a file', function() {
)
.then(({ User: { attachment } }) => {
// Assert the URL is visible in the admin UI
cy.get(`a[href$="${attachment.publicUrl}"]`).should('be.visible');
cy
.contains(`${attachment.publicUrl.split('/')[3]}`)
.should('be.visible');

// Assert the file contents are what we uploaded
cy
Expand Down
3 changes: 2 additions & 1 deletion packages/fields/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
"dependencies": {
"@keystonejs/ui": "^5.0.0",
"@keystonejs/utils": "^1.0.0",
"@keystonejs/icons": "^1.0.0",
"apollo-upload-server": "^5.0.0",
"graphql-tag": "^2.8.0",
"mongoose": "^5.0.14",
"react-apollo": "^2.1.3"
}
}
}
Loading

0 comments on commit bb84dad

Please sign in to comment.