Browse Source

refactor: lint and reset logic in test

pull/9314/head
Pranav C 3 months ago
parent
commit
1b6b59b7ff
  1. 10
      packages/nc-gui/components/account/setup/List.vue
  2. 9
      packages/nc-gui/components/smartsheet/details/Api.vue
  3. 12
      packages/nc-gui/utils/colorsUtils.ts
  4. 4
      tests/playwright/tests/db/usersAccounts/accounSetup.spec.ts

10
packages/nc-gui/components/account/setup/List.vue

@ -55,7 +55,13 @@ const closeResetModal = () => {
<div class="w-full">
<div class="w-950px px-4 mt-3 mx-auto text-lg font-weight-bold">{{ category }} Services</div>
<div class="container">
<div v-for="app in apps" :key="app.title" class="item group" @click="selectApp(app)" :data-testid="`nc-setup-list-item-${app.title}`">
<div
v-for="app in apps"
:key="app.title"
class="item group"
:data-testid="`nc-setup-list-item-${app.title}`"
@click="selectApp(app)"
>
<AccountSetupAppIcon :app="app" class="icon" />
<span class="title">{{ app.title }}</span>
<div class="flex-grow" />
@ -105,7 +111,7 @@ const closeResetModal = () => {
</div>
<div class="flex mt-6 justify-end space-x-2">
<NcButton size="small" type="secondary" @click="closeResetModal"> {{ $t('general.cancel') }}</NcButton>
<NcButton size="small" type="danger" @click="resetPlugin" data-testid="nc-reset-confirm-btn">
<NcButton size="small" type="danger" data-testid="nc-reset-confirm-btn" @click="resetPlugin">
{{ showResetActiveAppMsg ? `${$t('general.reset')} & ${$t('general.switch')}` : $t('general.reset') }}
</NcButton>
</div>

9
packages/nc-gui/components/smartsheet/details/Api.vue

@ -86,14 +86,7 @@ const snippet = computed(
method: 'GET',
headers: [
{
name: '' +
'' +
'' +
'' +
'' +
'' +
'' +
'xc-token',
name: '' + '' + '' + '' + '' + '' + '' + 'xc-token',
value: `CREATE_YOUR_API_TOKEN_FROM ${location.origin + location.pathname}#/account/tokens`,
comment: 'API token',
},

12
packages/nc-gui/utils/colorsUtils.ts

@ -430,7 +430,7 @@ export function getEnumColorByIndex(i: number, mode: 'light' | 'dark' = 'light')
export const lightTheme = {
content: {
'nc-gray': {
extreme: themeV3Colors.base['black'],
extreme: themeV3Colors.base.black,
emphasis: themeV3Colors.gray[900],
DEFAULT: themeV3Colors.gray[800],
subtle: themeV3Colors.gray[700],
@ -443,8 +443,8 @@ export const lightTheme = {
hover: themeV3Colors.gray[300],
},
'nc-inverted-primary': {
DEFAULT: themeV3Colors.base['white'],
hover: themeV3Colors.base['white'],
DEFAULT: themeV3Colors.base.white,
hover: themeV3Colors.base.white,
disabled: themeV3Colors.gray[400],
},
'nc-inverted-secondary': {
@ -494,7 +494,7 @@ export const lightTheme = {
},
},
background: {
'nc-default': themeV3Colors.base['white'],
'nc-default': themeV3Colors.base.white,
'nc-brand': themeV3Colors.brand[50],
'nc-gray': {
extralight: themeV3Colors.gray[50],
@ -578,9 +578,9 @@ export const lightTheme = {
disabled2: themeV3Colors.brand[200],
},
'nc-fill-secondary': {
DEFAULT: themeV3Colors.base['white'],
DEFAULT: themeV3Colors.base.white,
hover: themeV3Colors.gray[50],
disabled: themeV3Colors.base['white'],
disabled: themeV3Colors.base.white,
},
'nc-fill-warning': {
DEFAULT: themeV3Colors.red[500],

4
tests/playwright/tests/db/usersAccounts/accounSetup.spec.ts

@ -65,5 +65,9 @@ test.describe.serial('App setup', () => {
});
await accountSetupPage.goto();
await accountSetupPage.isConfigured('storage', true);
await accountSetupPage.resetConfig({
key: 'storage',
plugin: 'S3',
});
});
});

Loading…
Cancel
Save