### Description

Close #2226

Refactors matplotlib tests:

- Prevent dangling selenium webdriver after test
- For asynchronous tests, use promise-await instead of selenium WebDriverWait
- Enable xfailed tests

<!--
- [ ] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry
- [ ] Add / update tests
- [ ] Add new / update outdated documentation
!-->

Refactor matplotlib tests. ### Description

Close #2226

Refactors matplotlib tests:

- Prevent dangling selenium webdriver after test
- For asynchronous tests, use promise-await instead of selenium WebDriverWait
- Enable xfailed tests

<!--
- [ ] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry
- [ ] Add / update tests
- [ ] Add new / update outdated documentation
!-->

package:
  name: optlang
  version: 1.5.2
source:
  sha256: 14464cff638b58670c1a7f5896f19dd7b595a12c1d30a27c59074700833c1677
  url: https://files.pythonhosted.org/packages/12/3e/9d0b72cf5a8ff660e5787a0797906e04942081f3ad4a95f860488affff2b/optlang-1.5.2-py2.py3-none-any.whl
requirements:
  run:
    - sympy
    - six
    - swiglpk
test:
  imports:
    - optlang
    - optlang.glpk_interface
    - optlang.symbolics

package:
  name: optlang
  version: 1.5.2
source:
  sha256: 14464cff638b58670c1a7f5896f19dd7b595a12c1d30a27c59074700833c1677
  url: https://files.pythonhosted.org/packages/12/3e/9d0b72cf5a8ff660e5787a0797906e04942081f3ad4a95f860488affff2b/optlang-1.5.2-py2.py3-none-any.whl
requirements:
  run:
    - sympy
    - six
    - swiglpk
test:
  imports:
    - optlang
    - optlang.glpk_interface
    - optlang.symbolics
