Skip to content

Commit

Permalink
fix: schema + e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Dec 12, 2024
1 parent 80c0b4b commit 99b7f3b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion backend/data/src/main/resources/db/changelog/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4011,7 +4011,7 @@
</changeSet>
<changeSet author="stepangranat (generated)" id="1733757292979-1">
<addColumn tableName="content_delivery_config">
<column name="lastPublishedFiles" type="jsonb"/>
<column name="last_published_files" type="jsonb"/>
</addColumn>
</changeSet>
</databaseChangeLog>
9 changes: 4 additions & 5 deletions e2e/cypress/e2e/projects/contentDelivery.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,16 @@ describe('Content delivery', () => {
contentDeliveryTestData.clean();
});

it('publishes content manually', () => {
it('publishes content manually and shows files', () => {
gcyAdvanced({ value: 'content-delivery-list-item', name: 'Azure' })
.findDcy('content-delivery-item-publish')
.click();
waitForGlobalLoading();
assertMessage('Content published successfully!');
gcyAdvanced({ value: 'content-delivery-list-item', name: 'Azure' })
.findDcy('content-delivery-last-published-section')
.should('be.visible')
.findDcy('content-delivery-published-file')
.should('contain', 'en.json');
.findDcy('content-delivery-files-button')
.click();
gcy('content-delivery-published-file').should('contain', 'en.json');
});

it('creates content delivery', () => {
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/support/dataCyType.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ declare namespace DataCy {
"content-delivery-add-button" |
"content-delivery-auto-publish-checkbox" |
"content-delivery-delete-button" |
"content-delivery-files-button" |
"content-delivery-form-custom-slug" |
"content-delivery-form-name" |
"content-delivery-form-save" |
"content-delivery-item-edit" |
"content-delivery-item-publish" |
"content-delivery-item-type" |
"content-delivery-last-published-section" |
"content-delivery-list-item" |
"content-delivery-prune-before-publish-checkbox" |
"content-delivery-published-file" |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ export const CdFilesRow = ({ data }: Props) => {
};

return (
<StyledLastPublish data-cy="content-delivery-last-published-section">
<StyledLastPublish>
<Box display="flex" justifyContent="space-between" gap={2}>
{Boolean(data.lastPublishedFiles.length) && (
<StyledButton
role="button"
onClick={() => setShowAllFiles(!showAllFiles)}
data-cy="content-delivery-files-button"
>
<Box sx={{ fontWeight: 500 }}>
<T keyName="content_delivery_last_publish_files" />
Expand Down

0 comments on commit 99b7f3b

Please sign in to comment.