Skip to content

Commit

Permalink
Merge pull request #1033 from geonetwork/remove-open-data-toggle
Browse files Browse the repository at this point in the history
[Editor]: Hide open data toggle
  • Loading branch information
cmoinier authored Nov 5, 2024
2 parents a03dd41 + 16b03ad commit e8eb1e1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 25 deletions.
45 changes: 23 additions & 22 deletions apps/metadata-editor-e2e/src/e2e/edit.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,28 +691,29 @@ describe('editor form', () => {
})
})
describe('Access and constraints', () => {
describe('Open data switch', () => {
beforeEach(() => {
cy.get('@accessContactPageBtn').click()
})
describe('When the open data switch is unchecked', () => {
it('should display the licence form field', () => {
cy.get('gn-ui-form-field-license').should('be.visible')
cy.get('gn-ui-form-field-license')
.find('button')
.children('div')
.first()
.invoke('text')
.should('eq', ' Creative Commons CC-BY ')
})
})
describe('When the open data switch is checked', () => {
it('should not display the licence form field', () => {
cy.get('[data-cy="openDataToggle"]').click()
cy.get('gn-ui-form-field-license').should('not.exist')
})
})
})
// TEMPORARY - to be removed when the open data switch is back
// describe('Open data switch', () => {
// beforeEach(() => {
// cy.get('@accessContactPageBtn').click()
// })
// describe('When the open data switch is unchecked', () => {
// it('should display the licence form field', () => {
// cy.get('gn-ui-form-field-license').should('be.visible')
// cy.get('gn-ui-form-field-license')
// .find('button')
// .children('div')
// .first()
// .invoke('text')
// .should('eq', ' Creative Commons CC-BY ')
// })
// })
// describe('When the open data switch is checked', () => {
// it('should not display the licence form field', () => {
// cy.get('[data-cy="openDataToggle"]').click()
// cy.get('gn-ui-form-field-license').should('not.exist')
// })
// })
// })
describe('licenses', () => {
beforeEach(() => {
cy.get('@accessContactPageBtn').click()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<ng-container *ngIf="model === 'licenses'">
<!-- TEMPORARY - disabling the open data switch -->
<!-- <ng-container *ngIf="model === 'licenses'">
<gn-ui-form-field-open-data
[value]="valueAsConstraints"
(valueChange)="valueChange.emit($event)"
(openDataChange)="isHidden = $event"
></gn-ui-form-field-open-data>
</ng-container>
<div class="flex flex-col h-full" *ngIf="!isHidden">
</ng-container> -->
<div class="flex flex-col h-full">
<ng-container *ngIf="withoutWrapper; else withGenericWrapper">
<ng-container *ngTemplateOutlet="fieldContent"></ng-container>
</ng-container>
Expand Down

0 comments on commit e8eb1e1

Please sign in to comment.