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)" style="border-bottom: 2px solid rgb(218,218,218)"
@click="addAllColumns()" @click="addAllColumns()"
> >
<!--add all--> <!--Add all-->
{{ $t('general.addAll') }} {{ $t('general.addAll') }}
</span> </span>
<span <span
@ -42,7 +42,7 @@
style="border-bottom: 2px solid rgb(218,218,218)" style="border-bottom: 2px solid rgb(218,218,218)"
@click="columns=[]" @click="columns=[]"
> >
<!--remove all--> <!--Remove all-->
{{ $t('general.removeAll') }} {{ $t('general.removeAll') }}
</span> </span>
</div> </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`, () => { it(`Validate ${viewType} view: Inverted order field member addition from menu`, () => {
cy.get(".col-md-4") cy.get(".col-md-4")
.find(".pointer.caption") .find(".pointer.caption")
.contains("remove all") .contains("Remove all")
.click(); .click();
// click fields in inverted order: LastUpdate, Country => City // click fields in inverted order: LastUpdate, Country => City
@ -138,17 +138,17 @@ export const genTest = (apiType, dbType) => {
// ensure buttons exist on left hand menu // ensure buttons exist on left hand menu
cy.get(".col-md-4") cy.get(".col-md-4")
.find(".pointer.caption") .find(".pointer.caption")
.contains("add all") .contains("Add all")
.should("not.exist"); .should("not.exist");
cy.get(".col-md-4") cy.get(".col-md-4")
.find(".pointer.caption") .find(".pointer.caption")
.contains("remove all") .contains("Remove all")
.should("exist"); .should("exist");
// click: remove-all // click: remove-all
cy.get(".col-md-4") cy.get(".col-md-4")
.find(".pointer.caption") .find(".pointer.caption")
.contains("remove all") .contains("Remove all")
.click(); .click();
// form should not contain any "field remove icons" -- except for mandatory field (Country) // form should not contain any "field remove icons" -- except for mandatory field (Country)
cy.get(".nc-form") cy.get(".nc-form")
@ -158,15 +158,15 @@ export const genTest = (apiType, dbType) => {
// menu bar should contain 3 .pointer.item (LastUpdate, County->City) // menu bar should contain 3 .pointer.item (LastUpdate, County->City)
cy.get(".col-md-4").find(".pointer.item").its("length").should("eq", 2); cy.get(".col-md-4").find(".pointer.item").its("length").should("eq", 2);
// click: add all // 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('Remove all').should('not.exist')
cy.get(".col-md-4") cy.get(".col-md-4")
.find(".pointer.caption") .find(".pointer.caption")
.contains("add all") .contains("Add all")
.click(); .click();
cy.get(".col-md-4") cy.get(".col-md-4")
.find(".pointer.caption") .find(".pointer.caption")
.contains("remove all") .contains("Remove all")
.should("exist"); .should("exist");
// form should contain "field remove icons" // form should contain "field remove icons"
cy.get(".nc-form").find(".nc-field-remove-icon").should("exist"); cy.get(".nc-form").find(".nc-field-remove-icon").should("exist");

Loading…
Cancel
Save