-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(widgets): add translated default texts
- Loading branch information
ismay
committed
May 20, 2020
1 parent
662d884
commit c85342d
Showing
45 changed files
with
504 additions
and
79 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
cypress/integration/FileInputField/has_default_button_label.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Feature: Button label for the FileInputField | ||
|
||
Scenario: Rendering a FileInputField | ||
Given a default FileInputField is rendered | ||
Then the default button label is visible |
9 changes: 9 additions & 0 deletions
9
cypress/integration/FileInputField/has_default_button_label/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Given, Then } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('a default FileInputField is rendered', () => { | ||
cy.visitStory('FileInputField', 'Default') | ||
}) | ||
|
||
Then('the default button label is visible', () => { | ||
cy.contains('Upload a file').should('be.visible') | ||
}) |
5 changes: 5 additions & 0 deletions
5
cypress/integration/FileInputField/has_default_placeholder.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Feature: Placeholder for the FileInputField | ||
|
||
Scenario: Rendering a FileInputField | ||
Given a default FileInputField is rendered | ||
Then the default placeholder is visible |
9 changes: 9 additions & 0 deletions
9
cypress/integration/FileInputField/has_default_placeholder/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Given, Then } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('a default FileInputField is rendered', () => { | ||
cy.visitStory('FileInputField', 'Default') | ||
}) | ||
|
||
Then('the default placeholder is visible', () => { | ||
cy.contains('No file uploaded yet').should('be.visible') | ||
}) |
5 changes: 5 additions & 0 deletions
5
cypress/integration/FileInputFieldWithList/has_default_button_label.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Feature: Button label for the FileInputFieldWithList | ||
|
||
Scenario: Rendering a FileInputFieldWithList | ||
Given a default FileInputFieldWithList is rendered | ||
Then the default button label is visible |
9 changes: 9 additions & 0 deletions
9
cypress/integration/FileInputFieldWithList/has_default_button_label/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Given, Then } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('a default FileInputFieldWithList is rendered', () => { | ||
cy.visitStory('FileInputFieldWithList', 'With default texts') | ||
}) | ||
|
||
Then('the default button label is visible', () => { | ||
cy.contains('Upload a file').should('be.visible') | ||
}) |
5 changes: 5 additions & 0 deletions
5
cypress/integration/FileInputFieldWithList/has_default_placeholder.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Feature: Placeholder for the FileInputFieldWithList | ||
|
||
Scenario: Rendering a FileInputFieldWithList | ||
Given a default FileInputFieldWithList is rendered | ||
Then the default placeholder is visible |
9 changes: 9 additions & 0 deletions
9
cypress/integration/FileInputFieldWithList/has_default_placeholder/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Given, Then } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('a default FileInputFieldWithList is rendered', () => { | ||
cy.visitStory('FileInputFieldWithList', 'With default texts') | ||
}) | ||
|
||
Then('the default placeholder is visible', () => { | ||
cy.contains('No file uploaded yet').should('be.visible') | ||
}) |
5 changes: 5 additions & 0 deletions
5
cypress/integration/FileInputFieldWithList/has_default_remove_text.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Feature: Placeholder for the FileInputFieldWithList | ||
|
||
Scenario: Rendering a FileInputFieldWithList | ||
Given a default FileInputFieldWithList is rendered | ||
Then the default remove text is visible |
9 changes: 9 additions & 0 deletions
9
cypress/integration/FileInputFieldWithList/has_default_remove_text/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Given, Then } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('a default FileInputFieldWithList is rendered', () => { | ||
cy.visitStory('FileInputFieldWithList', 'With file and default texts') | ||
}) | ||
|
||
Then('the default remove text is visible', () => { | ||
cy.contains('Remove').should('be.visible') | ||
}) |
5 changes: 5 additions & 0 deletions
5
cypress/integration/MultiSelectField/has_default_clear_text.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Feature: Clear text for the MultiSelectField | ||
|
||
Scenario: Rendering a clearable MultiSelectField | ||
Given a clearable MultiSelectField with selected option is rendered | ||
Then the clear text is visible |
9 changes: 9 additions & 0 deletions
9
cypress/integration/MultiSelectField/has_default_clear_text/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Given, Then } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('a clearable MultiSelectField with selected option is rendered', () => { | ||
cy.visitStory('MultiSelectField', 'With clearable and selected option') | ||
}) | ||
|
||
Then('the clear text is visible', () => { | ||
cy.contains('Clear').should('be.visible') | ||
}) |
6 changes: 6 additions & 0 deletions
6
cypress/integration/MultiSelectField/has_default_empty_text.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Feature: Empty text for the MultiSelectField | ||
|
||
Scenario: Rendering an empty MultiSelectField | ||
Given an empty MultiSelectField is rendered | ||
When the Select is opened | ||
Then the empty text is visible |
13 changes: 13 additions & 0 deletions
13
cypress/integration/MultiSelectField/has_default_empty_text/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Given, Then, When } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('an empty MultiSelectField is rendered', () => { | ||
cy.visitStory('MultiSelectField', 'Without options') | ||
}) | ||
|
||
When('the Select is opened', () => { | ||
cy.get('[data-test="dhis2-uicore-select-input"]').click() | ||
}) | ||
|
||
Then('the empty text is visible', () => { | ||
cy.contains('No data found').should('be.visible') | ||
}) |
7 changes: 7 additions & 0 deletions
7
cypress/integration/MultiSelectField/has_default_filter_nomatch_text.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Feature: Nomatchtext for the MultiSelectField | ||
|
||
Scenario: Rendering a filterable MultiSelectField | ||
Given a filterable MultiSelectField is rendered | ||
When the Select is opened | ||
And a filter that does not match any options is entered | ||
Then the no match text is visible |
17 changes: 17 additions & 0 deletions
17
cypress/integration/MultiSelectField/has_default_filter_nomatch_text/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Given, Then, When } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('a filterable MultiSelectField is rendered', () => { | ||
cy.visitStory('MultiSelectField', 'With filterable') | ||
}) | ||
|
||
When('the Select is opened', () => { | ||
cy.get('[data-test="dhis2-uicore-select-input"]').click() | ||
}) | ||
|
||
When('a filter that does not match any options is entered', () => { | ||
cy.focused().type('Two') | ||
}) | ||
|
||
Then('the no match text is visible', () => { | ||
cy.contains('No options found').should('be.visible') | ||
}) |
6 changes: 6 additions & 0 deletions
6
cypress/integration/MultiSelectField/has_default_filter_placeholder.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Feature: Filter placeholder for the MultiSelectField | ||
|
||
Scenario: Rendering a filterable MultiSelectField | ||
Given a filterable MultiSelectField is rendered | ||
When the Select is opened | ||
Then the filter placeholder exists |
15 changes: 15 additions & 0 deletions
15
cypress/integration/MultiSelectField/has_default_filter_placeholder/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Given, Then, When } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('a filterable MultiSelectField is rendered', () => { | ||
cy.visitStory('MultiSelectField', 'With filterable') | ||
}) | ||
|
||
When('the Select is opened', () => { | ||
cy.get('[data-test="dhis2-uicore-select-input"]').click() | ||
}) | ||
|
||
Then('the filter placeholder exists', () => { | ||
cy.get( | ||
'[data-test="dhis2-uicore-multiselect-filterinput"] [placeholder="Type to filter options"]' | ||
).should('exist') | ||
}) |
6 changes: 6 additions & 0 deletions
6
cypress/integration/MultiSelectField/has_default_loading_text.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Feature: Filter placeholder for the MultiSelectField | ||
|
||
Scenario: Rendering a filterable MultiSelectField | ||
Given a loading MultiSelectField is rendered | ||
When the Select is opened | ||
Then the loading text is visible |
13 changes: 13 additions & 0 deletions
13
cypress/integration/MultiSelectField/has_default_loading_text/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Given, Then, When } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('a loading MultiSelectField is rendered', () => { | ||
cy.visitStory('MultiSelectField', 'With loading') | ||
}) | ||
|
||
When('the Select is opened', () => { | ||
cy.get('[data-test="dhis2-uicore-select-input"]').click() | ||
}) | ||
|
||
Then('the loading text is visible', () => { | ||
cy.contains('Loading options').should('be.visible') | ||
}) |
5 changes: 5 additions & 0 deletions
5
cypress/integration/SingleSelectField/has_default_clear_text.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Feature: Clear text for the SingleSelectField | ||
|
||
Scenario: Rendering a clearable SingleSelectField | ||
Given a clearable SingleSelectField with selected option is rendered | ||
Then the clear text is visible |
9 changes: 9 additions & 0 deletions
9
cypress/integration/SingleSelectField/has_default_clear_text/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Given, Then } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('a clearable SingleSelectField with selected option is rendered', () => { | ||
cy.visitStory('SingleSelectField', 'With clearable and selected option') | ||
}) | ||
|
||
Then('the clear text is visible', () => { | ||
cy.contains('Clear').should('be.visible') | ||
}) |
6 changes: 6 additions & 0 deletions
6
cypress/integration/SingleSelectField/has_default_empty_text.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Feature: Empty text for the SingleSelectField | ||
|
||
Scenario: Rendering an empty SingleSelectField | ||
Given an empty SingleSelectField is rendered | ||
When the Select is opened | ||
Then the empty text is visible |
13 changes: 13 additions & 0 deletions
13
cypress/integration/SingleSelectField/has_default_empty_text/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Given, Then, When } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('an empty SingleSelectField is rendered', () => { | ||
cy.visitStory('SingleSelectField', 'Without options') | ||
}) | ||
|
||
When('the Select is opened', () => { | ||
cy.get('[data-test="dhis2-uicore-select-input"]').click() | ||
}) | ||
|
||
Then('the empty text is visible', () => { | ||
cy.contains('No data found').should('be.visible') | ||
}) |
7 changes: 7 additions & 0 deletions
7
cypress/integration/SingleSelectField/has_default_filter_nomatch_text.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Feature: Nomatchtext for the SingleSelectField | ||
|
||
Scenario: Rendering a filterable SingleSelectField | ||
Given a filterable SingleSelectField is rendered | ||
When the Select is opened | ||
And a filter that does not match any options is entered | ||
Then the no match text is visible |
17 changes: 17 additions & 0 deletions
17
cypress/integration/SingleSelectField/has_default_filter_nomatch_text/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Given, Then, When } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('a filterable SingleSelectField is rendered', () => { | ||
cy.visitStory('SingleSelectField', 'With filterable') | ||
}) | ||
|
||
When('the Select is opened', () => { | ||
cy.get('[data-test="dhis2-uicore-select-input"]').click() | ||
}) | ||
|
||
When('a filter that does not match any options is entered', () => { | ||
cy.focused().type('Two') | ||
}) | ||
|
||
Then('the no match text is visible', () => { | ||
cy.contains('No options found').should('be.visible') | ||
}) |
6 changes: 6 additions & 0 deletions
6
cypress/integration/SingleSelectField/has_default_filter_placeholder.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Feature: Filter placeholder for the SingleSelectField | ||
|
||
Scenario: Rendering a filterable SingleSelectField | ||
Given a filterable SingleSelectField is rendered | ||
When the Select is opened | ||
Then the filter placeholder exists |
15 changes: 15 additions & 0 deletions
15
cypress/integration/SingleSelectField/has_default_filter_placeholder/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Given, Then, When } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('a filterable SingleSelectField is rendered', () => { | ||
cy.visitStory('SingleSelectField', 'With filterable') | ||
}) | ||
|
||
When('the Select is opened', () => { | ||
cy.get('[data-test="dhis2-uicore-select-input"]').click() | ||
}) | ||
|
||
Then('the filter placeholder exists', () => { | ||
cy.get( | ||
'[data-test="dhis2-uicore-singleselect-filterinput"] [placeholder="Type to filter options"]' | ||
).should('exist') | ||
}) |
6 changes: 6 additions & 0 deletions
6
cypress/integration/SingleSelectField/has_default_loading_text.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Feature: Filter placeholder for the SingleSelectField | ||
|
||
Scenario: Rendering a filterable SingleSelectField | ||
Given a loading SingleSelectField is rendered | ||
When the Select is opened | ||
Then the loading text is visible |
13 changes: 13 additions & 0 deletions
13
cypress/integration/SingleSelectField/has_default_loading_text/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Given, Then, When } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Given('a loading SingleSelectField is rendered', () => { | ||
cy.visitStory('SingleSelectField', 'With loading') | ||
}) | ||
|
||
When('the Select is opened', () => { | ||
cy.get('[data-test="dhis2-uicore-select-input"]').click() | ||
}) | ||
|
||
Then('the loading text is visible', () => { | ||
cy.contains('Loading options').should('be.visible') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.