Commit d03f85fe authored by Andrew Fontaine's avatar Andrew Fontaine

Test Folders Look Correct on Environments

We can assert that the width of the name cell is 100% of the table, as
well as assert that non-folder table cells shouldn't exist.
parent b2dc319f
......@@ -593,6 +593,7 @@ export default {
class="table-section section-wrap text-truncate"
:class="tableNameSpacingClass"
role="gridcell"
data-testid="environment-name-cell"
>
<div v-if="!isFolder" class="table-mobile-header" role="rowheader">
{{ getMobileViewTitleForField('name') }}
......@@ -639,6 +640,7 @@ export default {
class="table-section deployment-column d-none d-md-block"
:class="tableData.deploy.spacing"
role="gridcell"
data-testid="enviornment-deployment-id-cell"
>
<span v-if="shouldRenderDeploymentID" class="text-break-word">
{{ deploymentInternalId }}
......@@ -665,6 +667,7 @@ export default {
class="table-section d-none d-md-block"
:class="tableData.build.spacing"
role="gridcell"
data-testid="environment-build-cell"
>
<a v-if="shouldRenderBuildName" :href="buildPath" class="build-link cgray">
<tooltip-on-truncate
......
......@@ -285,6 +285,17 @@ describe('Environment item', () => {
it('should not render the "Upcoming deployment" column', () => {
expect(findUpcomingDeployment().exists()).toBe(false);
});
it('should set the name cell to be full width', () => {
expect(wrapper.find('[data-testid="environment-name-cell"]').classes('section-100')).toBe(
true,
);
});
it('should hide non-folder properties', () => {
expect(wrapper.find('[data-testid="environment-deployment-id-cell"]').exists()).toBe(false);
expect(wrapper.find('[data-testid="environment-build-cell"]').exists()).toBe(false);
});
});
describe('When environment can be deleted', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment