Browse Source

test: cypress corrections for i18n

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/1357/head
Raju Udava 3 years ago
parent
commit
afe34c9065
  1. 4
      packages/nc-gui/components/project/spreadsheet/views/formView.vue
  2. 16
      scripts/cypress/integration/common/4c_form_view_detailed.js

4
packages/nc-gui/components/project/spreadsheet/views/formView.vue

@ -33,7 +33,7 @@
style="border-bottom: 2px solid rgb(218,218,218)"
@click="addAllColumns()"
>
<!--add all-->
<!--Add all-->
{{ $t('general.addAll') }}
</span>
<span
@ -42,7 +42,7 @@
style="border-bottom: 2px solid rgb(218,218,218)"
@click="columns=[]"
>
<!--remove all-->
<!--Remove all-->
{{ $t('general.removeAll') }}
</span>
</div>

16
scripts/cypress/integration/common/4c_form_view_detailed.js

@ -87,7 +87,7 @@ export const genTest = (apiType, dbType) => {
it(`Validate ${viewType} view: Inverted order field member addition from menu`, () => {
cy.get(".col-md-4")
.find(".pointer.caption")
.contains("remove all")
.contains("Remove all")
.click();
// click fields in inverted order: LastUpdate, Country => City
@ -138,17 +138,17 @@ export const genTest = (apiType, dbType) => {
// ensure buttons exist on left hand menu
cy.get(".col-md-4")
.find(".pointer.caption")
.contains("add all")
.contains("Add all")
.should("not.exist");
cy.get(".col-md-4")
.find(".pointer.caption")
.contains("remove all")
.contains("Remove all")
.should("exist");
// click: remove-all
cy.get(".col-md-4")
.find(".pointer.caption")
.contains("remove all")
.contains("Remove all")
.click();
// form should not contain any "field remove icons" -- except for mandatory field (Country)
cy.get(".nc-form")
@ -158,15 +158,15 @@ export const genTest = (apiType, dbType) => {
// menu bar should contain 3 .pointer.item (LastUpdate, County->City)
cy.get(".col-md-4").find(".pointer.item").its("length").should("eq", 2);
// click: add all
// cy.get('.col-md-4').find('.pointer.caption').contains('remove all').should('not.exist')
// click: Add all
// cy.get('.col-md-4').find('.pointer.caption').contains('Remove all').should('not.exist')
cy.get(".col-md-4")
.find(".pointer.caption")
.contains("add all")
.contains("Add all")
.click();
cy.get(".col-md-4")
.find(".pointer.caption")
.contains("remove all")
.contains("Remove all")
.should("exist");
// form should contain "field remove icons"
cy.get(".nc-form").find(".nc-field-remove-icon").should("exist");

Loading…
Cancel
Save