Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyguenther committed Mar 6, 2024
1 parent b2f3409 commit 9fd1eb7
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/commands/theme/settings/download.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { describe, expect, test, vi } from 'vitest'

describe.skip('download', () => {
describe('run', () => {
test('call cli2 command', () => { })
})
})
6 changes: 6 additions & 0 deletions src/services/bucket/create.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { describe, expect, test, vi } from 'vitest'

describe.skip('create', () => {
test.fails('creates bucket and shows message', () => { })
test.fails('creates mulitple buckets and shows message', () => { })
})
11 changes: 11 additions & 0 deletions src/services/bucket/delete.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { describe, expect, test, vi } from 'vitest'

describe.skip('delete', () => {
describe('when forced', () => {
test.fails('deletes files without confirmation', () => { })
})
describe('when asked for confirmation', () => {
test.fails('deletes files after receiving confirmation', () => { })
test.fails('does not delete files after being denied confirmation', () => { })
})
})
20 changes: 20 additions & 0 deletions src/services/bucket/init.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { describe, expect, test, vi } from 'vitest'

describe.skip('init', () => {
describe('init', () => {
describe('when .gitignore exists', () => {
test.fails('creates buckets and updates .gitignore', () => { })
})
describe('when .gitignore does not exist', () => {
test.fails('creates buckets and creates .gitignore', () => { })
})
})
describe('renderBucketListSection', () => {
describe('when array of buckets provided', () => {
test.fails('returns a bucket list section', () => { })
})
describe('when no buckets provided', () => {
test.fails('returns an empty selection list', () => { })
})
})
})
5 changes: 5 additions & 0 deletions src/services/bucket/list.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { describe, expect, test, vi } from 'vitest'

describe.skip('list', () => {
test.fails('renders a table of buckets', () => { })
})
7 changes: 4 additions & 3 deletions src/services/bucket/list.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { renderTable } from "@shopify/cli-kit/node/ui"
import { getBuckets } from "../../utilities/bucket.js"
import { getBuckets, getShopkeeperPath } from "../../utilities/bucket.js"

export async function list() {
const buckets = await getBuckets()
export async function list(rootPath?: string) {
const shopkeeperRoot = rootPath || await getShopkeeperPath()
const buckets = await getBuckets(shopkeeperRoot)

renderTable({
rows: buckets.map(bucket => ({ bucket })),
Expand Down
42 changes: 42 additions & 0 deletions src/services/theme/deploy.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { describe, expect, test, vi } from 'vitest'

describe.skip('deploy', () => {
describe('deploy', () => {
describe('when blue/green strategy', () => {
test.fails('makes blue/green deploy', () => { })
})
describe('when no strategy is passsed', () => {
test.fails('makes basic deploy', () => { })
})
})

describe('blueGreenDeploy', () => {
test.fails('pulls live theme settings and updates on-deck theme', () => { })
})

describe('basicDeploy', () => {
test.fails('pulls live theme settings and updates theme', () => { })
})

describe('getLiveTheme', () => {
describe('when live theme exists', () => {
test.fails('returns live theme id', () => { })
})
describe('when live theme does not exist', () => {
test.fails('throws abort error', () => { })
})
})

describe('getOnDeckThemeId', () => {
describe('when published theme is blue', () => {
test('returns green', () => { })
})
describe('when published theme is green', () => {
test('returns blue', () => { })
})
})

describe('gitHeadHash', () => {
test('returns the first 8 chars', () => { })
})
})
5 changes: 5 additions & 0 deletions src/services/theme/get.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { describe, expect, test, vi } from 'vitest'

describe.skip('get', () => {
test.fails('returns theme', () => { })
})
22 changes: 22 additions & 0 deletions src/utilities/theme.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { describe, expect, test, vi } from 'vitest'

describe.skip('theme utilities', () => {
describe('pullThemeSettings', () => {
test.fails('pulls settings from live theme', () => { })
})
describe('push', () => {
test.fails('pushes theme files to theme', () => { })
})
describe('pushToLive', () => {
test.fails('pushes theme files to live theme', () => { })
})
describe('getThemesByIdentifier', () => {
test.fails('returns list of themes that match id or name', () => { })
})
describe('filterByTheme', () => {
test.fails('returns list of themes that match filter', () => { })
})
describe('filterArray', () => {
test.fails('returns list of themes that match predicate', () => { })
})
})

0 comments on commit 9fd1eb7

Please sign in to comment.