Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/client/cypress/e2e/GSheet/AllAccess_Spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="Cypress" />
import { GSHEET_DATA } from "../../fixtures/test-data-gsheet";
import { featureFlagIntercept } from "../../support/Objects/FeatureFlags";
import {
homePage,
gsheetHelper,
Expand All @@ -15,13 +16,17 @@ const workspaceName = "gsheet apps";
const dataSourceName = "gsheet-all";
let appName = "gsheet-app";
let spreadSheetName = "test-sheet";
describe.skip(
describe(
"GSheet-Functional Tests With All Access",
{
tags: ["@tag.Datasource", "@tag.GSheet", "@tag.Git", "@tag.AccessControl"],
},
function () {
before("Setup app and spreadsheet", function () {
// intercept features call gsheet all sheets enabled
featureFlagIntercept({
release_gs_all_sheets_options_enabled: true,
});
//Add a new app and an add new spreadsheet query
//Setting up the spreadsheet name
const uuid = Cypress._.random(0, 10000);
Expand Down
7 changes: 6 additions & 1 deletion app/client/cypress/e2e/GSheet/GsheetMisc_Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ import EditorNavigation, {
EntityType,
PageLeftPane,
} from "../../support/Pages/EditorNavigation";
import { featureFlagIntercept } from "../../support/Objects/FeatureFlags";
Comment thread
sneha122 marked this conversation as resolved.
Outdated

const workspaceName = "gsheet apps";
const dataSourceName = "gsheet-all";
let appName = "gsheet-app";
let spreadSheetName = "test-sheet";
describe.skip(
describe(
"GSheet Miscellaneous Tests",
{
tags: ["@tag.Datasource", "@tag.GSheet", "@tag.Git", "@tag.AccessControl"],
Expand All @@ -38,6 +39,10 @@ describe.skip(
"rowIndex",
];
before("Setup app and spreadsheet", function () {
// intercept features call gsheet all sheets enabled
featureFlagIntercept({
release_gs_all_sheets_options_enabled: true,
});
//Add a new app and an add new spreadsheet query
//Setting up the spreadsheet name
const uuid = Cypress._.random(0, 10000);
Expand Down
7 changes: 6 additions & 1 deletion app/client/cypress/e2e/GSheet/ReadNWrite_Access_Spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="Cypress" />
import { GSHEET_DATA } from "../../fixtures/test-data-gsheet";
import { featureFlagIntercept } from "../../support/Objects/FeatureFlags";
import {
homePage,
gsheetHelper,
Expand All @@ -11,7 +12,7 @@ import {
appSettings,
} from "../../support/Objects/ObjectsCore";

describe.skip(
describe(
"GSheet-Functional Tests With Read/Write Access",
{
tags: ["@tag.Datasource", "@tag.GSheet", "@tag.Git", "@tag.AccessControl"],
Expand All @@ -26,6 +27,10 @@ describe.skip(
let spreadSheetName = "test-sheet";

before("Setup app and spreadsheet", function () {
// intercept features call gsheet all sheets enabled
featureFlagIntercept({
release_gs_all_sheets_options_enabled: true,
});
//Add a new app and an add new spreadsheet query
//Setting up the spreadsheet name
const uuid = Cypress._.random(0, 10000);
Expand Down
7 changes: 6 additions & 1 deletion app/client/cypress/e2e/GSheet/ReadOnly_Access_Spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="Cypress" />
import { GSHEET_DATA } from "../../fixtures/test-data-gsheet";
import { featureFlagIntercept } from "../../support/Objects/FeatureFlags";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add feature flag setup in before hook

The feature flag is imported but not used. Add it to the before hook to properly enable the feature flag.

 before("Setup app and spreadsheet", function () {
+  featureFlagIntercept({
+    release_gs_all_sheets_options_enabled: true,
+  });
   //Add a new app and an add new spreadsheet query

Committable suggestion skipped: line range outside the PR's diff.

import {
homePage,
gsheetHelper,
Expand All @@ -11,7 +12,7 @@ import {
appSettings,
} from "../../support/Objects/ObjectsCore";

describe.skip(
describe(
"GSheet-Functional Tests With Read Access",
{
tags: ["@tag.Datasource", "@tag.GSheet", "@tag.Git", "@tag.AccessControl"],
Expand All @@ -26,6 +27,10 @@ describe.skip(
let spreadSheetName = "test-sheet";

before("Setup app and spreadsheet", function () {
// intercept features call gsheet all sheets enabled
featureFlagIntercept({
release_gs_all_sheets_options_enabled: true,
});
//Add a new app and an add new spreadsheet query
//Setting up the spreadsheet name
const uuid = Cypress._.random(0, 10000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,23 @@ import {
PageLeftPane,
PagePaneSegment,
} from "../../support/Pages/EditorNavigation";
import { featureFlagIntercept } from "../../support/Objects/FeatureFlags";

const workspaceName = "gsheet apps";
const dataSourceName = "gsheet-all";
let appName = "gsheet-app";
let spreadSheetName = "test-sheet";
describe.skip(
describe(
"GSheet-widget binding",
{
tags: ["@tag.Datasource", "@tag.GSheet", "@tag.Git", "@tag.AccessControl"],
},
function () {
before("Setup app and spreadsheet", function () {
// intercept features call gsheet all sheets enabled
featureFlagIntercept({
release_gs_all_sheets_options_enabled: true,
});
//Setting up the app name
const uuid = Cypress._.random(0, 10000);
spreadSheetName = spreadSheetName + "_" + uuid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags";
import {
dataSources,
deployMode,
Expand All @@ -23,6 +24,13 @@ describe(
function () {
let pluginName = "Google Sheets";

before(() => {
// intercept features call gsheet all sheets disabled
featureFlagIntercept({
release_gs_all_sheets_options_enabled: false,
});
});

it("1. Verify GSheets dropdown options", function () {
dataSources.NavigateToDSCreateNew();
dataSources.CreatePlugIn("Google Sheets");
Expand Down
3 changes: 3 additions & 0 deletions app/client/src/ce/entities/FeatureFlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export const FEATURE_FLAG = {
release_table_custom_loading_state_enabled:
"release_table_custom_loading_state_enabled",
release_custom_widget_ai_builder: "release_custom_widget_ai_builder",
release_gs_all_sheets_options_enabled:
"release_gs_all_sheets_options_enabled",
} as const;

export type FeatureFlag = keyof typeof FEATURE_FLAG;
Expand Down Expand Up @@ -79,6 +81,7 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = {
release_ide_datasource_selector_enabled: false,
release_table_custom_loading_state_enabled: false,
release_custom_widget_ai_builder: false,
release_gs_all_sheets_options_enabled: false,
};

export const AB_TESTING_EVENT_KEYS = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public enum FeatureFlagEnum {
release_embed_hide_share_settings_enabled,
rollout_datasource_test_rate_limit_enabled,
release_google_sheets_shared_drive_support_enabled,
release_gs_all_sheets_options_enabled,

// Deprecated CE flags over here
release_git_autocommit_feature_enabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,48 @@
{
"label": "Read / Write / Delete | Selected google sheets",
"value": "https://www.googleapis.com/auth/drive.file"
},
{
"label": "Read / Write / Delete | All google sheets",
"value": "https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drive"
},
{
"label": "Read / Write | All google sheets",
"value": "https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drive.readonly"
},
{
"label": "Read | All google sheets",
"value": "https://www.googleapis.com/auth/spreadsheets.readonly,https://www.googleapis.com/auth/drive.readonly"
}
],
"initialValue": "https://www.googleapis.com/auth/drive.file",
"customStyles": {
"width": "340px"
},
"hidden": {
"flagValue": "release_gs_all_sheets_options_enabled",
"comparison": "FEATURE_FLAG",
"value": false
}
},
{
"label": "Permissions | Scope",
"configProperty": "datasourceConfiguration.authentication.scopeString",
"controlType": "RADIO_BUTTON",
"options": [
{
"label": "Read / Write / Delete | Selected google sheets",
"value": "https://www.googleapis.com/auth/drive.file"
}
],
"initialValue": "https://www.googleapis.com/auth/drive.file",
"customStyles": {
"width": "340px"
},
"hidden": {
"flagValue": "release_gs_all_sheets_options_enabled",
"comparison": "FEATURE_FLAG",
"value": true
}
}
]
Expand Down