Skip to content

Commit bc4ec81

Browse files
fix(multi-org): conditionally applying CSS to page header correctly (#5525)
1 parent c67b1dc commit bc4ec81

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

cypress/e2e/shared/simpleTable.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('simple table interactions', () => {
5353
// verify correct number of pages
5454
cy.getByTestID('pagination-item')
5555
.last()
56-
.contains('100')
56+
.contains('50')
5757

5858
// show raw data view of data with 10 pages
5959
cy.getByTestID(`selector-list ${simpleSmall}`).should('be.visible')
@@ -84,7 +84,7 @@ describe('simple table interactions', () => {
8484
.should('be.visible')
8585
cy.getByTestID('pagination-item')
8686
.last()
87-
.contains('10')
87+
.contains('15')
8888
})
8989

9090
it('should render correctly after switching from a dataset with fewer pages to one with more', () => {
@@ -117,7 +117,7 @@ describe('simple table interactions', () => {
117117
// verify correct number of pages
118118
cy.getByTestID('pagination-item')
119119
.last()
120-
.contains('10')
120+
.contains('5')
121121

122122
// show raw data view of data with 100 pages
123123
cy.getByTestID(`selector-list ${simpleLarge}`).should('be.visible')
@@ -148,7 +148,7 @@ describe('simple table interactions', () => {
148148
.should('be.visible')
149149
cy.getByTestID('pagination-item')
150150
.last()
151-
.contains('100')
151+
.contains('150')
152152
})
153153

154154
it('should not duplicate records from the n-1 page on the nth page', () => {
@@ -181,7 +181,7 @@ describe('simple table interactions', () => {
181181
// verify correct number of pages
182182
cy.getByTestID('pagination-item')
183183
.last()
184-
.contains('11')
184+
.contains('6')
185185
// verify only record 31 is on last page
186186
cy.getByTestID('table-cell 30').should('not.exist')
187187
cy.getByTestID('table-cell 31').should('be.visible')
@@ -229,8 +229,8 @@ describe('simple table interactions', () => {
229229
cy.getByTestID('pagination-item')
230230
.eq(3)
231231
.click()
232-
cy.getByTestID('table-cell 26').should('be.visible')
233232
cy.getByTestID('table-cell 27').should('be.visible')
233+
cy.getByTestID('table-cell 28').should('be.visible')
234234
cy.getByTestID('pagination-item')
235235
.last()
236236
.click()
@@ -239,8 +239,8 @@ describe('simple table interactions', () => {
239239
cy.getByTestID('pagination-item')
240240
.eq(2)
241241
.click()
242-
cy.getByTestID('table-cell 23').should('be.visible')
243-
cy.getByTestID('table-cell 24').should('be.visible')
242+
cy.getByTestID('table-cell 25').should('be.visible')
243+
cy.getByTestID('table-cell 26').should('be.visible')
244244
cy.getByTestID('pagination-item')
245245
.last()
246246
.click()
@@ -249,8 +249,8 @@ describe('simple table interactions', () => {
249249
cy.getByTestID('pagination-item')
250250
.eq(1)
251251
.click()
252-
cy.getByTestID('table-cell 20').should('be.visible')
253-
cy.getByTestID('table-cell 21').should('be.visible')
252+
cy.getByTestID('table-cell 23').should('be.visible')
253+
cy.getByTestID('table-cell 24').should('be.visible')
254254
cy.getByTestID('pagination-item')
255255
.last()
256256
.click()

src/App.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ import {CLOUD} from 'src/shared/constants'
4242
import {shouldUseQuartzIdentity} from 'src/identity/utils/shouldUseQuartzIdentity'
4343
import {executeVWO} from 'src/utils/vwo'
4444

45-
if (isFlagEnabled('multiOrg')) {
46-
require('./MultiOrgOverrideStyles.scss')
47-
}
4845
// Styles
46+
import './MultiOrgOverrideStyles.scss'
4947
const fullScreen = {height: '100%', width: '100%'}
5048

5149
const App: FC = () => {
@@ -54,6 +52,7 @@ const App: FC = () => {
5452

5553
const appWrapperClass = classnames('', {
5654
'dashboard-light-mode': currentPage === 'dashboard' && theme === 'light',
55+
'multi-org': isFlagEnabled('multiOrg'),
5756
})
5857

5958
useEffect(() => {

src/MultiOrgOverrideStyles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.cf-page-header {
1+
.multi-org .cf-page-header {
22
height: 45px !important;
33
flex: 0 0 45px !important;
44
margin-bottom: 12px !important;

0 commit comments

Comments
 (0)