-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#104] Add test documentation and simplify testData usage
- Loading branch information
Showing
9 changed files
with
116 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
import { TestData } from '../../helpers/test-data'; | ||
|
||
export const bootstrapTestData = (projectName: string): TestData => { | ||
return { | ||
filesShouldContain: [ | ||
{ | ||
path: `${projectName}/package.json`, | ||
shouldContainString: 'bootstrap', | ||
}, | ||
{ | ||
path: `${projectName}/src/assets/stylesheets/application.scss`, | ||
shouldContainString: 'vendor/bootstrap', | ||
}, | ||
], | ||
filesShouldExist: [ | ||
`${projectName}/src/assets/stylesheets/vendor/bootstrap/index.scss`, | ||
], | ||
filesShouldNotExist: [ | ||
`${projectName}/tailwind.config.js`, | ||
`${projectName}/src/assets/stylesheets/application.css`, | ||
], | ||
}; | ||
export const bootstrapTestData: TestData = { | ||
filesShouldExist: [ | ||
'/src/assets/stylesheets/vendor/bootstrap/index.scss', | ||
], | ||
filesShouldNotExist: [ | ||
'/tailwind.config.js', | ||
'/src/assets/stylesheets/application.css', | ||
], | ||
filesShouldContain: [ | ||
{ | ||
path: '/package.json', | ||
shouldContainString: 'bootstrap', | ||
}, | ||
{ | ||
path: '/src/assets/stylesheets/application.scss', | ||
shouldContainString: 'vendor/bootstrap', | ||
}, | ||
], | ||
}; |
66 changes: 32 additions & 34 deletions
66
packages/cli-tool/test/add-ons/ui-framework/tailwind-css.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,35 @@ | ||
import { TestData } from '../../helpers/test-data'; | ||
|
||
export const tailwindCssTestData = (projectName: string): TestData => { | ||
return { | ||
filesShouldExist: [ | ||
`${projectName}/tailwind.config.js`, | ||
`${projectName}/postcss.config.js`, | ||
`${projectName}/src/assets/stylesheets/application.css`, | ||
], | ||
filesShouldNotExist: [ | ||
`${projectName}/src/assets/stylesheets/vendor/bootstrap`, | ||
`${projectName}/src/assets/stylesheets/application.scss`, | ||
], | ||
filesShouldContain: [ | ||
{ | ||
path: `${projectName}/package.json`, | ||
shouldContainString: 'tailwindcss', | ||
}, | ||
{ | ||
path: `${projectName}/package.json`, | ||
shouldContainString: 'postcss-import', | ||
}, | ||
{ | ||
path: `${projectName}/src/assets/stylesheets/application.css`, | ||
shouldContainString: '@tailwind base;', | ||
}, | ||
{ | ||
path: `${projectName}/src/assets/stylesheets/application.css`, | ||
shouldContainString: '@tailwind components;', | ||
}, | ||
{ | ||
path: `${projectName}/src/assets/stylesheets/application.css`, | ||
shouldContainString: '@tailwind utilities;', | ||
}, | ||
], | ||
}; | ||
export const tailwindCssTestData: TestData = { | ||
filesShouldExist: [ | ||
'/tailwind.config.js', | ||
'/postcss.config.js', | ||
'/src/assets/stylesheets/application.css', | ||
], | ||
filesShouldNotExist: [ | ||
'/src/assets/stylesheets/vendor/bootstrap', | ||
'/src/assets/stylesheets/application.scss', | ||
], | ||
filesShouldContain: [ | ||
{ | ||
path: '/package.json', | ||
shouldContainString: 'tailwindcss', | ||
}, | ||
{ | ||
path: '/package.json', | ||
shouldContainString: 'postcss-import', | ||
}, | ||
{ | ||
path: '/src/assets/stylesheets/application.css', | ||
shouldContainString: '@tailwind base;', | ||
}, | ||
{ | ||
path: '/src/assets/stylesheets/application.css', | ||
shouldContainString: '@tailwind components;', | ||
}, | ||
{ | ||
path: '/src/assets/stylesheets/application.css', | ||
shouldContainString: '@tailwind utilities;', | ||
}, | ||
], | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { TestData } from '../../helpers/test-data'; | ||
|
||
export const gitHubTestData: TestData = { | ||
filesShouldExist: ['/.github'], | ||
filesShouldNotExist: ['/.gitlab'], | ||
filesShouldContain: [], | ||
}; | ||
|
||
export const gitLabTestData: TestData = { | ||
filesShouldExist: ['/.gitlab'], | ||
filesShouldNotExist: ['/.github'], | ||
filesShouldContain: [], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters