mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Capitalization in new colum menu
Summary: - "Add Column" -> "Add column" - "Detect Duplicates in" -> "Detect duplicates in" - "Last Updated At" -> "Last updated at" - "Created By" (At) -> "Created by" (at) - "Last Updated By" -> "Last updated by" Test Plan: I looked at menu and cannot see any more capital letters anywhere other that begining of the menu position. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D4127
This commit is contained in:
parent
a1c62f32f4
commit
8038ee881c
@ -50,7 +50,7 @@ function buildAddNewColumMenuSection(gridView: GridView, index?: number): DomEle
|
|||||||
async () => {
|
async () => {
|
||||||
await gridView.insertColumn(null, {index});
|
await gridView.insertColumn(null, {index});
|
||||||
},
|
},
|
||||||
t("Add Column"),
|
t("Add column"),
|
||||||
testId('new-columns-menu-add-new'),
|
testId('new-columns-menu-add-new'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -184,9 +184,9 @@ function buildTimestampMenuItems(gridView: GridView, index?: number) {
|
|||||||
return menuItemSubmenu(() => [
|
return menuItemSubmenu(() => [
|
||||||
menuItem(
|
menuItem(
|
||||||
async () => {
|
async () => {
|
||||||
await gridView.insertColumn(t('Created At'), {
|
await gridView.insertColumn(t('Created at'), {
|
||||||
colInfo: {
|
colInfo: {
|
||||||
label: t('Created At'),
|
label: t('Created at'),
|
||||||
type: `DateTime:${gridView.gristDoc.docModel.docInfoRow.timezone()}`,
|
type: `DateTime:${gridView.gristDoc.docModel.docInfoRow.timezone()}`,
|
||||||
isFormula: false,
|
isFormula: false,
|
||||||
formula: 'NOW()',
|
formula: 'NOW()',
|
||||||
@ -202,9 +202,9 @@ function buildTimestampMenuItems(gridView: GridView, index?: number) {
|
|||||||
),
|
),
|
||||||
menuItem(
|
menuItem(
|
||||||
async () => {
|
async () => {
|
||||||
await gridView.insertColumn(t('Last Updated At'), {
|
await gridView.insertColumn(t('Last updated at'), {
|
||||||
colInfo: {
|
colInfo: {
|
||||||
label: t('Last Updated At'),
|
label: t('Last updated at'),
|
||||||
type: `DateTime:${gridView.gristDoc.docModel.docInfoRow.timezone()}`,
|
type: `DateTime:${gridView.gristDoc.docModel.docInfoRow.timezone()}`,
|
||||||
isFormula: false,
|
isFormula: false,
|
||||||
formula: 'NOW()',
|
formula: 'NOW()',
|
||||||
@ -228,9 +228,9 @@ function buildAuthorshipMenuItems(gridView: GridView, index?: number) {
|
|||||||
return menuItemSubmenu(() => [
|
return menuItemSubmenu(() => [
|
||||||
menuItem(
|
menuItem(
|
||||||
async () => {
|
async () => {
|
||||||
await gridView.insertColumn(t('Created By'), {
|
await gridView.insertColumn(t('Created by'), {
|
||||||
colInfo: {
|
colInfo: {
|
||||||
label: t('Created By'),
|
label: t('Created by'),
|
||||||
type: 'Text',
|
type: 'Text',
|
||||||
isFormula: false,
|
isFormula: false,
|
||||||
formula: 'user.Name',
|
formula: 'user.Name',
|
||||||
@ -246,9 +246,9 @@ function buildAuthorshipMenuItems(gridView: GridView, index?: number) {
|
|||||||
),
|
),
|
||||||
menuItem(
|
menuItem(
|
||||||
async () => {
|
async () => {
|
||||||
await gridView.insertColumn(t('Last Updated By'), {
|
await gridView.insertColumn(t('Last updated by'), {
|
||||||
colInfo: {
|
colInfo: {
|
||||||
label: t('Last Updated By'),
|
label: t('Last updated by'),
|
||||||
type: 'Text',
|
type: 'Text',
|
||||||
isFormula: false,
|
isFormula: false,
|
||||||
formula: 'user.Name',
|
formula: 'user.Name',
|
||||||
@ -329,7 +329,7 @@ function buildDetectDuplicatesMenuItems(gridView: GridView, index?: number) {
|
|||||||
{searchInputPlaceholder: t('Search columns')}
|
{searchInputPlaceholder: t('Search columns')}
|
||||||
),
|
),
|
||||||
{allowNothingSelected: true},
|
{allowNothingSelected: true},
|
||||||
t('Detect Duplicates in...'),
|
t('Detect duplicates in...'),
|
||||||
testId('new-columns-menu-shortcuts-duplicates'),
|
testId('new-columns-menu-shortcuts-duplicates'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
|
"use strict";
|
||||||
import { assert, driver } from 'mocha-webdriver';
|
import { assert, driver } from 'mocha-webdriver';
|
||||||
import { $, gu, test } from 'test/nbrowser/gristUtil-nbrowser';
|
import { $, gu, test } from 'test/nbrowser/gristUtil-nbrowser';
|
||||||
|
|
||||||
const colHeaderScrollOpts = {block: "start", inline: "end"};
|
const colHeaderScrollOpts = {block: "start", inline: "end"};
|
||||||
|
|
||||||
describe('ColumnOps.ntest', function() {
|
describe('ColumnOps.ntest', function() {
|
||||||
|
gu.bigScreen();
|
||||||
const cleanup = test.setupTestSuite(this);
|
const cleanup = test.setupTestSuite(this);
|
||||||
|
|
||||||
before(async function() {
|
before(async function() {
|
||||||
@ -41,7 +43,7 @@ describe('ColumnOps.ntest', function() {
|
|||||||
await assert.isPresent(gu.getColumnHeader('A'), false);
|
await assert.isPresent(gu.getColumnHeader('A'), false);
|
||||||
await $('.mod-add-column').scrollIntoView(true);
|
await $('.mod-add-column').scrollIntoView(true);
|
||||||
await $('.mod-add-column').click();
|
await $('.mod-add-column').click();
|
||||||
await gu.actions.selectFloatingOption('Add Column');
|
await gu.actions.selectFloatingOption('Add column');
|
||||||
await gu.userActionsCollect(true);
|
await gu.userActionsCollect(true);
|
||||||
await gu.waitToPass(() => gu.getColumnHeader('A'));
|
await gu.waitToPass(() => gu.getColumnHeader('A'));
|
||||||
await gu.getOpenEditingLabel(await gu.getColumnHeader('A')).wait().sendKeys($.ENTER);
|
await gu.getOpenEditingLabel(await gu.getColumnHeader('A')).wait().sendKeys($.ENTER);
|
||||||
@ -76,7 +78,7 @@ describe('ColumnOps.ntest', function() {
|
|||||||
await gu.waitForServer();
|
await gu.waitForServer();
|
||||||
await assert.isPresent(gu.getColumnHeader('Name'), false);
|
await assert.isPresent(gu.getColumnHeader('Name'), false);
|
||||||
|
|
||||||
// Then show it using the add column menu
|
// Then show it using the Add column menu
|
||||||
await $('.mod-add-column').scrollIntoView(true);
|
await $('.mod-add-column').scrollIntoView(true);
|
||||||
await $(".mod-add-column").click();
|
await $(".mod-add-column").click();
|
||||||
await showColumn('Name');
|
await showColumn('Name');
|
||||||
@ -84,7 +86,7 @@ describe('ColumnOps.ntest', function() {
|
|||||||
await assert.isPresent(gu.getColumnHeader('Name'), true);
|
await assert.isPresent(gu.getColumnHeader('Name'), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("[+] button show add column directly if no hidden columns", async function() {
|
it("[+] button show Add column directly if no hidden columns", async function() {
|
||||||
await $('.mod-add-column').scrollIntoView(true);
|
await $('.mod-add-column').scrollIntoView(true);
|
||||||
await $(".mod-add-column").click();
|
await $(".mod-add-column").click();
|
||||||
await showColumn("Pop");
|
await showColumn("Pop");
|
||||||
|
@ -992,11 +992,11 @@ describe('GridViewNewColumnMenu', function () {
|
|||||||
|
|
||||||
// Make sure we have Created At column at the end.
|
// Make sure we have Created At column at the end.
|
||||||
const columns = await gu.getColumnNames();
|
const columns = await gu.getColumnNames();
|
||||||
assert.deepEqual(columns, ['A', 'B', 'C', 'Created At']);
|
assert.deepEqual(columns, ['A', 'B', 'C', 'Created at']);
|
||||||
|
|
||||||
// Make sure this is the column that is selected.
|
// Make sure this is the column that is selected.
|
||||||
assert.equal(await driver.find('.test-field-label').value(), 'Created At');
|
assert.equal(await driver.find('.test-field-label').value(), 'Created at');
|
||||||
assert.equal(await driver.find('.test-field-col-id').value(), '$Created_At');
|
assert.equal(await driver.find('.test-field-col-id').value(), '$Created_at');
|
||||||
|
|
||||||
// Check behavior - this is trigger formula
|
// Check behavior - this is trigger formula
|
||||||
assert.equal(await gu.columnBehavior(), "Data Column");
|
assert.equal(await gu.columnBehavior(), "Data Column");
|
||||||
@ -1019,11 +1019,11 @@ describe('GridViewNewColumnMenu', function () {
|
|||||||
|
|
||||||
// Make sure we have this column at the end.
|
// Make sure we have this column at the end.
|
||||||
const columns = await gu.getColumnNames();
|
const columns = await gu.getColumnNames();
|
||||||
assert.deepEqual(columns, ['A', 'B', 'C', 'Last Updated At']);
|
assert.deepEqual(columns, ['A', 'B', 'C', 'Last updated at']);
|
||||||
|
|
||||||
// Make sure this is the column that is selected.
|
// Make sure this is the column that is selected.
|
||||||
assert.equal(await driver.find('.test-field-label').value(), 'Last Updated At');
|
assert.equal(await driver.find('.test-field-label').value(), 'Last updated at');
|
||||||
assert.equal(await driver.find('.test-field-col-id').value(), '$Last_Updated_At');
|
assert.equal(await driver.find('.test-field-col-id').value(), '$Last_updated_at');
|
||||||
|
|
||||||
// Check behavior - this is trigger formula
|
// Check behavior - this is trigger formula
|
||||||
assert.equal(await gu.columnBehavior(), "Data Column");
|
assert.equal(await gu.columnBehavior(), "Data Column");
|
||||||
@ -1053,11 +1053,11 @@ describe('GridViewNewColumnMenu', function () {
|
|||||||
|
|
||||||
// Make sure we have this column at the end.
|
// Make sure we have this column at the end.
|
||||||
const columns = await gu.getColumnNames();
|
const columns = await gu.getColumnNames();
|
||||||
assert.deepEqual(columns, ['A', 'B', 'C', 'Created By']);
|
assert.deepEqual(columns, ['A', 'B', 'C', 'Created by']);
|
||||||
|
|
||||||
// Make sure this is the column that is selected.
|
// Make sure this is the column that is selected.
|
||||||
assert.equal(await driver.find('.test-field-label').value(), 'Created By');
|
assert.equal(await driver.find('.test-field-label').value(), 'Created by');
|
||||||
assert.equal(await driver.find('.test-field-col-id').value(), '$Created_By');
|
assert.equal(await driver.find('.test-field-col-id').value(), '$Created_by');
|
||||||
|
|
||||||
// Check behavior - this is trigger formula
|
// Check behavior - this is trigger formula
|
||||||
assert.equal(await gu.columnBehavior(), "Data Column");
|
assert.equal(await gu.columnBehavior(), "Data Column");
|
||||||
@ -1081,11 +1081,11 @@ describe('GridViewNewColumnMenu', function () {
|
|||||||
|
|
||||||
// Make sure we have this column at the end.
|
// Make sure we have this column at the end.
|
||||||
const columns = await gu.getColumnNames();
|
const columns = await gu.getColumnNames();
|
||||||
assert.deepEqual(columns, ['A', 'B', 'C', 'Last Updated By']);
|
assert.deepEqual(columns, ['A', 'B', 'C', 'Last updated by']);
|
||||||
|
|
||||||
// Make sure this is the column that is selected.
|
// Make sure this is the column that is selected.
|
||||||
assert.equal(await driver.find('.test-field-label').value(), 'Last Updated By');
|
assert.equal(await driver.find('.test-field-label').value(), 'Last updated by');
|
||||||
assert.equal(await driver.find('.test-field-col-id').value(), '$Last_Updated_By');
|
assert.equal(await driver.find('.test-field-col-id').value(), '$Last_updated_by');
|
||||||
|
|
||||||
// Check behavior - this is trigger formula
|
// Check behavior - this is trigger formula
|
||||||
assert.equal(await gu.columnBehavior(), "Data Column");
|
assert.equal(await gu.columnBehavior(), "Data Column");
|
||||||
|
Loading…
Reference in New Issue
Block a user