Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Fluent UI to 8.118.2 #222

Merged
merged 8 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ jobs:
with:
extra-packages: local::. # Necessary to avoid object usage linter errors.

- name: Install shiny.react with React 18.3.1
if: always()
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
Rscript -e 'install.packages("remotes"); remotes::install_github("Appsilon/shiny.react")'

- name: Install Node.js and Yarn
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -51,7 +58,8 @@ jobs:
start: yarn start-e2e-test-app
working-directory: js
record: true
spec: cypress/integration/e2e-test/*.js
spec: cypress/e2e/e2e-test/*.js
config: baseUrl=http://localhost:8887
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- name: Run Cypress on example Dashboard
Expand All @@ -61,7 +69,8 @@ jobs:
start: yarn start-e2e-router-app
working-directory: js
record: true
spec: cypress/integration/dashboard/*.js
spec: cypress/e2e/dashboard/*.js
config: baseUrl=http://localhost:8886
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}

Expand Down
8 changes: 4 additions & 4 deletions DESCRIPTION
jakubsob marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Package: shiny.fluent
Title: Microsoft Fluent UI for Shiny Apps
Version: 0.3.0
Version: 0.3.0.900
Authors@R:
c(
person("Kamil", "Żyła", role = c("aut", "cre"), email = "opensource+kamil@appsilon.com"),
person("Jakub", "Sobolewski", role = "aut", email = "jakub.sobolewski@appsilon.com"),
person("Jakub", "Sobolewski", role = c("aut", "cre"), email = "opensource+jakub.sobolewski@appsilon.com"),
person("Kamil", "Żyła", role = "aut", email = "kamil@appsilon.com"),
person("Marek", "Rogala", role = "aut", email = "[email protected]"),
person("Appsilon Sp. z o.o.", role = "cph", email = "[email protected]")
)
Expand All @@ -18,7 +18,7 @@ License: LGPL-3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
VignetteBuilder: knitr
Depends:
R (>= 2.10)
Expand Down
3 changes: 1 addition & 2 deletions inst/www/shiny.fluent/shiny-fluent.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion js/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ module.exports = {
],
rules: {},
settings: {
'import/resolver': 'webpack',
'import/resolver': {
webpack: {
extensions: ['.js', '.jsx', '.ts', '.tsx']
}
},
react: { version: '17' }
},
};
11 changes: 11 additions & 0 deletions js/cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
projectId: 'pm6grv',
e2e: {
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
defaultCommandTimeout: 10000,
},
})
4 changes: 0 additions & 4 deletions js/cypress.json

This file was deleted.

17 changes: 17 additions & 0 deletions js/cypress/e2e/dashboard/dashboard.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
describe('Dashboard', () => {
it('Slider', () => {
cy.visit('/#!/Slider');
const steps = 15;
const arrows = '{rightarrow}'.repeat(steps);

cy.get('#Slider .ms-Slider-slideBox').type(arrows);
cy.contains('Value: 15');
});

it('Dropdown', () => {
cy.visit('/#!/Dropdown');
cy.get('#Dropdown-dropdown-option').click();
cy.get('#Dropdown-dropdown-list2').click();
cy.contains('Value: C');
});
});
Original file line number Diff line number Diff line change
@@ -1,61 +1,44 @@
function test() {
let clicks = 1;
return (name) => {
cy.get(`#actionButtons-${name}`).click();
cy.get('#actionButtons-clicks').should('contain', `Number of clicks: ${clicks}`);
clicks += 1;
};
function testButtonClick(name) {
cy.get(`#actionButtons-${name}`).click();
cy.get('#actionButtons-clicks').should('contain', 'Number of clicks: 1');
}
const testButtonClick = test();

describe('DefaultButton.shinyInput()', () => {
before(() => {
describe('Clicking buttons', () => {
beforeEach(() => {
cy.visit('/');
});

it('click works', () => {
it('DefaultButton.shinyInput()', () => {
testButtonClick('defaultButton');
});
});

describe('PrimaryButton.shinyInput()', () => {
it('click works', () => {
it('PrimaryButton.shinyInput()', () => {
testButtonClick('primaryButton');
});
});

describe('CompoundButton.shinyInput()', () => {
it('click works', () => {
it('CompoundButton.shinyInput()', () => {
testButtonClick('compoundButton');
});
});

describe('ActionButton.shinyInput()', () => {
it('click works', () => {
it('ActionButton.shinyInput()', () => {
testButtonClick('actionButton');
});
});

describe('CommandBarButton.shinyInput()', () => {
it('click works', () => {
it('CommandBarButton.shinyInput()', () => {
testButtonClick('actionButton');
});
});

describe('CommandButton.shinyInput()', () => {
it('click works', () => {
it('CommandButton.shinyInput()', () => {
testButtonClick('actionButton');
});
});

describe('IconButton.shinyInput()', () => {
it('click works', () => {
it('IconButton.shinyInput()', () => {
testButtonClick('actionButton');
});
});

describe('Updating buttons', () => {
before(() => {
beforeEach(() => {
cy.visit('/');
cy.get('#actionButtons-update').click();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
describe('Fluent components inside Shiny tabset', () => {
before(() => {
beforeEach(() => {
cy.visit('/');
cy.get('#deepMixing-tabs1').within(() => {
cy.get('a[data-value=JSX]').click();
Expand All @@ -16,8 +16,10 @@ describe('Fluent components inside Shiny tabset', () => {
});

describe('JSX inside uiOutput inside JSX', () => {
before(() => {
cy.get('[data-cy=deepMixing-pivot] > .ms-Pivot > button[name="Leaflet inside a Pivot"]').click();
beforeEach(() => {
cy.visit('/');
cy.reload();
cy.contains('Leaflet inside a Pivot').click();
});

it('Leaflet inside Pivot is visible', () => {
Expand All @@ -28,9 +30,10 @@ describe('JSX inside uiOutput inside JSX', () => {
});

describe('Leaflet in Pivot in uiOutput in Pivot in uiOutput in JSX', () => {
before(() => {
cy.get('[data-cy=deepMixing-pivot] > .ms-Pivot > button[name="Another level of nesting"]').click();
cy.get('[data-cy=deepMixing-nestedPivot] > .ms-Pivot > button[name="Leaflet inside a Pivot"]').click();
beforeEach(() => {
cy.visit('/');
cy.get('[data-cy=deepMixing-pivot] [data-content="Another level of nesting"]').click();
cy.get('[data-cy=deepMixing-nestedPivot] [data-content="Leaflet inside a Pivot"]').click();
});

it('Leaflet inside nested Pivot is visible', () => {
Expand Down
Loading
Loading